A warehouse scene automatic modeling system based on constraint perception and self-correcting closed loop

The automatic modeling system for warehouse scenarios with constraint perception and self-correction closed loop solves the problems of path disconnection and coordinate overlap in warehouse scenario modeling using large language models, realizes automatic iterative correction, and improves modeling efficiency and model accuracy.

CN123179946APending Publication Date: 2026-11-27UNIV OF SCI & TECH OF CHINA +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611691808.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, large language models have difficulty effectively handling issues such as broken paths, overlapping coordinates, and violations of safety distances in warehouse scenario modeling, and they also lack the ability to automatically iterate and correct these issues.

Method used

An automatic modeling system for warehouse scenarios based on constraint awareness and self-correction closed loop is adopted. The system generates declarative interface code through a large language model, performs parameter verification and coordinate calculation using a constraint awareness software development kit, implements deterministic execution in a sandbox for isolated execution, and performs logic verification and error feedback using a self-correction closed loop module to achieve automatic iterative correction.

Benefits of technology

It improves the physical effectiveness and topological connectivity of warehouse scenario modeling, reduces the risk of structural errors, improves modeling efficiency, and provides accurate model data for discrete event simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179946A_ABST
    Figure CN123179946A_ABST
Patent Text Reader

Abstract

The application discloses a warehouse scene automatic modeling system based on constraint perception and self-correcting closed loop, and relates to the warehouse scene automatic modeling technology. The system comprises a large language model code generation module, a constraint perception software development kit, a deterministic execution sandbox, a self-correcting closed loop module and a scene model generation module. The code generation module converts natural language requirements into executable procedural code that calls declarative interfaces; the software development kit verifies parameters, performs coordinate calculation, topology mapping and physical constraint processing; the deterministic execution sandbox runs the code in isolation and captures errors; the self-correcting closed loop module detects path connectivity, physical distance between nodes and coordinate overlap, and feeds back errors to the code generation module for iterative repair; and the scene model generation module converts the verified scene description data into a scene model file that can be parsed by a discrete event simulation environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital modeling technology for intelligent warehousing scenarios, specifically to an automatic modeling system for warehousing scenarios based on constraint perception and self-correcting closed loop. Background Technology

[0002] In existing technologies, some solutions have explored the use of large language models for scene generation or system integration. For example, Chinese invention patent application CN 122197598 A (publication date: June 12, 2026) discloses a digital test scenario design method based on large model intelligent agent collaboration, which uses code-generating intelligent agents to perform simulation code conversion and compilation verification, and corrects scenario parameters based on operational feedback; Chinese invention patent application CN 121858607 A (publication date: April 14, 2026) discloses a heterogeneous business system integration method based on a large model, which generates task execution graphs through natural language instructions, performs pre-rendering in an isolated environment, and uses a large language model to perform logic and compliance verification on execution logs. The above solutions are respectively aimed at digital test scenario design and heterogeneous business system integration, and their disclosed technical mechanisms are not aimed at setting constraints on element spacing, path connectivity, and coordinate overlap in warehouse scenario modeling. For warehouse scenario modeling, physical space has deterministic requirements, including element spacing satisfying constraints, path maintaining connectivity, and coordinates not overlapping. If a large language model internally handles complex spatial coordinate calculations and topological mappings, or directly outputs static structured data, structural errors such as broken paths, overlapping shelf coordinates, or violations of safety spacing constraints may occur due to the probabilistic generation mechanism used in large language models. Furthermore, sandbox compilation verification or general log compliance checks primarily target code execution or general logic issues, making it difficult to directly identify element spacing, path connectivity, and coordinate overlap constraints in warehousing scenarios. Consequently, automatic error correction for warehousing space conflicts is challenging.

[0003] Therefore, it is necessary to solve the problem of how to combine the scene layout planning of large language models with deterministic spatial constraint calculation to reduce the risk of path disconnection, coordinate overlap and violation of safety distance constraints, and to automatically iterate and correct when execution errors or semantic verification failures are found. Summary of the Invention

[0004] The technical problem to be solved by this invention is to reduce path disconnection, coordinate overlap and violation of safety distance constraints caused by direct spatial coordinate calculation of large language models when generating warehouse scene models through natural language, and to achieve automatic iterative correction when code execution errors or scene semantic verification failures occur.

