Road generation method based on big data loading optimization data
The road generation method of frame loading and classification loading solves the performance bottleneck of Json data reading and parsing in traffic simulation, realizes efficient road generation, and improves the fluency and real-time performance of the system.
Patent Information
- Application Number
- CN202510684094.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-19
AI Technical Summary
Existing traffic simulation technology solutions have performance bottlenecks when reading and parsing Json data, especially in the case of large amounts of data, which leads to lags and delays when generating roads.
A road generation method based on big data loading and optimization data is adopted. Through frame loading and classification loading, the built-in Timer function and SpawnCountFrame method of UE5 are used to control the generation cycle of data and models and reduce the calculation pressure of a single frame.
It significantly improves the speed of data loading and parsing, avoids lag, improves the smoothness and real-time performance of generated roads, and enhances the user experience.
Smart Images

Figure CN120670046A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of road model generation, and in particular to a road generation method based on big data loading and optimization data. Background Art
[0002] Dynamic road generation is a key research area in traffic simulation. Collected road data, including but not limited to intersection basic datasets, non-motorized lane basic data, pedestrian data, parking lot data, road markings, turn signs, street tree locations, and traffic light locations, is typically converted into JSON format for easy storage and transmission. The system then dynamically generates the corresponding road model by reading and parsing the JSON data.
[0003] However, existing technical solutions face significant performance bottlenecks when reading and parsing JSON data. Since JSON data is typically in text format, the reading and parsing process consumes significant CPU resources, especially when the data volume is large, where loading and parsing speeds can drop significantly. Furthermore, once the data is loaded, the system needs to generate a large number of road models based on this data, a process that also consumes significant computing resources, leading to issues such as lag and delays when generating roads. Summary of the Invention
[0004] The purpose of the present invention is to provide a road generation method based on big data loading and optimization data, which can solve the problem that existing traffic simulation technology solutions often cannot meet the requirements of real-time and smoothness in actual applications during actual use.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A road generation method based on big data loading and optimization data includes the following steps:
[0007] Step 1: Load data in frames according to data type;
[0008] Step 2: Determine whether data loading is complete;
[0009] Step 3: Generate the corresponding model based on the loaded data frame;
[0010] Step 4: Determine whether the model is completed;
[0011] Step 5: When the models corresponding to all types of data are loaded, the road generation is completed;
[0012] The road data collected in step 1 are drawn from three parts: points, lines, and surfaces.
[0013] Preferably, in step 2, if it is determined that the data loading is not complete, the process returns to step 1 to continue loading the data in frames; if it is determined that the data loading is complete, step 3 is executed to generate the corresponding model in frames according to the loaded data.
[0014] Preferably, in step 2, the reading time can be set by the Timer function built into UE5, and then the SpawnCountFrame method bound to the Timer function is set to set the number of single generation to determine the data reading cycle until all the data are loaded.
[0015] Preferably, in step 4, if it is determined that the model has not been produced, the process returns to step 3, and generates a corresponding model according to the loaded data frames. If it is determined that the data loading is completed, step 5 is executed to generate the road.
[0016] Preferably, in step 4, the loaded road segment data structure array variable is looped, and the structure contains the vertex position, triangle vertex and UV of each point.
[0017] Preferably, the patch components are added according to the road segment data in step 4, and the corresponding materials are set at the same time.
[0018] Preferably, in step 5, it is determined whether the generated model is in the screen space. If so, it is displayed; otherwise, it is hidden.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] In the present invention, by distributing the data loading and model generation processes into multiple frames, the system can process only a small amount of data and models in each frame, thereby reducing the computational pressure of a single frame, avoiding lag, and avoiding processing a large amount of data and models at one time.
[0021] The present invention can improve loading efficiency by classifying and loading data according to its type; especially when the amount of data is large, the speed of data loading and parsing can be significantly improved by frame loading and classification loading. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 It is the algorithm flow chart of the present invention. DETAILED DESCRIPTION
[0024] Hereinafter, only certain exemplary embodiments are briefly described. As will be appreciated by those skilled in the art, the described embodiments may be modified in various ways without departing from the spirit or scope of the embodiments of the present invention. Therefore, the drawings and description are to be regarded as illustrative in nature and not restrictive.
[0025] In the description of the embodiments of the present invention, it should be understood that the terms "length", "vertical", "horizontal", "top", "bottom", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the embodiments of the present invention.
[0026] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0027] In the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "installed," "connected," "connected," "fixed," etc. should be understood in a broad sense. For example, they may refer to fixed connection, detachable connection, or integration; mechanical connection, electrical connection, or communication; direct connection or indirect connection through an intermediate medium; internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in the embodiments of the present invention based on specific circumstances.
[0028] In the embodiments of the present invention, unless otherwise expressly specified or limited, a first feature being "above" or "below" a second feature may include the first and second features being in direct contact, or may include the first and second features being in contact not directly but through another feature between them. Moreover, a first feature being "above," "above," and "above" a second feature includes the first feature being directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below," "below," and "below" a second feature includes the first feature being directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature.
[0029] The disclosure below provides many different embodiments or examples for implementing different structures of the embodiments of the present invention. In order to simplify the disclosure of the embodiments of the present invention, the components and configurations of specific examples are described below. Of course, these are merely examples and are not intended to limit the embodiments of the present invention. In addition, the embodiments of the present invention may repeat reference numerals and / or reference letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or configurations discussed.
[0030] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0031] See Figure 1 This embodiment discloses a road generation method based on big data loading and optimization data, comprising the following steps:
[0032] Step 1: Load data in frames according to data type;
[0033] Step 2: Determine whether data loading is complete;
[0034] Step 3: Generate the corresponding model based on the loaded data frame;
[0035] Step 4: Determine whether the model is completed;
[0036] Step 5: When the models corresponding to all types of data are loaded, the road generation is completed;
[0037] The road data collected in step 1 are drawn from three parts: points, lines, and surfaces.
[0038] In this embodiment, the data collected in step 1 can be roughly divided into basic road segment datasets, advanced intersection datasets, road segment visualization datasets, non-motorized vehicle lane basic datasets, lane datasets, marking visualization datasets, intersections connecting road segments, roadside parking space visualization datasets, parking lot visualization datasets, slope visualization datasets, basic intersection datasets, intersection visualization datasets, intersection marking visualization datasets, intersection fill pattern datasets, intersection stop marking datasets, sidewalk datasets, non-motorized vehicle lane medians, motor vehicle lane medians, roadside trees, streetlights, turn signs, etc. Each type of data corresponds to a structure. In the UE5 (Unreal Engine 5) editor, data can be read frame by frame through frame loading, and the collected road data can be drawn from three parts: points, lines, and surfaces. The present invention is suitable for scenarios of large-scale road generation and can effectively solve the performance bottleneck problem of existing technical solutions when processing large-scale data.
[0039] Preferably, if it is determined in step 2 that the data loading is not complete, the system returns to step 1 to continue loading the data frame by frame. If it is determined that the data loading is complete, step 3 is executed to generate the corresponding model based on the loaded data frame by frame. Through frame loading technology, the system can process a small amount of data and model in each frame, thereby reducing the computing pressure of a single frame and avoiding lag.
[0040] Among them, in step 2, the reading time can be set through the built-in Timer function of UE5, and then the SpawnCountFrame method bound to the Timer function is set; the SpawnCountFrame is a key method for controlling the loading / generation of data or model frames. This method is used in conjunction with the Timer system to implement frame processing through timed callbacks, set the number of single generations, and determine the data reading cycle until all data are loaded. The specific method for controlling the number of single generations is as follows:
[0041] S1: Initial value setting: Set reasonable default values according to data complexity (10-20 for simple models and 3-5 for complex models);
[0042] S2: Performance monitoring: real-time monitoring of frame time and dynamic adjustment of the number of generated frames;
[0043] S3: Priority distinction: important data is loaded first, and a larger generation volume can be set;
[0044] S4: Memory considerations: Balance generation speed and memory usage to avoid memory peaks.
[0045] The number of single spawns is set through the UE5 built-in Timer function and the SpawnCountFrame method bound to the Timer function, which has the following functions:
[0046] Frame processing mechanism: Spread the loading of large amounts of data or the generation of models across multiple game frames to avoid single-frame lag;
[0047] Performance optimization tools: Maintain smooth game operation by controlling the amount of data processed per frame. Progressive loading system: Enable gradual visualization of data to improve user experience.
[0048] By using the Timer function and the SpawnCountFrame method bound to the Timer function to implement frame loading and classified loading, the system can significantly improve the speed of data loading and parsing.
[0049] For further optimization, if it is determined in step 4 that the model has not been produced, the process returns to step 3, and the corresponding model is generated based on the loaded data frame. If it is determined that the data loading is complete, step 5 is executed to generate the road. In this step 3, the time for model generation can be set through the Timer function built into UE5, and the number of single generations can be set by setting the SpawnCountFrame method bound to the Timer function to determine the model generation cycle until all data is generated through frame loading technology. In actual applications, when loading data and producing the corresponding model, the model of the main road body can be generated first, and then other models such as street lights and telephone poles around the road can be generated. This allows the effect of the road theme to be seen in the early stages of model production, improving the user experience.
[0050] As a further optimization, in step 4, the loaded segment data structure array variable is looped. The structure contains the vertex position, triangle vertices, and UVs of each point. In this embodiment, the segment data structure array variable is read entirely using a for loop, where the loop starts at subscript 0 and continues until the number of arrays is reached.
[0051] The existing patch components are added and generated based on the road segment data from step 4, and the corresponding materials are set at the same time. The patch components are drawn based on each triangle. Each triangle vertex has three data points: position, vertex, and UV coordinates. The vertex positions (Vertex Positions), triangle indices (TriangleIndices), and UV coordinates are the three core data elements for building a 3D model mesh. Together, they define the model's geometry and texture mapping relationships.
[0052] Further optimization is done by determining in step 5 whether the generated model is in screen space. If so, it is displayed; otherwise, it is hidden. By controlling the visibility of the model, the system can decide whether to draw the model based on whether it is in screen space, thereby improving rendering efficiency.
[0053] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A road generation method based on big data loading and optimization data, characterized by: The following steps are involved: Step 1: Load data in frames according to data type; Step 2: Determine whether data loading is complete; Step 3: Generate the corresponding model based on the loaded data frame; Step 4: Determine whether the model is completed; Step 5: When the models corresponding to all types of data are loaded, the road generation is completed; The road data collected in step 1 are drawn from three parts: points, lines, and surfaces.
2. The road generation method based on big data loading and optimization data according to claim 1 is characterized by: If it is determined in step 2 that the data loading is not complete, the process returns to step 1 to continue loading the data in frames. If it is determined that the data loading is complete, the process executes step 3 to generate the corresponding model in frames according to the loaded data.
3. The road generation method based on big data loading and optimization data according to claim 2 is characterized by: In step 2, the reading time can be set through the built-in Timer function of UE5, and then the SpawnCountFrame method bound to the Timer function is set to set the number of single spawns to determine the data reading cycle until all the data is loaded.
4. The road generation method based on big data loading and optimization data according to claim 1 is characterized in that: If it is determined in step 4 that the model has not been produced, the process returns to step 3, and generates a corresponding model based on the loaded data frames. If it is determined that the data loading is complete, the process executes step 5 to generate a road.
5. The road generation method based on big data loading and optimization data according to claim 4 is characterized in that: In step 4, the loaded road segment data structure array variable is looped. The structure contains the vertex position, triangle vertex and UV of each point.
6. The road generation method based on big data loading and optimization data according to claim 5 is characterized in that: Add patch components according to the road segment data in step 4 and set the corresponding materials at the same time.
7. The method for generating roads based on loading optimized data with big data according to claim 6, characterized in that: In step 5, it is determined whether the generated model is in the screen space. If so, it is displayed; otherwise, it is hidden.
Citation Information
Patent Citations
Large-scale three-dimensional model rendering method, device, system and storage medium
CN109377554A
Simulation scene three-dimensional road automatic construction method and device
CN112989568A
Data processing method, client and electronic equipment
CN113515556A
Urban road plane intersection signal timing optimization and simulation method
CN118230572A
Method for creating road for aerial view video based map, and computer program recorded on record-medium for executing method therefor
KR102694566B1