Simulation scene construction method and device in target environment

By analyzing and building simulation scenarios in the target environment, the problem that simulation scenario construction in the existing technology depends on specific software is solved, the efficiency and flexibility of scene configuration are improved, and scene file analysis and preview in different environments are realized.

CN119292957APending Publication Date: 2025-01-10CHINA AUTOMOTIVE INNOVATION CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411218371.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Existing simulation scenario construction relies on specific simulation software or tools, resulting in limitations in applications for technicians and poor flexibility in scenario construction.

Method used

Provide a simulation scenario construction method in the target environment. By obtaining the scene construction file and compiling it into a lightweight parsing program, the simulation scenario is parsed and constructed in the target environment, and the acquisition of scene parameters and the generation of scene elements is realized, and it supports it in different environments. Perform parsing and previewing of scene files.

Benefits of technology

Improves the flexibility of scene file parsing and preview, enhances the efficiency and accuracy of scene configuration, and reduces dependence on independent simulation software or tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292957A_ABST
    Figure CN119292957A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automatic driving, in particular to a simulation scene construction method and device in a target environment, computer equipment, a storage medium and a computer program product. The method comprises the following steps: in response to a preview request of a user for a simulation scene, obtaining a scene construction file of the simulation scene to be constructed; obtaining a target analysis function library used for analyzing the scene construction file, and compiling the target analysis function library into a lightweight analysis program matched with a target environment; analyzing the scene construction file by applying the lightweight analysis program in the target environment to obtain scene parameters of the simulation scene; and constructing the simulation scene in the target environment based on the scene parameters. By adopting the method, the scene file can be analyzed and previewed in a specific software environment, so that the efficiency and accuracy of scene configuration are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of autonomous driving technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for constructing a simulation scene in a target environment. Background Art

[0002] Autonomous driving scenario construction refers to the evaluation of the performance and safety of the autonomous driving system by simulating and reproducing various driving scenarios during the development and testing of autonomous driving technology. The purpose of autonomous driving scenario construction is to create a realistic and diverse test environment to simulate various traffic conditions and driving challenges, including different road types, traffic flow, weather conditions, road signs and signal lights. By building various scenarios, the perception, decision-making and control capabilities of the autonomous driving system can be fully tested and verified. Autonomous driving scenario construction usually uses a combination of simulation technology and real-life scenario acquisition. Among them, simulation technology can generate various driving scenarios through computer simulation, including virtual roads, vehicles, pedestrians and other traffic participants. By testing in a virtual environment, the performance and safety of the autonomous driving system can be quickly and safely evaluated. Autonomous driving scenario construction is crucial to the development and testing of autonomous driving technology. Through comprehensive and diverse scenario construction and testing, the performance and safety of the autonomous driving system can be improved, and potential risks and the possibility of accidents can be reduced. At the same time, scenario construction can also help optimize the algorithm and decision logic of the autonomous driving system and improve driving efficiency and comfort.

[0003] In the related art, the configuration files of the autonomous driving simulation scene are usually saved in a specific format, such as XML, JSON or YAML. These configuration files contain various parameters and properties of the scene, such as road layout, vehicle model, sensor configuration, etc. To render and display the configuration files of the autonomous driving simulation scene, corresponding simulation software or tools can be used. These simulation software or tools usually provide a visual interface that can load and parse the configuration files and render the scene into a graphical scene model.

[0004] However, the following technical problems exist in the current simulation scene construction:

[0005] The current simulation scenario construction relies on specific simulation software or tools, which leads to limitations in the application of technicians and poor flexibility in scenario construction. Summary of the invention

[0006] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for constructing a simulation scene in a target environment, which can parse and preview scene files in a specific software environment, thereby improving the efficiency and accuracy of scene configuration.

[0007] In a first aspect, the present application provides a method for constructing a simulation scene in a target environment. The method comprises:

[0008] In response to a user's request for previewing a simulation scene, obtaining a scene construction file of the simulation scene to be constructed;

[0009] Acquire a target parsing function library for parsing the scenario construction file, and compile the target parsing function library into a lightweight parsing program adapted to a target environment;

[0010] Applying the lightweight parser to parse the scenario construction file in the target environment to obtain scenario parameters of the simulation scenario;