[0005] To address the aforementioned technical problems, this invention provides an automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed-loop, comprising: The large language model code generation module is used to receive natural language requirements containing warehouse scene elements and their relationships, and convert the natural language requirements into executable procedural code that calls the declarative interface of the constraint-aware software development kit; the declarative interface describes the warehouse scene construction operation through the interface name, calling parameters and calling order, without the code calculating the specific spatial coordinates of the scene elements itself; The constraint-aware software development kit is used to verify the type and range of the call parameters of the declarative interface, and to perform coordinate calculation, topological relationship mapping and physical constraint processing based on the verified parameters to generate scene description data containing node identifiers, node types, spatial coordinates and connection relationships; the physical constraints include feature spacing constraints, path connectivity constraints and coordinate overlap prohibition constraints. A deterministic execution sandbox is used to load the constraint-aware software development kit in an isolated execution environment, execute the executable procedural code to call the declarative interface, and capture code execution errors and corresponding error stack information. The self-correcting closed-loop module has a built-in logic verifier, which is used to perform path connectivity, physical distance between adjacent topological nodes, and coordinate overlap detection on the scene description data after the executable procedural code is successfully executed. If an execution error occurs or any detection fails, the error or detection failure information is converted into structured error information containing the error type and error location, and fed back to the large language model code generation module. This module combines the original natural language requirements, the current code, and the structured error information to generate a repaired executable procedural code, which drives the deterministic execution sandbox to re-execute until it is successful and all detections pass or the preset maximum number of retries is reached. The scene model generation module is used to convert the scene description data into a scene model file that can be parsed by the discrete event simulation environment after the code execution is successful and all the logic verifiers pass the tests.

[0006] Furthermore, the constraint-aware software development kit includes a data verification layer and a semantic execution layer; the data verification layer corresponds to the mode layer that performs type checking and range boundary verification based on the parameter model, and the semantic execution layer corresponds to the processing layer that performs coordinate mapping, feature spacing conversion and topological connection mapping based on the verified parameters, wherein the parameters include coordinate origin parameters, feature spacing parameters and topological relationship parameters.

[0007] Furthermore, the declarative interface includes at least a mesh generation interface and a connectivity rule definition interface; The parameters for calling the mesh generation interface include the number of rows. Column number and physical step size ;in, For the number of grid rows, For the number of grid columns, The physical spacing between adjacent grid nodes; the data verification layer verifies... , It is an integer and satisfies , and , The preset safety distance threshold is greater than zero; The connectivity rule definition interface receives an edge rule object, which represents the connectivity conditions between node types, including source node type, target node type, bidirectional connectivity identifier, and distance constraint parameters.

[0008] Furthermore, the logic verifier is used to perform the following detection: Based on the path nodes and their connection relationships in the scenario description data, determine whether the path network formed by the connection relationships is connected; For adjacent topology nodes determined by connectivity, , Represents the indices of two nodes in the node set, using Represents a node and nodes The actual physical distance between them, and the preset maximum allowed distance threshold. Compare; when When the connection is determined to violate the distance constraint, This indicates the maximum physical distance allowed for this connection; Detect whether the spatial coordinates of elements in different warehousing scenarios overlap; When there is a broken path, the physical distance between adjacent topological nodes exceeds the maximum allowed distance threshold, or the coordinates of different elements overlap, semantic verification failure information containing the error type, error location, and the violated physical constraint rules is generated.

[0009] Furthermore, the deterministic execution sandbox adopts a restricted execution environment, allowing the use of the constraint-aware software development kit and security basic runtime library according to a preset whitelist, while blocking file reading, writing and network access of the executable procedural code; The deterministic execution sandbox monitoring code has been running for a certain period of time. and memory usage ,when or Execution is terminated and a resource exceedance error is reported to the self-correcting closed-loop module, wherein... Indicates the execution time of the code. Indicates memory usage. For runtime threshold, This is the threshold for memory usage.

[0010] Furthermore, the code execution errors include syntax errors, interface call errors, and logic conflict errors during runtime; the structured error information includes at least the error type and error location, and when a physical constraint violation occurs, it also includes the violated constraint rule; the self-correcting closed-loop module extracts corresponding information from the code execution log or the detection results of the logic verifier, removes redundant log fields unrelated to error correction from the feedback content, and writes the extracted information into a preset error correction prompt word template before feeding it back to the large language model code generation module; The self-correcting closed-loop module is set to a maximum number of retries. and current number of retries ,in The maximum allowed number of retries, and must be a positive integer. The number of times the repair and re-execution have been completed is a non-negative integer, before the initial execution. Each time the code is fixed and re-executed due to error feedback, Add 1; if this round of execution or testing fails and Then repair and execute again. If this round of execution or detection fails and Then stop the iteration and output a failure report.

