A method, apparatus, and storage medium for building a scene library.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2026-08-14
AI Technical Summary
然而FDS也存在很大局限性,如计算量大,数据处理效率不高,在处理大规模数据时,计算速度较慢,无法满足快速分析和决策的需求,并且由于FDS软件使用灵活性不强,难以适应不同用户的个性化需求和多样化的应用场景
Smart Images

Figure CN122574299A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and more specifically to a method, apparatus, and storage medium for constructing a scene library. Background Technology
[0002] Existing methods for predicting fires and explosions primarily rely on Fire Dynamics Simulator (FDS), which employs large eddy simulation (LED) to predict the behavior of fires and smoke, providing highly accurate simulation results. However, FDS also has significant limitations, such as high computational cost, low data processing efficiency, slow computation speed when handling large-scale data, and inability to meet the needs of rapid analysis and decision-making. Furthermore, the lack of flexibility in FDS software makes it difficult to adapt to the personalized needs of different users and diverse application scenarios. Summary of the Invention
[0003] The purpose of this invention is to provide a method, apparatus, and storage medium for constructing a scenario library. This method improves the efficiency and accuracy of fire and explosion scenario analysis, and provides strong support for accident prediction, emergency response, and safety assessment.
[0004] To achieve the above objectives, embodiments of the present invention provide a method for constructing a scene library, the method comprising:
[0005] An FDS scenario is constructed based on a target scenario, which includes multiple scenarios.
[0006] The FDS scenario is simulated to obtain simulation results, and the metadata information of the simulation results is obtained;
[0007] Generate a parameter configuration file for the simulation results based on project requirements;
[0008] The simulation results are extracted and transformed according to the parameter configuration file to obtain Feather format data corresponding to the target scene;
[0009] The Feather format data is filtered and converted based on the metadata information to obtain 3D point cloud data, and the 3D point cloud data is used to construct a scene library for the target scene.
[0010] Optionally, the FDS scenario is simulated to obtain simulation results, including:
[0011] Set the path and serial number of the simulation results;
[0012] The simulation results of the FDS scenario are obtained based on the path and working serial number of the simulation results.
[0013] Optionally, the target scenario is a fire and explosion scenario, and the input parameters of the target scenario include fire situation, smoke situation, personnel situation, ambient temperature, ambient wind speed and radiation intensity.
[0014] Optionally, the simulation results include smoke files, output files, scene setting files, and slice files;
[0015] The metadata information includes grid information, slice data information, source item parameters, and environment setting information of the spatial computing domain;
[0016] The metadata information for obtaining the simulation results includes:
[0017] The grid information of the spatial computing domain is determined based on the smoke file;
[0018] Based on the output file, determine the spatial cross-sectional information and physical quantity output information of the simulation results;
[0019] Determine the target scene information based on the scene setting file;
[0020] Slice data information is obtained from the slice file, and the slice data information is simulation three-dimensional simulation data.
[0021] Optionally, the parameter configuration file for generating the simulation results according to project requirements includes:
[0022] The accident scenario parameter information is determined based on project requirements. The accident scenario parameter information includes file path, physical quantity to be extracted, slice file range, and conversion result save path.
[0023] Update the parameter configuration file based on the accident scenario parameter information.
[0024] Optionally, the step of extracting and converting the simulation results according to the parameter configuration file to obtain the Feather format data corresponding to the target scene includes:
[0025] The simulation time step, physical quantity type, and mesh size are obtained according to the parameter configuration file, and the data range is determined according to the mesh size.
[0026] The data within the specified data range is parsed, classified, and sorted to obtain the physical output data for each frame within the simulation calculation domain;
[0027] The physical output data is sorted and transformed to obtain Feather format data.
[0028] Optionally, the step of parsing, classifying, and sorting the data within the data range to obtain the physical output data for each frame within the simulation computation domain includes:
[0029] Each data point is analyzed to obtain a decimal value;
[0030] The decimal values are classified according to the types of physical quantities to obtain classified data;
[0031] In chronological order, the physical output data of the classified data in the simulation calculation domain is obtained. The physical output data is the physical output data corresponding to the coordinates of the classified data in the simulation calculation domain. The physical output data includes at least concentration data, wind field data, pressure and temperature.
[0032] Optionally, the step of filtering and converting the Feather format data based on the metadata information to obtain 3D point cloud data includes:
[0033] Based on the metadata information, the data from the same time point in the Feather format data are categorized to obtain frame data;
[0034] The frame data is a nested list composed of spatial coordinate point data. The nested lists at the same time form the physical quantity distribution of all spatial coordinate points in the simulation calculation domain at that time.
[0035] The 3D point cloud data is determined based on the frame data within the simulation time.
[0036] On the other hand, the present invention also proposes an apparatus for constructing a scene library, the apparatus comprising:
[0037] The first processing module is used to construct an FDS scene based on a target scene, wherein the target scene includes multiple scenes;
[0038] The second processing module is used to simulate the FDS scenario to obtain simulation results and acquire metadata information of the simulation results;
[0039] The third processing module is used to generate parameter configuration files for the simulation results according to project requirements;
[0040] The fourth processing module is used to extract and transform the simulation results according to the parameter configuration file to obtain Feather format data corresponding to the target scene;
[0041] The fifth processing module is used to filter and convert the Feather format data according to the metadata information to obtain three-dimensional point cloud data, which is used to construct a scene library for the target scene.
[0042] Optionally, the simulation results include smoke files, output files, scene setting files, and slice files;
[0043] The metadata information includes grid information, slice data information, source item parameters, and environment setting information of the spatial computing domain;
[0044] The metadata information for obtaining the simulation results includes:
[0045] The grid information of the spatial computing domain is determined based on the smoke file;
[0046] Based on the output file, determine the spatial cross-sectional information and physical quantity output information of the simulation results;
[0047] Determine the target scene information based on the scene setting file;
[0048] Slice data information is obtained from the slice file, and the slice data information is simulation three-dimensional simulation data.
[0049] On the other hand, the present invention also proposes a method for predicting fire and explosion behavior, the method comprising obtaining a scenario library of the target scenario according to the above-described method for constructing a scenario library;
[0050] Predict the fire and explosion behavior of the target scene based on the scene library of the target scene.
[0051] On the other hand, the present invention also proposes a machine-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the method of constructing a scenario library or the method of predicting fire and explosion behavior as described above.
[0052] A method for constructing a scene library according to the present invention includes: constructing an FDS scene based on a target scene, wherein the target scene includes multiple scenes; simulating the FDS scene to obtain simulation results, and acquiring metadata information of the simulation results; generating a parameter configuration file for the simulation results according to project requirements; extracting and transforming the simulation results according to the parameter configuration file to obtain Feather format data corresponding to the target scene; filtering and transforming the Feather format data according to the metadata information to obtain three-dimensional point cloud data, and using the three-dimensional point cloud data to construct a scene library for the target scene. This method constructs an accident scene database by extracting and transforming FDS simulation data, enabling cross-platform operation of simulation data. It not only improves the storage and management efficiency of accident scene data but also allows users to access and analyze data more conveniently, breaking the limitations of traditional data processing on platforms, further improving the analysis efficiency and accuracy of fire and explosion scenarios, and providing strong support for accident prediction, emergency response, and safety assessment.
[0053] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0054] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:
[0055] Figure 1 This is a flowchart illustrating a method for constructing a scene library according to the present invention;
[0056] Figure 2 This is a flowchart illustrating one embodiment of the present invention;
[0057] Figure 3 This is a schematic diagram of a data flow according to the present invention;
[0058] Figure 4 This is a schematic diagram of an apparatus for constructing a scene library according to the present invention;
[0059] Figure 5 This is an internal structural diagram of a computer device according to an embodiment of this application.
[0060] Explanation of reference numerals in the attached figures
[0061] 400 - Devices for building scene libraries;
[0062] 401 - First Processing Module;
[0063] 402 - Second Processing Module;
[0064] 403 - Third Processing Module;
[0065] 404 - Fourth Processing Module;
[0066] 405 - Fifth processing module. Detailed Implementation
[0067] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0068] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with the relevant provisions of national laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0069] Example 1
[0070] Figure 1 This is a flowchart illustrating a method for constructing a scene library according to the present invention, as shown below. Figure 1 The method includes step S101 of constructing an FDS scene based on a target scene, wherein the target scene includes multiple scenes.
[0071] Specifically, the target scenario is a fire and explosion scenario, and the input parameters of the target scenario include fire conditions, smoke conditions, personnel conditions, ambient temperature, ambient wind speed, and radiation intensity.
[0072] Key parameters of the Fire Dynamics Simulator (FDS) include temperature, pressure, velocity, concentration, and radiation intensity. Changes in these parameters directly affect fire development and its impact on the surrounding environment. FDS combines energy and chemical reaction equations to simulate the combustion process. These equations are discretized on a computational grid and solved iteratively to predict fire development. Major inputs include the combustion environment, fuel, building materials, initial temperature, oxygen concentration, and ventilation conditions.
[0073] Step S102 involves simulating the FDS scenario to obtain simulation results and acquiring metadata information of the simulation results.
[0074] According to one specific implementation method, the FDS scenario is simulated to obtain simulation results, including: setting the path and working serial number of the simulation results; and obtaining the simulation results of the FDS scenario based on the path and working serial number of the simulation results.
[0075] Specifically, the simulation results include smoke files, output files, scene setup files, and slice files; the metadata information includes grid information of the spatial computing domain, slice data information, source term parameters, and environmental setting information. The simulation results specifically include information such as temperature distribution, flue gas flow, combustion products, and thermal radiation.
[0076] The process of obtaining metadata information for the simulation results includes: determining the grid information of the spatial computation domain based on the smoke file; determining the spatial cross-sectional information and physical quantity output information of the simulation results based on the output file; determining the target scene information based on the scene setting file; and obtaining slice data information based on the slice file, wherein the slice data information is simulation three-dimensional simulation data.
[0077] Step S103 is to generate a parameter configuration file for the simulation results according to project requirements.
[0078] According to one specific implementation, the step of generating the parameter configuration file for the simulation results based on project requirements includes: determining accident scenario parameter information based on project requirements, wherein the accident scenario parameter information includes file path, physical quantities to be extracted, slice file range, and conversion result save path; and updating the parameter configuration file based on the accident scenario parameter information.
[0079] Specifically, parameter configuration files can be configured automatically or manually. The automatic configuration method requires extracting accident scenario parameter information based on project needs. This information includes file paths, the physical quantities to be extracted, the slice file range, and the path to save the conversion results. The parameter configuration file is then updated based on this information. Manual updates configure the simulation data save path and output physical quantities according to project requirements.
[0080] Step S104 involves extracting and converting the simulation results according to the parameter configuration file to obtain Feather format data corresponding to the target scene. Feather is a data format used to store data frames.
[0081] According to one specific implementation, the step of extracting and converting the simulation results according to the parameter configuration file to obtain Feather format data corresponding to the target scene includes: obtaining the simulation time step, physical quantity type and grid size according to the parameter configuration file; determining the data range according to the grid size; parsing, classifying and sorting the data within the data range to obtain the physical output data of each frame in the simulation calculation domain; and sorting and converting the physical output data into columns to obtain Feather format data.
[0082] Specifically, the step of parsing, classifying, and sorting the data within the data range to obtain the physical output data for each frame in the simulation calculation domain includes: parsing each data point to obtain a decimal value; classifying the decimal values according to the type of physical quantity to obtain classified data; and obtaining the physical output data of the classified data in the simulation calculation domain in chronological order. The physical output data is the physical output data corresponding to the coordinates of the classified data in the simulation calculation domain, and the physical output data includes at least concentration data, wind field data, pressure, and temperature.
[0083] For example, the parameter configuration file of the accident scenario is read, and the data file output by the accident scenario is traversed according to the read parameter variables. The binary data in the file is read and converted into decimal data format. The binary file output by the simulation includes a file header and a data section. The file header contains metadata information, such as simulation time step, physical quantity type, and grid size. The data section stores the simulation results of each physical quantity, arranged in a specific order, and stored in standard single-precision floating-point (float32) format. The file header has a fixed length and includes the fields of simulation time step, physical quantity type, and grid size. The simulation time step represents the time interval of each frame of simulation and is stored as a 32-bit floating-point number. The physical quantity type identifies the type of physical quantity output by the simulation (such as temperature, pressure, etc.) and is represented by a 32-bit integer. The grid size describes the grid size in the simulation space in three directions (X, Y, Z), and each integer is stored as a 32-bit integer, representing the number of grids in that direction.
[0084] The data format is located after the file header information and consists of the specific numerical values of the simulation mesh data. The mesh data is stored in the following order: data is stored point-by-point in floating-point format (4 bytes) according to the order of the mesh points. Each physical quantity data segment corresponds to the physical quantity distribution of the entire 3D mesh, with a total size of "NX*NY*NZ*4" bytes. Each data point is stored in single-precision floating-point format.
[0085] Step S105 involves filtering and converting the Feather format data based on the metadata information to obtain 3D point cloud data, and then using the 3D point cloud data to construct a scene library for the target scene.
[0086] According to one specific implementation, the step of filtering and converting the Feather format data based on the metadata information to obtain 3D point cloud data includes: classifying data from the Feather format data at the same time point according to the metadata information to obtain frame data; the frame data is a nested list composed of spatial coordinate point data, and the nested lists at the same time point form the physical quantity distribution of all spatial coordinate points in the simulation computation domain at that time point; and determining the 3D point cloud data based on the frame data within the simulation time. The main characteristics of point cloud data are high precision, high resolution, and high-dimensional geometric information, which can intuitively represent the shape, surface, and texture of objects in space.
[0087] Specifically, by configuring physical quantity parameters, Feather data paths, and upper and lower limits of physical quantities, data affecting the accident scenario is filtered out. The Feather data is traversed chronologically, with data at the same time grouped into the same frame. Each spatial coordinate point in the frame is then converted into a list in chronological order, with each list representing a spatial coordinate data point. Each frame consists of multiple nested lists. Each frame of Feather data is read and converted into JSON format. Since each frame has the same time (t), the data is saved as a list in the order of x, y, z, t, qty, with each list representing the physical quantity changes at different spatial coordinate points at the same time. Multiple nested lists form the distribution of physical quantities at all spatial coordinate points within the entire simulation domain at that time.
[0088] Example 2
[0089] Figure 2 This is a flowchart illustrating one embodiment of the present invention, as shown below. Figure 2 As shown, the method includes the following steps: collecting and obtaining metadata from the FDS simulation result data; configuring the parameter file of the accident scenario simulation data; extracting and transforming the FDS simulation result data according to the parameter configuration file; and converting the Feather data into three-dimensional point cloud data.
[0090] This invention significantly improves data processing efficiency through automated configuration and optimized data extraction methods, increasing the speed of extracting useful information from CFD simulation data. This is particularly beneficial when processing large-scale grid data, reducing manual intervention and enhancing processing efficiency. Storing the processed data in Feather format not only reduces storage space usage but also improves data retrieval speed. Furthermore, storing scene description metadata in conjunction with simulation data facilitates subsequent analysis and retrieval. Sorting and filtering using spatial coordinate information ensures the accuracy of data transformation and effectively avoids the error accumulation problem in traditional methods. By generating 3D point clouds and JSON format from the transformed data, users can intuitively analyze key physical quantities in fire and explosion scenarios. This not only helps improve the accuracy of data analysis but also provides a more intuitive basis for accident prediction and analysis.
[0091] like Figure 3 As shown, the FDS simulation results are binary data. First, the simulation result files are traversed according to the data storage path to obtain metadata information describing the scene data. Second, the binary simulation data is read into decimal data, and the decimal encoded data is further converted into Feather data. At the same time, the Feather data is combined with the metadata to form Feather data containing metadata information. Finally, the user can select the parameters to filter the Feather data as needed and convert it into point cloud data.
[0092] Specifically, the process begins by reviewing the simulation database information and configuring the path and working serial number for the simulation results. Next, the smoke files are traversed to obtain the mesh generation information for the simulation data. Then, the output files are traversed to obtain the spatial cross-sectional information and physical quantity output information for the simulation data. The FDS scene setup files are traversed to obtain the basic data information for the simulation scene, and the slice files of all simulation data are traversed to obtain the three-dimensional simulation data output from the simulation. After collecting the above information, the metadata storage format is set to describe the accident scene overview. The metadata uses a dictionary key-value pair format and includes the following information: mesh information for the spatial computation domain (number of meshes, start and end positions in the x-direction, number of meshes, start and end positions in the y-direction, number of meshes, start and end positions in the z-direction, and total number of meshes), slice data information (physical quantity type and slice data range), and source terms and basic environmental settings (wind speed, wind direction, leaked substance, leakage rate, and simulation time).
[0093] The automatic configuration file needs to extract accident scenario parameter information according to the project's data requirements, including file path, physical quantities to be extracted, slice file range, conversion result save path, and update this information in the configuration file; the manual update of the accident scenario file configures the simulation data save path and output physical quantities and other information according to the actual needs of the project.
[0094] The extraction and transformation of CFD simulation results data according to the parameter configuration file includes: first, reading the accident scenario parameter configuration file; then, traversing the data files output by the accident scenario based on the read parameter variables; reading the binary data and converting it into decimal data format. The binary files output by the simulation consist of two parts: the file header contains metadata information, such as simulation time step, physical quantity type, mesh size, etc.; the data part is used to store the simulation results of each physical quantity, arranged in a specific order, and stored in standard single-precision floating-point (float32) format.
[0095] The file header has a fixed length and includes the simulation time step (representing the time interval between each simulation frame, stored as a 32-bit floating-point number), physical quantity type (identifying the type of physical quantity output in the simulation, such as temperature, pressure, etc., represented by a 32-bit integer), and mesh size (describing the mesh size in the simulation space in three directions (X, Y, Z), each stored as a 32-bit integer, with each integer representing the number of meshes in that direction). The data portion follows the header information and contains the specific numerical values of the simulation mesh data. The mesh data is stored in the following order: data is stored point-by-point in floating-point format (4 bytes) according to the order of the mesh points. Each physical quantity data segment corresponds to the physical quantity distribution of the entire 3D mesh, with a total size of "NX*NY*NZ*4" bytes. Each data point is stored in single-precision floating-point format.
[0096] This invention also provides a method for parsing the aforementioned binary file, comprising the following steps: reading the file header, obtaining the simulation time step, physical quantity type, and mesh size based on metadata information; calculating the number of data points based on the mesh size and reading the corresponding data from the file; parsing each data point using single-precision floating-point format and converting it to a decimal value; classifying the parsed data according to the type of physical quantity and storing it in nested lists in chronological order, each list representing the data of the physical quantity in the spatial computation domain at a certain moment; sorting the decimal data according to the time series by reading the spatial coordinate information and obtaining the physical output data of each frame in the simulation computation domain; sorting each frame of data by spatial coordinates (X,Y,Z), time (t), and physical quantity (qty), and converting it into a specific Feather data format. The Feather data primarily consists of a file header and data blocks. The file header contains X, Y, Z, t, and qty. Each data block is a list where X represents the coordinates in the x-direction, Y represents the coordinates in the y-direction, and Z represents the coordinates in the z-direction; t represents each time point within the simulation time; and qty represents the data distribution of the corresponding physical quantity. Each row in the Feather data represents the physical quantity value at a specific spatial coordinate point at a specific time. Finally, the Feather data is merged with the scene description metadata and stored in the database.
[0097] Feather data is converted into 3D point cloud data. By configuring physical quantity parameters, Feather data paths, and upper and lower limits of physical quantities, data that affects the accident scenario is filtered out. The Feather data is then traversed chronologically, with data at the same time grouped into the same frame. Each spatial coordinate point in the frame is sequentially converted into a list, with each list representing a spatial coordinate data point. Each frame is represented by a large nested list composed of multiple lists. Since the time (t) of each frame is the same, the data is saved as a list in the order of x, y, z, t, qty, with each list representing the physical quantity changes at different spatial coordinate points at the same time. Multiple nested lists form the physical quantity distribution of all spatial coordinate points within the entire simulation domain at that time. The above steps enable cross-platform extraction and conversion of FDS simulation data, efficiently establishing a hazardous chemical tank farm accident scenario library.
[0098] This invention significantly improves the speed of extracting useful information from FDS simulation data through automated configuration and optimized data extraction methods. In particular, it can reduce manual intervention and improve processing efficiency when processing large-scale grid data.
[0099] This invention also improves the accuracy of data conversion by storing the processed data in Feather format, which not only reduces storage space usage but also improves data retrieval speed. Simultaneously, it combines scene description metadata with simulation data for storage, facilitating subsequent analysis and retrieval. Sorting and filtering using spatial coordinate information ensures the accuracy of data conversion and effectively avoids the error accumulation problem in traditional methods. By generating 3D point clouds and JSON format from the converted data, users can intuitively analyze key physical quantities in fire and explosion scenarios. This not only helps improve the accuracy of data analysis but also provides a more intuitive basis for accident prediction and analysis.
[0100] Example 3
[0101] A small-hole leak accident on the safety valve of storage tank T-08A was selected as the target scenario. Simulation data was generated using FDS (Functional Data System). The working serial number of the FDS simulation data was stored in the database as a hash value for easy data retrieval and analysis. The ambient temperature of the tank area was set to 20℃, westerly winds with a wind speed of 2 m / s, and the leaking substance was set to 1,3-Butadiene. In this case, 1,3-Butadiene was set as the leaking substance name, min was set as the lower limit of the concentration displayed in the data, max was set as the upper limit of the concentration displayed in the data, index was set as the index time, and hash value was set as the working serial number. This simulation data was then processed to establish an accident scenario library.
[0102] Metadata information collected from the results of FDS simulations includes:
[0103] 1) Obtain the working serial number hash value by reading the .fds file through the accident scene file path.
[0104] 2) Based on the obtained file path information and hash value, read the .smv file to obtain the mesh size and number in the x direction of the spatial coordinates as 1m and 100, the mesh size and number in the y direction as 1m and 120, and the mesh size and number in the z direction as 1m and 50. The total number of meshes in the simulation calculation domain is 960,000.
[0105] 3) Read the .out file based on the obtained file path information and working serial number to obtain data from the z-direction section of the space section, ranging from 1 to 30m with a step size of 0.5m. The physical quantities to be output are named DENSITY for the concentration field and VELOCITY for the velocity field.
[0106] 4) Based on the obtained file path information and working serial number, read the .fds file to obtain the simulation duration of the accident scenario as 60s, wind speed as 2m / s, wind direction as westerly, leaking substance as 1,3-Butadiene, leak source item size as 64.73kg / s, and leak location as the top of the storage tank.
[0107] 5) The FDS simulation output data is mainly stored in the output slice file. The program traverses all .sf files to read the binary information in them. The number of output slice files is counted as 100. The output time information of physical quantities starts from 0s and ends at 60s, and outputs physical quantity data once every 0.2s.
[0108] Automatic configuration file or manual configuration of accident scenario file: The automatic configuration file method requires extracting the accident scenario parameter information according to the method described above and updating the accident scenario parameter information to the configuration file fdsConf.yaml; the manual configuration of the accident scenario file requires manually configuring the simulation data save path, output physical quantities, working serial number and other information according to the actual needs of the project.
[0109] Extract and transform CFD simulation results data based on parameter configuration files:
[0110] 1) This time, the working serial number hash value, DENSITY, and VELOCITY physical quantity information of the accident scenario were obtained from the parameter information in the acquired metadata. Based on the scenario data path, working serial number hash value, and physical quantity parameter variables, the main data files (.sf) output by the accident scenario were traversed, and the data storage file range of each physical quantity in the accident data was sorted out. The binary physical quantity data in the .sf file was read and converted into decimal data format for easy data operation and analysis.
[0111] 2) Read the spatial coordinate information from the .smv file, sort the physical quantity data according to the time series to obtain the physical output data of the spatial coordinates of each point in the simulation calculation domain as a function of time.
[0112] 3) By rearranging and combining each frame of data according to spatial coordinates, time and physical quantity data, all physical quantity data within the entire simulation time range can be obtained. Each column of the Feather data is named and arranged according to X, Y, Z, t, 1,3-Butadiene DENSITY. The data is saved in Feather data format using Python library functions.
[0113] 4) Add a column to the Feather data to add the scene description information metadata to the Feather data. This will give you Feather data containing metadata information. Each column of the Feather data is named X, Y, Z, t, 1, 3-Butadiene DENSITY, and metaData respectively. Then, the Feather data is named with the working serial number and stored in the database under a certain path of the system.
[0114] By configuring physical quantity parameters, data that affects the accident scenario is filtered out. Each frame in the feather data is read in chronological order and converted into JSON data. Since the time (t) of each frame is the same, the data is saved as a list in the order of x, y, z, t, 1, 3-Butadiene DENSITY. The physical quantities of multiple coordinate points in the spatial computing domain are saved as a nested list to represent the changes in physical quantities of each coordinate point in the spatial computing domain at the same time.
[0115] Under a certain path in the system, the interface receives the parameter information hash value to obtain the Feather data that needs to be converted. Based on the upper and lower limits of the substance concentration, the data that has an impact on the accident is filtered out and normalized. The filtered data is then traversed according to the time series to extract each frame of data in the spatial coordinates. Each frame of data is rearranged and combined according to the spatial coordinates, time, and physical quantity rules, and then saved as JSON data format with the working serial number.
[0116] In summary, extracting and transforming FDS simulation data allows for the construction of an accident scenario database, enabling cross-platform operation of the simulation data. This not only improves the storage and management efficiency of accident scenario data but also allows users to access and analyze data more conveniently, breaking the platform limitations of traditional data processing. Through this database, simulation data can flow seamlessly between different operating systems, further enhancing the analysis efficiency and accuracy of fire and explosion scenarios, and providing strong support for accident prediction, emergency response, and safety assessment.
[0117] Example 4
[0118] Figure 4 This is a schematic diagram of an apparatus for constructing a scene library according to the present invention, as shown below. Figure 4 As shown, the present invention also proposes an apparatus for constructing a scene library. The apparatus 400 for constructing a scene library includes: a first processing module 401, used to construct an FDS scene based on a target scene, wherein the target scene includes multiple scenes; a second processing module 402, used to simulate the FDS scene to obtain simulation results and acquire metadata information of the simulation results; a third processing module 403, used to generate a parameter configuration file for the simulation results according to project requirements; a fourth processing module 404, used to extract and convert the simulation results according to the parameter configuration file to obtain Feather format data corresponding to the target scene; and a fifth processing module 405, used to filter and convert the Feather format data according to the metadata information to obtain three-dimensional point cloud data, wherein the three-dimensional point cloud data is used to construct the scene library of the target scene.
[0119] The simulation results include a smoke file, an output file, a scene setup file, and a slice file; the metadata information includes the mesh information of the spatial computation domain, slice data information, source parameters, and environment setting information; obtaining the metadata information of the simulation results includes: determining the mesh information of the spatial computation domain based on the smoke file; determining the spatial cross-sectional information and physical quantity output information of the simulation results based on the output file; determining the target scene information based on the scene setup file; and obtaining slice data information based on the slice file, wherein the slice data information is simulation three-dimensional simulation data.
[0120] This device extracts and transforms FDS simulation data to construct an accident scenario database, enabling cross-platform operation of simulation data. This not only improves the storage and management efficiency of accident scenario data but also allows users to access and analyze the data more conveniently.
[0121] On the other hand, the present invention also proposes a method for predicting fire and explosion behavior, the method comprising: obtaining a scenario library of the target scenario according to the above-described method for constructing a scenario library; and predicting the fire and explosion behavior of the target scenario according to the scenario library of the target scenario.
[0122] A method for constructing a scene library according to the present invention includes: constructing an FDS scene based on a target scene, wherein the target scene includes multiple scenes; simulating the FDS scene to obtain simulation results, and acquiring metadata information of the simulation results; generating a parameter configuration file for the simulation results according to project requirements; extracting and transforming the simulation results according to the parameter configuration file to obtain Feather format data corresponding to the target scene; filtering and transforming the Feather format data according to the metadata information to obtain three-dimensional point cloud data, and using the three-dimensional point cloud data to construct a scene library for the target scene. This method constructs an accident scene database by extracting and transforming FDS simulation data, enabling cross-platform operation of simulation data. It not only improves the storage and management efficiency of accident scene data but also allows users to access and analyze data more conveniently, breaking the limitations of traditional data processing on platforms, further improving the analysis efficiency and accuracy of fire and explosion scenarios, and providing strong support for accident prediction, emergency response, and safety assessment.
[0123] This application provides a storage medium storing a program that, when executed by a processor, implements the above-described method for constructing a scenario library or for predicting fire and explosion behavior.
[0124] This application provides a processor for running a program, wherein the program executes the above-described method for building a scenario library or the method for predicting fire and explosion behavior.
[0125] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown in the figure, the computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05, and a memory (not shown) connected via a system bus. The processor A01 provides computing and control capabilities. The memory includes internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 stored in the non-volatile storage medium A06. The network interface A02 is used for communication with external terminals via a network connection. When the computer program is executed by the processor A01, it implements a method for building a scenario library or a method for predicting fire and explosion behavior. The display screen A04 can be a liquid crystal display (LCD) or an e-ink display. The input device A05 can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0126] This application provides an apparatus including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it describes a method for constructing a scenario library or a method for predicting fire and explosion behavior according to any embodiment of the present invention.
[0127] This application also provides a computer program product that, when executed on a data processing device, is adapted to execute a program that initializes a method for constructing a scenario library according to any embodiment of the present invention or a method for predicting fire and explosion behavior.
[0128] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0129] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0130] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.
[0132] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0133] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0134] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0135] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0136] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0137] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for constructing a scene library, characterized in that, The method includes: An FDS scenario is constructed based on a target scenario, which includes multiple scenarios. The FDS scenario is simulated to obtain simulation results, and the metadata information of the simulation results is obtained; Generate a parameter configuration file for the simulation results based on project requirements; The simulation results are extracted and transformed according to the parameter configuration file to obtain Feather format data corresponding to the target scene; The Feather format data is filtered and converted based on the metadata information to obtain 3D point cloud data, and the 3D point cloud data is used to construct a scene library for the target scene.
2. The method according to claim 1, characterized in that, The simulation results obtained by simulating the FDS scenario include: Set the path and serial number of the simulation results; The simulation results of the FDS scenario are obtained based on the path and working serial number of the simulation results.
3. The method according to claim 1, characterized in that, The target scenario is a fire and explosion scenario, and the input parameters of the target scenario include fire situation, smoke situation, personnel situation, ambient temperature, ambient wind speed and radiation intensity.
4. The method according to claim 1, characterized in that, The simulation results include smoke files, output files, scene setup files, and slice files; The metadata information includes grid information, slice data information, source item parameters, and environment setting information of the spatial computing domain; The metadata information for obtaining the simulation results includes: The grid information of the spatial computing domain is determined based on the smoke file; Based on the output file, determine the spatial cross-sectional information and physical quantity output information of the simulation results; Determine the target scene information based on the scene setting file; Slice data information is obtained from the slice file, and the slice data information is simulation three-dimensional simulation data.
5. The method according to claim 1, characterized in that, The parameter configuration file for generating the simulation results according to project requirements includes: The accident scenario parameter information is determined based on project requirements. The accident scenario parameter information includes file path, physical quantity to be extracted, slice file range, and conversion result save path. Update the parameter configuration file based on the accident scenario parameter information.
6. The method according to claim 1, characterized in that, The step of extracting and converting the simulation results according to the parameter configuration file to obtain the Feather format data corresponding to the target scene includes: The simulation time step, physical quantity type, and mesh size are obtained according to the parameter configuration file, and the data range is determined according to the mesh size. The data within the specified data range is parsed, classified, and sorted to obtain the physical output data for each frame within the simulation calculation domain; The physical output data is sorted and transformed to obtain Feather format data.
7. The method according to claim 6, characterized in that, The process of parsing, classifying, and sorting the data within the data range to obtain the physical output data for each frame in the simulation calculation domain includes: Each data point is analyzed to obtain a decimal value; The decimal values are classified according to the types of physical quantities to obtain classified data; In chronological order, the physical output data of the classified data in the simulation calculation domain is obtained. The physical output data is the physical output data corresponding to the coordinates of the classified data in the simulation calculation domain. The physical output data includes at least concentration data, wind field data, pressure and temperature.
8. The method according to claim 1, characterized in that, The step of filtering and converting the Feather format data based on the metadata information to obtain 3D point cloud data includes: Based on the metadata information, the data from the same time point in the Feather format data are categorized to obtain frame data; The frame data is a nested list composed of spatial coordinate point data. The nested lists at the same time form the physical quantity distribution of all spatial coordinate points in the simulation calculation domain at that time. The 3D point cloud data is determined based on the frame data within the simulation time.
9. An apparatus for constructing a scene library, characterized in that, The device includes: The first processing module is used to construct an FDS scene based on a target scene, wherein the target scene includes multiple scenes; The second processing module is used to simulate the FDS scenario to obtain simulation results and acquire metadata information of the simulation results; The third processing module is used to generate parameter configuration files for the simulation results according to project requirements; The fourth processing module is used to extract and transform the simulation results according to the parameter configuration file to obtain Feather format data corresponding to the target scene; The fifth processing module is used to filter and convert the Feather format data according to the metadata information to obtain three-dimensional point cloud data, which is used to construct a scene library for the target scene.
10. The apparatus according to claim 9, characterized in that, The simulation results include smoke files, output files, scene setup files, and slice files; The metadata information includes grid information, slice data information, source item parameters, and environment setting information of the spatial computing domain; The metadata information for obtaining the simulation results includes: The grid information of the spatial computing domain is determined based on the smoke file; Based on the output file, determine the spatial cross-sectional information and physical quantity output information of the simulation results; Determine the target scene information based on the scene setting file; Slice data information is obtained from the slice file, and the slice data information is simulation three-dimensional simulation data.
11. A method for predicting fire and explosion behavior, characterized in that, The method includes obtaining a scene library of the target scene according to the method for constructing a scene library according to any one of claims 1-8; Predict the fire and explosion behavior of the target scene based on the scene library of the target scene.
12. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the method for constructing a scenario library according to any one of claims 1 to 8 or the method for predicting fire and explosion behavior according to claim 11.