[0011] The simulation scenario is constructed in the target environment based on the scenario parameters.

[0012] In one embodiment, in response to a user's request for previewing a simulation scene, obtaining a scene construction file of the simulation scene to be constructed includes:

[0013] In response to a user's preview request for the simulation scenario, sending the preview request to a target data platform, wherein the preview request includes a description file of the simulation scenario;

[0014] The scenario construction file responded by the target data platform is obtained by the target data platform determining the scenario parameters according to the description file and then calling a preset generalization script to process the scenario parameters into a target format.

[0015] In one embodiment, the applying the lightweight parser in the target environment to parse the scenario construction file to obtain the scenario parameters of the simulation scenario includes:

[0016] Reading the scene construction file into the memory space of the target environment, and generating the scene parameters corresponding to the scene construction file;

[0017] And / or, obtaining a file stream of the scene construction file, reading a data block from the file stream, parsing the data block, and obtaining the scene parameter.

[0018] In one embodiment, the acquiring the file stream of the scene construction file, reading the data block from the file stream, parsing the data block, and obtaining the scene parameter comprises:

[0019] The memory space capacity of the target environment is obtained, and the reading speed of the data block is determined according to the memory space capacity.

[0020] In one embodiment, constructing the simulation scene in the target environment based on the scene parameters includes:

[0021] Acquire object properties of scene elements in the simulation scene based on the scene parameters;

[0022] A target scene element is generated according to the object attribute, and the target scene element is added to the scene background.

[0023] In one embodiment, after constructing the simulation scene in the target environment based on the scene parameters, the method further includes:

[0024] In response to the user's interactive operation in the target environment, the simulation scene is displayed and adjusted, and the display adjustment includes one or more of camera angle adjustment, light intensity adjustment, and scene size adjustment.

[0025] In a second aspect, the present application also provides a device for constructing a simulation scene in a target environment. The device comprises:

[0026] A file request module, configured to obtain a scene construction file of the simulation scene to be constructed in response to a user's request for previewing the simulation scene;

[0027] A program compiling module, used for obtaining a target parsing function library for parsing the scenario construction file, and compiling the target parsing function library into a lightweight parsing program adapted to a target environment;

[0028] A file parsing module, used for applying the lightweight parsing program in the target environment to parse the scenario construction file to obtain scenario parameters of the simulation scenario;

[0029] A scene construction module is used to construct the simulation scene in the target environment based on the scene parameters.

[0030] In one embodiment, the file request module includes:

[0031] A preview request module, configured to respond to a user's preview request for the simulation scenario and send the preview request to a target data platform, wherein the preview request includes a description file of the simulation scenario;

[0032] The data generalization module is used to obtain the scenario construction file responded by the target data platform. The scenario construction file is obtained by the target data platform determining the scenario parameters according to the description file and calling a preset generalization script to process the scenario parameters into the target format.

[0033] In one embodiment, the file parsing module includes:

[0034] A complete parsing module, used for reading the scene construction file into the memory space of the target environment, and generating the scene parameters corresponding to the scene construction file;

[0035] And / or, a stream processing module, used to obtain a file stream of the scene construction file, read a data block from the file stream, parse the data block, and obtain the scene parameter.

[0036] In one embodiment, the stream processing module includes:

[0037] The reading speed setting module is used to obtain the memory space capacity of the target environment and determine the reading speed of the data block according to the memory space capacity.

[0038] In one embodiment, the scene construction module includes:

[0039] An object property module, used for acquiring object properties of scene elements in the simulation scene based on the scene parameters;

[0040] The element assembly module is used to generate a target scene element according to the object attributes and add the target scene element to the scene background.

[0041] In one embodiment, after the scene construction module, it also includes:

[0042] The scene adjustment module is used to perform display adjustment on the simulation scene in response to the user's interactive operation in the target environment, wherein the display adjustment includes one or more of camera angle adjustment, light intensity adjustment, and scene size adjustment.

[0043] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in the method for constructing a simulation scene in a target environment as described in any one of the embodiments in the first aspect are implemented.