[0011] Furthermore, the large language model code generation module has a built-in application prompt word template, which includes the calling specifications, code format requirements and few-shot examples of the declarative interface; the few-shot examples are mapping samples that associate the element types, quantities and connection relationships in the natural language requirements of the repository with the interface call sequence, and are used to guide code generation; The large language model code generation module is used to generate a layout planning result containing the type of warehouse scene elements, the number of elements, the relative layout relationship and the topological connection relationship before generating the executable procedural code, and then generate the executable procedural code based on the layout planning result.

[0012] Preferably, the system further includes a discrete event simulation module, used to load the scenario model file and construct a dynamic simulation scenario of discrete events in warehousing operations based on simulation parameters; the simulation parameters include the number of automated guided vehicles, cargo turnover rate, and operation time threshold. The discrete event simulation module is used to simulate the dynamic process of automated guided vehicle scheduling and cargo handling, and outputs simulation analysis results of throughput, equipment utilization and bottleneck node location.

[0013] Furthermore, the scene model generation module caches the detected scene description data and corresponding scene model files locally; When the large language model code generation module receives a scene adjustment instruction in natural language form, it generates adjusted executable procedural code based on the cached scene description data and the scene adjustment instruction. The deterministic execution sandbox and the self-correcting closed-loop module re-execute and test the adjusted code. After successful execution and all tests pass, the scene model generation module generates an adjusted scene model file. The discrete event simulation module loads the adjusted file for secondary simulation and outputs the throughput difference before and after adjustment, the congestion rate comparison results, and the bottleneck node migration status.

[0014] Preferably, the system further includes a graphics data conversion submodule, used to convert the scene description data into a graph structure data file that can be parsed by the 3D visualization engine, so that the 3D visualization engine can generate a 3D visualization result of the warehouse scene.

[0015] The above technical solution has the following advantages: The large language model code generation module describes the construction logic of the warehousing scenario based on the user's natural language requirements and generates procedural code. Specific spatial coordinate calculations, topological mapping, and physical constraint handling are executed by a deterministic constraint-aware software development kit (SDK), thus separating the logical planning task of the large language model from the deterministic spatial computation task, reducing the risk of structural errors caused by the large language model directly performing spatial numerical calculations. Simultaneously, a deterministic execution sandbox provides an isolated operating environment. The self-correcting closed-loop module, through a built-in logic verifier, performs semantic verification of path connectivity, physical distance, and coordinate overlap after successful code execution. When code execution errors or physical constraint violations are detected, the error information is converted into structured error information and fed back to the large language model code generation module for iterative code repair. This automatic error correction closed loop improves the physical effectiveness, topological connectivity, and modeling efficiency of complex warehousing scenario modeling, and provides qualified model data for downstream discrete event simulations. Attached Figure Description

[0016] Figure 1 This diagram illustrates the process of natural language requirement input, code generation, sandbox execution, constraint-aware software development kit invocation, self-correction feedback, and scene model file output for an automated modeling system for warehouse scenarios. Detailed Implementation

[0017] The following combination Figure 1 The processing flow shown provides a detailed explanation of the functions, parameter constraints, error feedback, and scene model generation process of each module.