[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a method for constructing a simulation scene in a target environment as described in any one of the embodiments in the first aspect.

[0045] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in the method for constructing a simulation scene in a target environment as described in any one of the embodiments in the first aspect are implemented.

[0046] The above-mentioned method, device, computer equipment, storage medium and computer program product for constructing a simulation scene in a target environment can achieve the following beneficial effects corresponding to the technical problems in the background technology by deducing the technical features in the claims:

[0047] When configuring the simulation scene, firstly, according to the user's preview request for the simulation scene, the scene construction file of the simulation scene is obtained. At this time, the scene construction file is in a readable state by the simulation software. In order to run in the target environment, the target parsing function library for parsing the scene construction file can be obtained, and the target parsing function library can be compiled into a lightweight parsing program, so that the scene construction file is parsed by the lightweight parsing program to obtain the scene parameters, and finally the simulation scene is constructed in the target environment through the scene parameters. In implementation, by compiling the target parsing function library into a lightweight parsing program, it is helpful to parse the scene construction file in different target environments through the lightweight parsing program, so as to obtain the scene parameters for practical application and scene construction, replacing the solution that needs to use independent simulation software or tools to process the scene construction file, so that the scene construction file can be parsed and constructed in a specific environment, such as a web environment, which improves the flexibility of scene file parsing and previewing, and enhances the efficiency and accuracy of scene configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] FIG1 is an application environment diagram of a simulation scene construction method in a target environment according to an embodiment;

[0049] Figure 2 A schematic diagram of a first process of a method for constructing a simulation scene in a target environment in an embodiment;

[0050] Figure 3 A second flow chart of a method for constructing a simulation scene in a target environment in another embodiment;

[0051] Figure 4 A third flow chart of a method for constructing a simulation scene in a target environment in another embodiment;

[0052] Figure 5 A fourth flow chart of a method for constructing a simulation scene in a target environment in another embodiment;

[0053] Figure 6 A fifth flow chart of a method for constructing a simulation scene in a target environment in another embodiment;

[0054] Figure 7 A sixth flow chart of a method for constructing a simulation scene in a target environment in another embodiment;

[0055] Figure 8 A structural block diagram of a simulation scene construction device in a target environment in an embodiment;

[0056] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] In the related art, the configuration files of the autonomous driving simulation scene are usually saved in a specific format, such as XML, JSON or YAML. These configuration files contain various parameters and properties of the scene, such as road layout, vehicle model, sensor configuration, etc. To render and display the configuration files of the autonomous driving simulation scene, corresponding simulation software or tools can be used. These simulation software or tools usually provide a visual interface that can load and parse the configuration files and render the scene into a graphical scene model.

[0059] However, the following technical problems exist in the current simulation scene construction:

[0060] The current simulation scenario construction relies on specific simulation software or tools, which leads to limitations in the application of technicians and poor flexibility in scenario construction.

[0061] Based on this, a method for constructing a simulation scene in a target environment provided by an embodiment of the present application can be applied to an application environment as shown in Figure 1. Among them, the terminal 102 communicates with the background server 104 through a network. The data storage system can store the data that the background server 104 needs to process. The data storage system can be integrated on the background server 104, or it can be placed on the cloud or other network servers. Specifically, the terminal 102 can send a preview request of the simulation scene to the background server 104, and the background server 104 can respond to a specific file to the terminal 102 according to the received preview request, so that the terminal 102 completes the construction of the simulation scene. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0062] In one embodiment, Figure 2 As shown, a method for constructing a simulation scene in a target environment is provided, and the method is applied to the terminal in FIG1 as an example for explanation, including the following steps:

[0063] Step 202: In response to a user's request to preview a simulation scene, a scene construction file of the simulation scene to be constructed is obtained.

[0064] The scenario construction file may refer to a file used to describe the configuration content of the simulation scenario, and may be a file that complies with the opendrive standard, such as an xodr file.

[0065] Exemplarily, the terminal may obtain a preview request from a user for a simulation scene, and send demand information for building a simulation request to a background server according to the preview request, thereby obtaining a scene building file corresponding to the simulation scene to be built fed back by the background server.

[0066] Step 204: Obtain a target parsing function library for parsing the scenario construction file, and compile the target parsing function library into a lightweight parsing program adapted to the target environment.