[0018] This embodiment provides an automatic modeling system for warehouse scenes based on constraint awareness and a self-correcting closed loop. In this application, constraint awareness refers to the use of a constraint awareness software development kit to apply constraints to the scene model, including restrictions on element spacing, path connectivity, and coordinate overlap. The self-correcting closed loop refers to a processing loop that, after code execution or scene detection failure, provides error information, repairs the code, and re-executes it. Figure 1 As shown, natural language requirements are transmitted to the large language model code generation module, which then transmits executable procedural code to the deterministic execution sandbox. The bidirectional arrows between the deterministic execution sandbox and the constraint-aware software development kit (SDK) indicate interface calls and execution result returns. The deterministic execution sandbox transmits the execution results to the self-correcting loop module. The dashed arrows from the self-correcting loop module to the large language model code generation module indicate error feedback and code iteration repair. After passing the checks, the self-correcting loop module transmits the scene description data to the scene model generation module, which outputs the scene model file. The large language model code generation module receives natural language requirements containing storage elements and their relationships, and generates executable procedural code that calls the declarative interface of the constraint-aware SSD. The constraint-aware SSD handles interface parameter verification, coordinate calculation, topological relationship mapping, and physical constraint processing. The deterministic execution sandbox loads the SSD in an isolated environment and executes the code, capturing code execution errors and error stack information. After successful code execution, the self-correcting loop module uses its built-in logic verifier to detect the path connectivity, physical distance between adjacent topological nodes, and coordinate overlap of the scene description data. If code execution fails or any detection fails, the self-correcting closed-loop module converts the relevant information into structured error information and feeds it back to the large language model code generation module. This module then generates corrected code based on the original natural language requirements, the current code, and the structured error information, triggering a deterministic execution sandbox for re-execution. This process is repeated until the code executes successfully and all detections pass, or until the preset maximum number of retries is reached. When the code executes successfully and all detections pass, the scene model generation module converts the scene description data into a scene model file that can be parsed by the discrete event simulation environment. Figure 1 The error feedback and iterative repair steps in the text represent the collaborative processing between the self-correcting closed-loop module and the large language model code generation module, and do not constitute a separate independent module.

[0019] The large language model code generation module receives natural language requirements from a warehousing scenario and generates executable procedural code for calling the declarative interface of a constraint-aware software development kit (SDK). This executable procedural code describes the warehousing scenario construction logic using the calling parameters and order of the declarative interface, and does not internally perform specific coordinate calculations for warehousing scenario elements. The declarative interface is a program call interface that declares scenario construction operations through instruction names, element types, and related parameters, and whose underlying spatial calculations are performed by the SSD. The executable procedural code is program code containing such interface call instructions and their execution order. The user-input natural language requirements include at least one element from the following: shelves, aisles, path nodes, automated guided vehicle network, platforms, and workstations, as well as the relationships between these elements. The large language model code generation module has a built-in application prompt template, which includes the calling specifications of the declarative interface, code format requirements, and few-sample examples for mapping between natural language requirements and executable procedural code. The few-sample examples are used to demonstrate the mapping relationship between scene element types, element quantities, relative layout relationships, and topological connection relationships in natural language requirements and declarative interface call parameters and call order. Before generating executable procedural code, the large language model code generation module first generates a layout planning result containing the warehouse scene element types, element quantities, relative layout relationships, and topological connection relationships. Then, it generates executable procedural code based on this layout planning result, thereby achieving the separation of spatial logic planning and underlying spatial calculation. In specific implementation, the sampling temperature of the code generation model is... It means that among them Sampling parameters to control the randomness of the generation process; robustness test scenarios can be configured as follows: The production environment can be configured as follows: .

[0020] The constraint-aware software development kit (SDK) is used to validate the call parameters of declarative interfaces and, based on the validated call parameters, deterministically perform coordinate calculations, topological relationship mapping, and physical constraint processing in the warehousing domain to generate scene description data. The physical constraints in the warehousing domain include feature spacing constraints, path connectivity constraints, and coordinate overlap prohibition constraints. In this embodiment, the constraint-aware SSD includes a data validation layer and a semantic execution layer. The data validation layer is a schema layer built on a data model validation framework, used to perform data type checks and range boundary verification according to the parameter model corresponding to the declarative interface. After the call parameters are validated by the data validation layer, the semantic execution layer parses the coordinate origin parameters, feature spacing parameters, and topological relationship parameters, and generates the spatial coordinates and topological connectivity relationships of the warehousing scene elements according to preset coordinate mapping rules, feature spacing conversion rules, and topological relationship mapping rules. The generated spatial coordinates and topological connectivity relationships are used to form the scene description data. The declarative interface includes at least a mesh generation interface and a connectivity rule definition interface. The input parameters of the mesh generation interface include the number of rows. Column number and physical step size ,in For the number of grid rows, For the number of grid columns, The physical spacing between adjacent grid nodes; data verification layer verification. , It is an integer and satisfies , and , The preset safety distance threshold is greater than zero, and in a specific implementation configuration it is... The input parameters of the connectivity rule definition interface include an edge rule object, which includes the source node type, target node type, bidirectional connectivity identifier, and distance constraint parameters. The semantic execution layer parses the edge rule object and generates topological connection relationships according to preset topological relationship mapping rules.