[0067] Among them, the target parsing function library may refer to a function library used to convert a file in a specific format to another format so as to read the information in the file. The target parsing function library may be tinyXML2, etc. Specifically, tinyXML2 refers to a small XML parser that can convert xodr files into object objects in the application for subsequent visualization of threejs content. Compilation may refer to a process for converting a specific code from source code (such as a high-level language) to target code (such as machine code). A lightweight parser may refer to an application program that has the same functions as the target parsing function library but is supported in a specific code form. In this embodiment, based on the need to adapt to the operation in the target environment, a lightweight parser may refer to a small code-scale program adapted to the target environment, such as the wasm program.

[0068] Exemplarily, after obtaining the scene construction file, the terminal can obtain a target parsing function library that can parse the scene construction file. Taking the scene construction file in this embodiment as an xodr file as an example, the tinyXML2 function library can be compiled into a wasm program, that is, a lightweight parsing program, through the WebAssembly compiler tool chain.

[0069] Step 206: Apply the lightweight parser in the target environment to parse the scenario construction file to obtain scenario parameters of the simulation scenario.

[0070] Among them, scene parameters can refer to parameters used to describe static scene information in the simulation scene, such as road width, number of lanes, lane line type, road signs, lane direction, central isolation zone type, road surface flatness and other scene information.

[0071] Exemplarily, the terminal may apply the compiled lightweight parsing program to parse the scene construction file to obtain the scene parameters of the simulation scene.

[0072] Step 208: Construct the simulation scenario in the target environment based on the scenario parameters.

[0073] Exemplarily, the terminal may construct a simulation scenario in a target environment according to the scenario parameters, and the target environment may refer to a web environment.

[0074] In the above-mentioned method for constructing a simulation scene in a target environment, reasonable deduction is performed in combination with the technical features in the embodiment, which can achieve the following beneficial effects of solving the technical problems raised in the background technology:

[0075] When configuring the simulation scene, firstly, according to the user's preview request for the simulation scene, the scene construction file of the simulation scene is obtained. At this time, the scene construction file is in a readable state by the simulation software. In order to run in the target environment, the target parsing function library for parsing the scene construction file can be obtained, and the target parsing function library can be compiled into a lightweight parsing program, so that the scene construction file is parsed by the lightweight parsing program to obtain the scene parameters, and finally the simulation scene is constructed in the target environment through the scene parameters. In implementation, by compiling the target parsing function library into a lightweight parsing program, it is helpful to parse the scene construction file in different target environments through the lightweight parsing program, so as to obtain the scene parameters for practical application and scene construction, replacing the solution that needs to use independent simulation software or tools to process the scene construction file, so that the scene construction file can be parsed and constructed in a specific environment, such as a web environment, which improves the flexibility of scene file parsing and previewing, and enhances the efficiency and accuracy of scene configuration.

[0076] In one embodiment, the Figure 3 As shown, step 202 includes:

[0077] Step 302: In response to a user's preview request for the simulation scenario, the preview request is sent to a target data platform, where the preview request includes a description file of the simulation scenario.

[0078] The preview request may refer to request data for describing a simulation scene requested by a user, and the preview request may include a description file corresponding to the simulation scene.

[0079] Exemplarily, the terminal may send a preview request to the target data platform in response to a user's request to preview the simulation scene.

[0080] Step 304: Obtain the scenario construction file responded by the target data platform, wherein the scenario construction file is obtained by the target data platform determining the scenario parameters according to the description file and then calling a preset generalization script to process the scenario parameters into a target format.

[0081] Among them, the generalized script can refer to a general script for processing data, which can process, convert and analyze different types of data according to specific needs.

[0082] For example, when the terminal requests a scene building file, the target data platform can read the scene parameters in the database and output the scene parameters in a specified format, such as a json file. Subsequently, the terminal can convert the json file into a xodr file through a python generalization script.

[0083] In this embodiment, generalizing the data responded by the background database helps to obtain a scene construction file in a unified format, thereby helping to improve the efficiency and accuracy of scene construction.

[0084] In one embodiment, Figure 4 As shown, step 206 includes:

[0085] Step 402: Read the scene construction file into the memory space of the target environment, and generate the scene parameters corresponding to the scene construction file.

[0086] Exemplarily, the terminal may read the scene construction file completely into the memory space of the target environment, thereby generating scene parameters that meet the requirements of the opendrivemap object.

[0087] Step 404: Obtain the file stream of the scene construction file, read the data block from the file stream, parse the data block, and obtain the scene parameter.

[0088] Exemplarily, the terminal may also process the scene construction file into a file stream, thereby reading data blocks from the file stream, parsing the data blocks, and obtaining scene parameters.

[0089] In this embodiment, the scene construction file can be parsed through a stream processing architecture, which helps to avoid the failure of scene construction file parsing due to memory space limitations of the target environment, thereby helping to improve the stability of scene construction file parsing.

[0090] In one embodiment, the Figure 5 As shown, step 404 includes:

[0091] Step 502: Obtain the memory space capacity of the target environment, and determine the reading speed of the data block according to the memory space capacity.

[0092] Exemplarily, during the stream processing, the terminal may obtain the memory space capacity of the target environment in advance, thereby determining the reading speed of the data block according to the memory space capacity.

[0093] In this embodiment, the reading speed of the data block is set according to the memory space capacity, which helps to reduce the possibility of content overflow, thereby improving the stability of data parsing.

[0094] In one embodiment, the Figure 6 As shown, step 208 includes:

[0095] Step 602: Obtain object properties of scene elements in the simulation scene based on the scene parameters.

[0096] The scene elements may refer to static objects existing in the simulation scene, such as roads, signboards, objects on the road surface, lane lines, etc.

[0097] Exemplarily, the terminal may read the scene parameters to extract object attributes of the scene elements therein, such as reflines attributes, road network attributes, roadmarks attributes, road objects attributes, lane outline attributes, and the like.

[0098] Step 604: Generate a target scene element according to the object attribute, and add the target scene element to the scene background.

[0099] Exemplarily, the terminal can generate target scene elements according to object properties and add the target scene elements to the scene background. Specifically, the reflines attribute can be read, the LineSegments module of threejs can be called to draw the scene reference lines, and then added to the scene; the road network attribute can be read, the geometry and mesh modules of threejs can be called to draw the road structure, and then added to the scene; the roadmarks attribute can be read, the geometry and mesh modules of threejs can be called to draw the road signs, and then added to the scene; the road objects attribute can be read, the geometry and mesh modules of threejs can be called to draw the objects on the road, and then added to the scene; the lane outline attribute can be read, the LineSegments module of threejs can be called to draw the lane lines, and then added to the scene. Finally, the construction of the simulation scene is completed.

[0100] In one embodiment, it can be Figure 7 As shown, after step 208, the following steps are also included:

[0101] Step 702: In response to the user's interactive operation in the target environment, the simulation scene is displayed and adjusted, wherein the display adjustment includes one or more of camera angle adjustment, light intensity adjustment, and scene size adjustment.

[0102] Exemplarily, the terminal may adjust the display parameters of the simulation scene in response to the user's interactive operation in the target environment, thereby achieving display adjustment in the page, and the display adjustment may include one or more of camera angle adjustment, light intensity adjustment, and scene size adjustment.

[0103] In this embodiment, the display adjustment process of the simulation scene can improve the flexibility of the simulation scene application.

[0104] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0105] Based on the same inventive concept, the embodiment of the present application also provides a device for constructing a simulation scene in a target environment for implementing the method for constructing a simulation scene in a target environment mentioned above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the device for constructing a simulation scene in a target environment provided below can refer to the limitations of the method for constructing a simulation scene in a target environment above, and will not be repeated here.

[0106] In one embodiment, Figure 8 As shown, a simulation scene construction device in a target environment is provided, comprising: a file request module, a program compilation module, a file parsing module and a scene construction module, wherein:

[0107] A file request module, configured to obtain a scene construction file of the simulation scene to be constructed in response to a user's request for previewing the simulation scene;

[0108] A program compiling module, used for obtaining a target parsing function library for parsing the scenario construction file, and compiling the target parsing function library into a lightweight parsing program adapted to a target environment;

[0109] A file parsing module, used for applying the lightweight parsing program in the target environment to parse the scenario construction file to obtain scenario parameters of the simulation scenario;

[0110] A scene construction module is used to construct the simulation scene in the target environment based on the scene parameters.

[0111] In one embodiment, the file request module includes:

[0112] A preview request module, configured to respond to a user's preview request for the simulation scenario and send the preview request to a target data platform, wherein the preview request includes a description file of the simulation scenario;