[0021] In a conventional implementation based on a Cartesian grid, the coordinate mapping rule takes the origin, row index, column index, and physical step size as input. The product of the row index and the physical step size is superimposed onto the first horizontal coordinate of the origin, and the product of the column index and the physical step size is superimposed onto the second horizontal coordinate of the origin to determine the spatial coordinates of the corresponding warehouse scene elements. In the above coordinate mapping, the first and second horizontal coordinates respectively satisfy... and ;in, , They represent the first line, number The first and second horizontal coordinates of the column grid nodes , These represent the first and second horizontal coordinates of the origin, respectively. , These are the valid row index and column index, respectively. The physical step size of adjacent grid nodes; the feature spacing conversion rule converts the feature spacing parameters into the same length unit for use in the coordinate calculation; the topology mapping rule establishes unidirectional or bidirectional connections between nodes that satisfy the distance constraint parameters based on the source node type, target node type, and bidirectional connectivity identifier in the edge rule object.

[0022] The scene description data adopts a graph structure, including at least node identifiers, node types, spatial coordinates, and connections between nodes. The scene model generation module standardizes the field types and formats in the scene description data according to the data fields and serialization formats required for a discrete event simulation environment. (Number of rows) Number of columns A positive integer, physical step size It is a positive number.

[0023] The deterministic execution sandbox is used to load constraint-aware software development kits and execute procedural code in an isolated execution environment, capturing code execution errors and their error stack information. The deterministic execution sandbox employs a restricted environment construction strategy, allowing only procedural code to call constraint-aware software development kits and security-enabled runtime libraries on a pre-defined whitelist, and prohibiting file read / write operations and network access, thereby ensuring the security of code execution. The deterministic execution sandbox is configured with a resource limit monitoring mechanism to monitor code execution time. and memory usage When satisfied or The code execution is terminated, and the corresponding resource exceedance error is reported back to the self-correcting closed-loop module. The time elapsed since the code was run. The amount of memory occupied by the code. To preset the runtime threshold, for example, it can be set to... ; To preset the memory usage threshold, for example, it can be set to... .

[0024] The self-correcting closed-loop module incorporates a logic verifier, which performs path connectivity detection, physical distance detection between adjacent topology nodes, and coordinate overlap detection on the scene description data after successful execution of the executable procedural code. Specifically, the logic verifier determines the connectivity of the path network based on the path nodes and their inter-node connections in the scene description data, and calculates the physical distance between two adjacent topology nodes specified by the connection relationships. ,in and These are the indices of the two nodes in the node set. This represents the actual physical distance between the two nodes. The preset maximum allowable physical distance; when The connection corresponding to the time marker does not meet the distance constraint. The logic validator is also used to detect whether the spatial coordinates of different warehousing scene elements overlap, and when it identifies path disconnection, physical distance between adjacent topological nodes exceeding the preset maximum allowable distance threshold, or coordinate overlap, it generates semantic verification failure information containing error type, error location, and violated physical constraint rules. When a code execution error occurs or any detection fails, the self-correcting closed-loop module converts the code execution error, error stack information, or verification failure information generated by any failed detection into structured error information and feeds it back to the large language model code generation module. The code execution error includes syntax errors, interface call errors, and logical conflict errors generated during the execution of executable procedural code. The structured error information includes at least the error type and error location, and includes the violated physical constraint rules when there is a physical constraint violation. The self-correcting closed-loop module is also used to extract the error type and error location from the system log, extract the violated physical constraint rules when there is a physical constraint violation, remove redundant log content unrelated to error repair from the information to be fed back, write the extracted information into a preset error repair prompt word template, and then feed it back to the large language model code generation module.

[0025] The preset maximum allowable distance threshold The distance constraint parameters in the connectivity rule definition interface are determined, and the same length unit as the spatial coordinates is used. For node pairs with adjacent topological relationships in the scene description data, the distance constraint parameters are determined by the connectivity rule definition interface, and the unit of length is the same as that of the spatial coordinates. and These represent the indices of the two nodes in the node pair, both of which are valid indices from the node set in the scene description data; the logic verifier calculates the Euclidean distance between the nodes based on their spatial coordinates. ,in For nodes With nodes The actual physical distance between them Set the maximum allowed physical distance for the node to connect, and compare the two.