[0113] The data generalization module is used to obtain the scenario construction file responded by the target data platform. The scenario construction file is obtained by the target data platform determining the scenario parameters according to the description file and calling a preset generalization script to process the scenario parameters into the target format.

[0114] In one embodiment, the file parsing module includes:

[0115] A complete parsing module, used for reading the scene construction file into the memory space of the target environment, and generating the scene parameters corresponding to the scene construction file;

[0116] And / or, a stream processing module, used to obtain a file stream of the scene construction file, read a data block from the file stream, parse the data block, and obtain the scene parameter.

[0117] In one embodiment, the stream processing module includes:

[0118] The reading speed setting module is used to obtain the memory space capacity of the target environment and determine the reading speed of the data block according to the memory space capacity.

[0119] In one embodiment, the scene construction module includes:

[0120] An object property module, used for acquiring object properties of scene elements in the simulation scene based on the scene parameters;

[0121] The element assembly module is used to generate a target scene element according to the object attributes and add the target scene element to the scene background.

[0122] In one embodiment, after the scene construction module, it also includes:

[0123] The scene adjustment module is used to perform display adjustment on the simulation scene in response to the user's interactive operation in the target environment, wherein the display adjustment includes one or more of camera angle adjustment, light intensity adjustment, and scene size adjustment.

[0124] Each module in the above-mentioned device for constructing a simulation scene in a target environment can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0125] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for constructing a simulation scene in a target environment is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0126] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0127] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0128] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0129] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0130] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0131] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0132] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0133] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for constructing a simulation scene in a target environment, characterized in that: The method comprises: In response to a user's request for previewing a simulation scene, obtaining a scene construction file of the simulation scene to be constructed; Acquire a target parsing function library for parsing the scenario construction file, and compile the target parsing function library into a lightweight parsing program adapted to a target environment; Applying the lightweight parser to parse the scenario construction file in the target environment to obtain scenario parameters of the simulation scenario; The simulation scenario is constructed in the target environment based on the scenario parameters.

2. The method according to claim 1, characterized in that In response to the user's request for previewing the simulation scene, obtaining a scene construction file of the simulation scene to be constructed includes: In response to a user's preview request for the simulation scenario, sending the preview request to a target data platform, wherein the preview request includes a description file of the simulation scenario; The scenario construction file responded by the target data platform is obtained by the target data platform determining the scenario parameters according to the description file and then calling a preset generalization script to process the scenario parameters into a target format.

3. The method according to claim 1, characterized in that The step of applying the lightweight parser to the target environment to parse the scenario construction file to obtain the scenario parameters of the simulation scenario includes: Reading the scene construction file into the memory space of the target environment, and generating the scene parameters corresponding to the scene construction file; And / or, obtaining a file stream of the scene construction file, reading a data block from the file stream, parsing the data block, and obtaining the scene parameter.

4. The method according to claim 3, characterized in that The step of obtaining a file stream of the scene construction file, reading a data block from the file stream, parsing the data block, and obtaining the scene parameter includes: The memory space capacity of the target environment is obtained, and the reading speed of the data block is determined according to the memory space capacity.

5. The method according to any one of claims 1 to 4, characterized in that: The constructing the simulation scene in the target environment based on the scene parameters comprises: Acquire object properties of scene elements in the simulation scene based on the scene parameters; A target scene element is generated according to the object attribute, and the target scene element is added to the scene background.

6. The method according to claim 1, characterized in that After constructing the simulation scene in the target environment based on the scene parameters, the method further includes: In response to the user's interactive operation in the target environment, the simulation scene is displayed and adjusted, and the display adjustment includes one or more of camera angle adjustment, light intensity adjustment, and scene size adjustment.

7. A device for constructing a simulation scene in a target environment, characterized in that: The device comprises: A file request module, configured to obtain a scene construction file of the simulation scene to be constructed in response to a user's request for previewing the simulation scene; A program compiling module, used for obtaining a target parsing function library for parsing the scenario construction file, and compiling the target parsing function library into a lightweight parsing program adapted to a target environment; A file parsing module, used for applying the lightweight parsing program in the target environment to parse the scenario construction file to obtain scenario parameters of the simulation scenario; A scene construction module is used to construct the simulation scene in the target environment based on the scene parameters.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.