[0026] The large language model code generation module generates corrected executable procedural code based on natural language requirements, the current executable procedural code, and structured error information, and drives the deterministic execution sandbox to re-execute. The self-correcting closed-loop module sets the maximum number of retries. and current number of retries ,in Indicates the maximum number of repair retries allowed. This indicates the number of times a fix and re-execution have been completed. Each time a code fix triggered by an error feedback is completed and re-executed, the current retry count is incremented. Add 1. When the current execution or detection fails and meets the requirements... When this happens, the system continues to perform code repair and re-execution; when the current execution or detection fails and meets the requirements... When the system terminates the iteration and outputs a failure report, the maximum number of retries can be set to... Through automated iteration of the self-correcting closed-loop module, a self-correcting closed loop is formed until the code executes successfully and the logic verifier passes the test.

[0027] The maximum number of retries A positive integer, representing the current number of retries. It is a non-negative integer; before the first execution of the executable procedural code, it is set to... And after each code fix and re-execution triggered by error feedback, Increase by 1.

[0028] The scenario model generation module converts scenario description data into a scenario model file that can be parsed by the discrete event simulation environment after successful code execution and logic verifier verification. Upon receiving the scenario description data, this module performs format standardization processing to generate a native format file adapted to downstream discrete event simulation applications.

[0029] In another embodiment of this application, the aforementioned automatic modeling system further includes a discrete event simulation module. This module is used to load the standardized scene model file output by the scene model generation module and construct a dynamic simulation scene of discrete events in warehousing operations based on user-set simulation parameters. This discrete event simulation module is built on a simulation framework and can be developed using a specialized simulation development toolkit, such as the SimPy simulation library. Users can customize the simulation parameters through the system's client or web-based control area. These simulation parameters include the number of automated guided vehicles (AGVs), cargo turnover rate, and operation time thresholds. For example, in a specific production environment application, the default number of AGVs is set to 5, and the driving speed is... The goods turnover rate is set to 20 orders per hour, and the operation time threshold is set to... The discrete event simulation module simulates the dynamic process of automated guided vehicle (AGV) scheduling and cargo handling. After the simulation, it statistically analyzes and outputs the throughput, equipment utilization, and bottleneck node locations, and displays the results in the form of visual charts such as bar charts, line charts, or heat maps, providing data support for the optimal allocation of warehousing resources and the verification of robot scheduling.

[0030] To enable adjustments and dynamic optimization of warehouse layout, this automated modeling system also features secondary simulation and scheme comparison capabilities. Specifically, the system caches detected scenario description data and corresponding scenario model files. When the large language model code generation module receives scenario adjustment instructions input by the user in natural language—for example, the user inputs optimization requirements based on the first round of simulation results, such as adding a fast lane, reducing two automated guided vehicles, or adding an auxiliary workstation next to a specific bottleneck workstation—the large language model code generation module generates adjusted executable procedural code based on the locally cached scenario description data. Subsequently, the deterministic execution sandbox and self-correcting closed-loop modules re-execute and test the adjusted executable procedural code to ensure the adjusted scenario meets the execution and testing conditions. After successful code execution and passing the test, the scenario model generation module generates an adjusted scenario model file based on the latest scenario description data, and the discrete event simulation module loads this adjusted scenario model file for secondary simulation. Finally, the system compares and outputs the differences in throughput, congestion rates, and bottleneck node migration before and after the adjustment, thereby demonstrating the differences in topological bottlenecks and traffic flow performance before and after optimization, and verifying the scenario optimization effect.

[0031] In another embodiment of this application, to provide a visual aid presentation method, the system further includes a graphics data conversion submodule. This submodule converts scene description data into a graph structure data file that the 3D visualization engine can parse, enabling the 3D visualization engine to generate a 3D visualization result of the warehouse scene. Specifically, after the scene model generation module converts the original scene description data into structured text, such as a JSON file, the graphics data conversion submodule can further convert the JSON file into a topological graph structure file, such as a GML file, for use by web-based 3D visualization tools compatible with this file format. The 3D visualization engine can use Three.js to display the 3D model of the warehouse scene in the output area of ​​the user interaction layer. This 3D visualization serves only as an auxiliary presentation of the simulation analysis results and does not affect the core computational function of discrete event simulation.

[0032] To ensure the collaboration and stable operation of the aforementioned modules in a warehousing scenario, this embodiment introduces a state machine state transition mechanism into the underlying architecture. Specifically, a closed-loop state machine containing generation nodes, execution nodes, and correction nodes is constructed using the graph structure proxy framework LangGraph. In terms of hardware deployment, the system can utilize a server equipped with two GPUs to deploy and run the code generation large language model. During local inference, tensor parallelism and quantization techniques are configured to reduce memory usage and improve code generation efficiency, adapting to the spatial topology generation task of nodes in a warehousing scenario. Regarding software environment configuration, the system's isolated execution environment uses the RestrictedPython framework to construct an isolated code execution environment. It integrates the basic graph theory network library NetworkX and the data visualization library Plotly to assist in graph structure construction and simulation graph generation, thereby automating and ensuring the safe operation of the modeling, error correction, and simulation processes. In summary, the automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop provided in this application, through the cooperation of a large language model code generation module, a constraint perception software development kit, a deterministic execution sandbox, a self-correcting closed loop module, and a discrete event simulation module, changes the processing method of directly generating static data. It entrusts spatial calculation and physical constraint verification to the deterministic constraint perception software development kit and sandbox environment, thereby automating the modeling, error correction, and simulation process and providing technical support for the digital modeling, resource optimization, and scenario adjustment of intelligent warehousing.

[0033] It should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. An automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop, characterized in that, include: The large language model code generation module transforms the natural language requirements of warehousing elements and their relationships into executable procedural code that calls the declarative interface of the constraint-aware software development kit; the declarative interface describes the scene construction with calling parameters and order, and the code does not calculate the scene coordinates itself; The constraint-aware software development kit verifies the type and range of the declarative interface parameters, and accordingly performs coordinate calculation, topology mapping, and constraint processing for feature spacing, path connectivity, and coordinate overlap prohibition, generating scene description data containing node identifiers, node types, spatial coordinates, and connection relationships. A deterministic execution sandbox is used to load the constraint-aware software development kit and execute the executable procedural code in an isolated environment, capturing code execution errors and error stack information. The self-correcting closed-loop module has a built-in logic verifier that detects the path connectivity, physical distance between adjacent topological nodes, and coordinate overlap of the scene description data after successful code execution. When an execution error occurs or a detection fails, the self-correcting closed-loop module writes the error type, error location, and constraint rules when physical constraints are violated as structured error information and feeds it back to the large language model code generation module. This module combines the original requirements, the current code, and the structured error information to generate repair code, triggering the deterministic execution sandbox to re-execute until execution is successful and all detections pass or the preset maximum number of retries is reached. After successful execution and all tests are passed, the scene model generation module converts the scene description data into a scene model file that can be parsed by the discrete event simulation environment.

2. The automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop as described in claim 1, characterized in that, The constraint-aware software development kit includes a data verification layer and a semantic execution layer. The data verification layer performs data type checks and value range verification according to the parameter model corresponding to the declarative interface. The semantic execution layer generates the spatial coordinates and topological connection relationships of the warehouse scene elements according to the coordinate origin, element spacing and topological relationship in the interface call parameters, and according to the preset coordinate mapping rules, spacing conversion rules and topological relationship mapping rules.

3. The automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop as described in claim 2, characterized in that, The declarative interface includes at least a mesh generation interface and a connectivity rule definition interface; The parameters for calling the mesh generation interface include the number of rows. Column number and physical step size ,in Indicates the number of rows in the grid. Indicates the number of columns in the grid. Represents the physical spacing between adjacent grid nodes; the data verification layer verifies... , It is an integer and satisfies , and ,in The preset safety distance threshold is greater than zero; The connectivity rule definition interface receives an edge rule object for defining connectivity conditions between nodes. The edge rule object includes source node type, target node type, bidirectional connectivity identifier, and distance constraint parameters.

4. The automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop as described in claim 1, characterized in that, The logic verifier is used for: Based on the path nodes and the connection relationships between nodes in the scenario description data, determine whether the path nodes are connected in the graph formed by the connection relationships. The indices of two adjacent topological nodes specified by the connection relationship in the scene description data are denoted as... , Calculate the Euclidean distance between the two nodes based on the spatial coordinates. and the preset maximum allowable distance threshold Compare; when When the marker indicates that the connection does not satisfy the distance constraint, where , These are the indices of the two adjacent topological nodes, This represents the actual physical distance between the two nodes. The maximum physical distance allowed for the connection; Detect whether the spatial coordinates of elements in different warehousing scenarios overlap; When a path is found to be disconnected, the physical distance between nodes is greater than the maximum allowed distance threshold, or the coordinates overlap, a semantic verification failure message is generated that includes the error type, error location, and violated physical constraint rules.

5. The automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop as described in claim 1, characterized in that, The deterministic execution sandbox employs a restricted environment construction strategy, which ensures that the executable procedural code can only call the constraint-aware software development kit and the security basic runtime libraries in the preset whitelist, and prohibits file read / write operations and network access operations. The deterministic execution sandbox monitoring code has been running for a certain period of time. and memory usage ,when or The code execution is terminated, and a resource exceedance error is reported to the self-correcting closed-loop module. Indicates the execution time of the code. This indicates the amount of memory used by the code. To preset the running time threshold, This is a preset memory usage threshold.

6. The automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop as described in claim 1, characterized in that, The self-correcting closed-loop module converts the code execution error, the error stack information, or the verification failure information generated by the logic verifier into structured error information. The structured error information includes the error type and error location, and when a physical constraint violation occurs, it also includes the violated physical constraint rule. The self-correcting closed-loop module extracts the above information from the execution log of the deterministic execution sandbox or the detection result of the logic verifier, removes redundant log fields from the feedback information, writes it into the error repair prompt word template, and feeds it back to the large language model code generation module. The self-correcting closed-loop module is set to a maximum number of retries. and current number of retries ,in The maximum allowed number of retries, and must be a positive integer. The number of times error feedback has been fixed and re-executed is a non-negative integer, before the first execution. Each time a repair and re-execution is completed, Add 1; This round of execution or testing failed and Continue repairing and re-execution as needed; if this round of execution or testing fails and... Stop the iteration and output a failure report.

7. The automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop as described in claim 1, characterized in that, The large language model code generation module has a built-in application prompt word template, which includes the calling specifications, code format requirements and few sample examples of the declarative interface; the few sample examples are samples that demonstrate the mapping relationship between the natural language requirements of the warehousing scenario and the calling code of the declarative interface. The large language model code generation module is used to generate a layout planning result containing the type of warehouse scene elements, the number of elements, the relative layout relationship and the topological connection relationship before generating the executable procedural code, and then generate the executable procedural code based on the layout planning result.

8. The automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop as described in claim 1, characterized in that, The system also includes a discrete event simulation module, which is used to load the scenario model file and construct a dynamic simulation scenario of discrete events in warehousing operations based on simulation parameters; the simulation parameters include the number of automated guided vehicles, cargo turnover rate, and operation time threshold. The discrete event simulation module is used to simulate the dynamic process of automated guided vehicle scheduling and cargo handling, and outputs simulation analysis results of throughput, equipment utilization and bottleneck node location.

9. The automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop as described in claim 8, characterized in that, The scene model generation module caches the detected scene description data and its corresponding scene model file locally. The large language model code generation module is used to receive scene adjustment instructions in natural language form, and generate adjusted executable procedural code based on the cached scene description data and the scene adjustment instructions; The deterministic execution sandbox and the self-correcting closed-loop module are used to re-execute and test the adjusted executable procedural code; the scenario model generation module is used to convert the newly generated scenario description data into an adjusted scenario model file after the adjusted executable procedural code has been successfully executed and passed the test; the discrete event simulation module loads the adjusted scenario model file to perform secondary simulation and outputs the throughput difference before and after adjustment, the congestion rate comparison results, and the bottleneck node migration status.

10. The automatic modeling system for warehouse scenarios based on constraint perception and self-correcting closed loop as described in claim 1, characterized in that, The system also includes a graphics data conversion submodule, which is used to convert the scene description data into a graph structure data file that can be parsed by the 3D visualization engine, so that the 3D visualization engine can generate a 3D visualization result of the warehouse scene.

Citation Information

Patent Citations

  • Heterogeneous service system integration method and device based on large model, terminal and medium

    CN121858607A

  • Digital test scenario design method based on large model agent collaboration

    CN122197598A