A method and system for modeling and managing Monte Carlo computational files based on a multi-tree structure

By using a multi-tree structure for Monte Carlo computation file modeling and management, a tree group structure is dynamically constructed, which solves the problems of logical organization and editing efficiency of Monte Carlo computation files. This achieves intuitive file presentation, data consistency, and format conversion, adapting to file processing needs of different scales.

CN121542228BActive Publication Date: 2026-04-03BELTECNO CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-15
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Monte Carlo calculation files lack an intuitive logical organization, have inconsistent file formats, are prone to errors in data association, and have low editing efficiency, especially in large and complex geometric models.

Method used

It adopts a multi-tree structure modeling and management method, dynamically constructs a tree group structure by parsing files, establishes a dynamic logical association mechanism, provides visual interactive functions and graphical editing tools, ensures data consistency, and supports the conversion of different file formats.

Benefits of technology

It achieves intuitive logical organization of files, ensures data consistency, improves editing efficiency, adapts to Monte Carlo files of different sizes, solves the problems of inconsistent formats and low editing efficiency, and improves user experience and calculation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542228B_ABST
    Figure CN121542228B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for modeling and managing Monte Carlo simulation files based on a multi-tree structure. By parsing Monte Carlo files and collecting scale characteristic data, the system determines the file size level based on a dynamic threshold system and dynamically constructs a tree group structure with scale self-adaptation and habit self-adaptation characteristics. It establishes a dynamic logical association and adaptive update mechanism between tree groups, achieving full-process dynamic adaptation including visual interaction, editing management, data consistency assurance, and cross-format conversion. This invention solves the problems of existing Monte Carlo simulation files, such as lack of intuitive logical organization, inconsistent formats, susceptibility to errors during modification, and low editing efficiency, improving the accuracy and convenience of file processing. It is suitable for modeling and managing large and complex geometric models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Monte Carlo computational file modeling and management technology, specifically relating to a Monte Carlo computational file modeling and management method and system based on a multi-tree structure. Background Technology

[0002] The Monte Carlo method is a commonly used numerical calculation method in fields such as nuclear physics, radiation protection, and nuclear reactor design. MCNP and RMC are two widely used Monte Carlo calculation programs. Monte Carlo calculation files contain complex information such as geometric model definitions, spatial transformation parameters, and material nuclear physical properties. The cells are defined using Boolean expressions, supporting the combination of multiple geometries into complex shapes through logical operations, and cells can be nested at a depth of 5-10 layers.

[0003] In existing technologies, the modeling and management of Monte Carlo computation files have the following significant drawbacks:

[0004] 1. Lack of intuitive logical organization: The geometric, spatial transformation, and material information in Monte Carlo calculation files are independent of each other and lack clear structured relationships, making it difficult for users to quickly understand the logical relationships between the parts;

[0005] 2. Inconsistent file formats: The file structures of MCNP and RMC programs differ, making the two file formats incompatible and increasing the complexity of cross-program computations;

[0006] 3. Data consistency is difficult to guarantee: When modifying files, due to the lack of effective correlation constraints between different parts of the information, data correlation errors or inconsistencies are likely to occur, which will affect the accuracy of subsequent calculations.

[0007] 4. Low editing efficiency: For large and complex geometric models and material information, existing editing methods lack targeted structured management tools, resulting in low efficiency in editing, verification and optimization. Summary of the Invention

[0008] Based on this, the present invention provides a method and system for modeling and managing Monte Carlo computation files based on a multi-tree structure, aiming to solve the technical problems existing in the Monte Carlo computation file processing technology, such as lack of intuitive logical organization, inconsistent file formats, easy errors in data association, and low editing efficiency.

[0009] A first aspect of this invention provides a method for modeling and managing Monte Carlo computational files based on a multi-tree structure, the method comprising:

[0010] The Monte Carlo calculation file is parsed, core data is extracted, and file size feature data is collected synchronously. The file size is determined based on a preset dynamic threshold system. The core data includes grid cells, macro-volumes, spatial transformation matrices, and material core physical properties.

[0011] Based on the file size, a tree group structure with self-optimization characteristics is dynamically constructed. The tree group structure consists of multiple trees with different functions, which respectively carry the parsing, management and editing of different dimensions of information in the file.

[0012] Establish a dynamic logical association mechanism between the trees in the tree group structure;

[0013] Based on the tree group structure, adaptive visual interactive functions are provided to support the intuitive presentation and operation of the core information of the file;

[0014] Based on the tree group structure and dynamic logical association mechanism, an adaptive graphical editing and management tool is provided.

[0015] Establish a dynamic data consistency assurance system that adaptively adjusts assurance strategies based on file characteristics and operational scenarios;

[0016] Based on the unified adaptability of the tree group structure, the mutual conversion of Monte Carlo calculation files in different formats can be realized.

[0017] Furthermore, the file size characteristic data includes basic size indicators, complexity indicators, and format characteristic indicators. The basic size indicators are the total number of raster cells, the total number of macro bodies, the total number of materials, and the number of displacement transformation matrices. The complexity indicators are the average nesting level of raster cells, the maximum number of references to macro bodies, and the material-raster cell association density. The format characteristic indicators are the original file format and whether it contains custom macro bodies / special materials.

[0018] Furthermore, the dynamic threshold system is a three-level threshold system, including a small file threshold, a medium file threshold, and a large file threshold. The small file threshold is defined as follows: total number of grid cells < 500, total number of macros < 200, total number of materials < 50, and average nesting level < 3. The medium file threshold is defined as follows: total number of grid cells 500-2000, total number of macros 200-500, total number of materials 50-100, and average nesting level 3-6. The large file threshold is defined as follows: total number of grid cells ≥ 2000, total number of macros ≥ 500, total number of materials ≥ 100, and average nesting level > 6. The dynamic threshold supports manual fine-tuning by the user.

[0019] Furthermore, based on the file size, a tree group structure with self-optimizing characteristics is dynamically constructed. This tree group structure consists of multiple functionally differentiated trees, each responsible for different dimensions of file information parsing, management, and editing. The dynamic construction of model trees, raster trees, macro trees, displacement trees, and material trees allows for the merging, independence, or splitting of tree nodes. Simultaneously, user-adaptive logic is embedded. The adaptive optimization of the model tree construction includes:

[0020] In small files, explicit grid nodes are tiled and implicit grid nodes are folded and integrated.

[0021] Medium-sized files are classified into primary categories of explicit raster cells based on spatial regions;

[0022] Large files are classified into two categories: spatial region and importance level, and region index nodes are generated.

[0023] Habit self-adaptation optimization includes recording users' visual operation habits, automatically restoring the view state, and highlighting frequently used operation nodes.

[0024] Furthermore, the adaptive optimization of the scale of the macro-tree construction includes:

[0025] Small files are merged with the displacement tree to form the base resource tree;

[0026] Medium-sized documents are classified into two categories: geometric type and citation popularity.

[0027] Large files are categorized into three levels: geometric type, application scenario, and citation popularity, and a macro-sized resource index table is generated.

[0028] Habit-based adaptive optimization includes recording the types of macros that users frequently create / reference, and automatically recommending and filling in commonly used parameters when creating a new macro.

[0029] Furthermore, in the step of establishing a dynamic logical association mechanism between trees in the tree group structure, a one-way dependency association rule is established between the tree groups. When the tree structure is adjusted, the association relationship is automatically reconstructed. When a node is modified or the structure is adjusted, the verification range is dynamically shrunk / expanded, triggering a linkage update. Specifically, in the tree merging scenario, the association relationship is automatically converted and the index is updated. In the tree splitting scenario, the association relationship is automatically sinked and the association trajectory is recorded. In large files, high-frequency access association relationships are kept in memory, and low-frequency association relationships are stored in the cache.

[0030] Furthermore, in the step of establishing a dynamic data consistency assurance system and adaptively adjusting the assurance strategy according to file characteristics and operation scenarios, small files undergo full verification, medium-sized files undergo layered verification, and large files undergo incremental verification plus key verification; version management adjusts the number of retained versions according to file size, and only important operation node versions are retained for large files, and supports visual comparison of version differences.

[0031] A second aspect of this invention provides a Monte Carlo computation file modeling and management system based on a multi-tree structure, used to implement the Monte Carlo computation file modeling and management method based on a multi-tree structure provided in the first aspect of this invention. The system includes:

[0032] The parsing module is used to parse the Monte Carlo calculation file, extract core data, synchronously collect file size feature data, and determine the file size based on a preset dynamic threshold system. The core data includes grid cells, macro-volumes, spatial transformation matrices, and material core physical properties.

[0033] The tree group construction module is used to dynamically construct a tree group structure with self-optimization characteristics based on the file size. The tree group structure consists of multiple trees with different functions, which respectively carry the parsing, management and editing of different dimensions of information in the file.

[0034] The first establishment module is used to establish a dynamic logical association mechanism between the trees in the tree group structure;

[0035] The visualization module is used to provide adaptive visualization and interactive functions based on the tree group structure, supporting the intuitive presentation and operation of the core information of the file;

[0036] The editing and management module is used to provide adaptive graphical editing and management tools based on the tree group structure and dynamic logical association mechanism.

[0037] The second module is used to establish a dynamic data consistency assurance system, which adaptively adjusts the assurance strategy according to file characteristics and operation scenarios.

[0038] The conversion module is used to convert between different formats of Monte Carlo calculation files based on the unified adaptation capability of the tree group structure.

[0039] A third aspect of the present invention provides a computer-readable storage medium, comprising:

[0040] The readable storage medium stores one or more programs that, when executed by a processor, implement the Monte Carlo computational file modeling and management method based on a multi-tree structure as described in the first aspect.

[0041] A fourth aspect of the present invention provides an electronic device, the electronic device including a memory and a processor, wherein:

[0042] The memory is used to store computer programs;

[0043] When the processor executes the computer program stored in the memory, it implements the Monte Carlo computation file modeling and management method based on a multi-tree structure as described in the first aspect.

[0044] The method and system for modeling and managing Monte Carlo computational files based on a multi-tree structure provided in this invention have the following beneficial effects:

[0045] 1. Strong adaptability: By using dynamic thresholds to drive the tree structure to "merge-independent-split", it perfectly adapts to small, medium and large Monte Carlo files, solving the problem of poor adaptability of fixed tree structures;

[0046] 2. Easy to operate: Deeply integrated with user operating habits, it enables personalized adaptation of view status, editing parameters, and shortcut processes, reducing learning and operation costs and improving user experience;

[0047] 3. Performance optimization: By employing load balancing strategies such as tiered caching, thread isolation, and dynamic resource allocation, the stuttering issues during the editing, visualization, and conversion of large files are resolved;

[0048] 4. Data reliability: When the tree structure is adjusted, the relationships are automatically reconstructed. Combined with dynamic verification and version management mechanisms, the data consistency is ensured to be unaffected by structural changes.

[0049] 5. Wide compatibility: Supports mainstream Monte Carlo file formats such as MCNP and RMC. Large file cross-format conversion supports breakpoint resume conversion, adapting to different engineering scenario needs. Attached Figure Description

[0050] Figure 1 This is a flowchart illustrating the implementation of a Monte Carlo computation file modeling and management method based on a multi-tree structure, as provided in Embodiment 1 of the present invention.

[0051] Figure 2 This is a structural block diagram of a Monte Carlo computational file modeling and management system based on a multi-tree structure, provided in Embodiment 2 of the present invention.

[0052] Figure 3 This is a structural block diagram of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation

[0053] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0054] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0056] Example 1

[0057] Embodiment 1 of this invention provides a method for modeling and managing Monte Carlo computational files based on a multi-tree structure. Please refer to [link to relevant documentation]. Figure 1 This is a flowchart of the implementation of a Monte Carlo computation file modeling and management method based on a multi-tree structure, specifically including steps S01 to S07.

[0058] Step S01: parse the Monte Carlo calculation file, extract core data, synchronously collect file size feature data, and determine the file size based on a preset dynamic threshold system. The core data includes grid cells, macro-volumes, spatial transformation matrices, and material core physical properties.

[0059] Specifically, four core data categories are extracted: grating elements (explicit / recessive), macro-volume, spatial transformation matrix, and material core physical properties. The standardized conversion between MCNP and RMC formats is completed. For example, the U-card and displacement parameters are unified into an affine transformation matrix, and the grating nesting level is identified.

[0060] During the parsing process, file size characteristic data is collected synchronously to provide a decision-making basis for subsequent dynamic tree construction. The collection dimensions include basic size indicators, complexity indicators, and format characteristic indicators. The basic size indicators are the total number of raster cells (explicit + implicit), the total number of macrobodies (basic bodies + surfaces), the total number of materials, and the number of displacement transformation matrices. The complexity indicators are the average nesting level of raster cells, the maximum number of references to macrobodies, and the material-raster cell association density (average number of associated raster cells per material). The format characteristic indicators are the original file format (MCNP / RMC) and whether it contains custom macrobodies / special materials.

[0061] Based on common industry model size classification standards, a three-level dynamic threshold (supporting manual user adjustment) is preset as the basis for judging the tree structure organization method. In this embodiment of the invention, the three-level threshold includes a small file threshold, a medium file threshold, and a large file threshold. The small file threshold is: total number of grid cells < 500, total number of macro cells < 200, total number of materials < 50, and average nesting level < 3. The medium file threshold is: total number of grid cells 500-2000, total number of macro cells 200-500, total number of materials 50-100, and average nesting level 3-6. The large file threshold is: total number of grid cells ≥ 2000, total number of macro cells ≥ 500, total number of materials ≥ 100, and average nesting level > 6. The dynamic threshold supports manual user adjustment.

[0062] Step S02: Based on the file size, dynamically construct a tree group structure with self-optimization characteristics. The tree group structure consists of multiple trees with different functions, which respectively carry out the parsing, management and editing of different dimensions of information in the file.

[0063] Specifically, the model tree, grid tree, macro tree, displacement tree, and material tree are dynamically constructed to realize the merging, independence, or splitting of tree nodes. At the same time, user habit self-adaptation logic is embedded. That is, based on the file feature analysis results of step S01, five core trees are dynamically constructed according to threshold levels. Each tree is embedded with underlying logic of scale self-adaptation and habit self-adaptation.

[0064] It's important to note that the model tree is only relevant to 3D model visualization. The root node is U0, and below U0 are the 3D model raster elements that make up the final display, also known as explicit raster elements. Here, the hierarchical tree nodes, in conjunction with the tree's right-click menu, can control the model's display, hiding, transparency, blurring, and other 3D manipulation effects. It is a key tree node for Monte Carlo file visualization operations. Meanwhile, the explicit raster child nodes describe the nesting relationships and geometric expression definitions between implicit raster elements. To modify the geometric expression and material information of the model tree, you can only do so through editing other tree nodes. The adaptive optimization of the model tree construction scale includes:

[0065] In small files, explicit grid nodes are tiled and implicit grid nodes are folded and integrated to avoid node redundancy;

[0066] Medium-sized files are classified into primary categories of explicit cells according to spatial regions (such as core area and shielding area), and implicit cells are expanded according to nesting levels;

[0067] Large files are classified into two levels: spatial region and importance level (calculating core cells / auxiliary cells), and region index nodes (such as "core region - core cell") are generated for fast location.

[0068] Habit-based adaptive optimization includes recording users' visual operation habits (such as frequently hiding certain types of raster elements and frequently using the "transparent" function), automatically restoring the view state, and highlighting frequently operated nodes.

[0069] The raster tree describes the entire raster structure of the Monte Carlo program's computation file, including the nesting relationships between explicit and implicit raster cells. Modifying this tree modifies the model tree. The scale-adaptive optimization of raster tree construction includes:

[0070] In small files, explicit / implicit cells are not distinguished; they are sorted by creation order, and nodes are labeled with "explicit / implicit" identifiers.

[0071] Medium-sized files are divided into two main branches: "explicit raster cells + implicit raster cells", and each branch is sorted according to the nesting level.

[0072] Large files are split into three levels of branches based on "explicit / implicit branches" and nesting depth ranges (1-3 levels, 4-6 levels, 7-10 levels). Each node is marked with "nesting level + number of referenced macros" and a nested logical index is generated (supporting searching by level and reference relationship).

[0073] In addition, when building large files, a segmented loading mechanism is adopted, loading the top-level nodes (levels 1-3) first, and loading the bottom-level nodes (levels 4 and above) asynchronously when the user expands the branch, thus avoiding initial build lag.

[0074] The macro-body tree describes all the basic bodies and surfaces in the file and forms the basis for geometric Boolean operations. Macro-body tree objects can be defined and referenced multiple times for Boolean operations. The adaptive optimization of macro-body tree construction includes:

[0075] Small files are merged with displacement trees to form the basic resource tree. Macro nodes are classified at the first level according to geometric type (polyhedron, surface), and displacement matrix nodes are mounted as transformation sub-nodes.

[0076] Medium-sized files retain an independent macro tree, which is classified into two levels: geometric type and citation popularity (high / medium / low citation). High-citation macros (citation count ≥ 10 times) are displayed at the top.

[0077] Large files are categorized into three levels: geometry type, application scenario (core, shield, support structure), and citation popularity, and a macro-level resource index table is generated (containing geometric parameters, citation count, and a list of associated cells), supporting fuzzy search.

[0078] The habit-adaptive optimization includes recording the macro types that users frequently create / reference (such as "cylindrical macros" commonly used in reactor models), automatically recommending and filling in commonly used parameters when creating a new macro. For example, it fills in commonly used geometric parameters (such as diameter and height range) by default.

[0079] The displacement tree describes the matrix cards for multiple affine transformations. By referencing these displacement cards, multi-element or macro-volume geometric transformations can be implemented. It is defined once and referenced multiple times, representing the fundamental information of the basic transformations. The scale-adaptive optimization of displacement tree construction includes:

[0080] Small files: merged into the basic resource tree and categorized as transformation child nodes according to transformation type (translation, rotation, scaling);

[0081] Medium-sized files: stand alone as a tree, classified into two levels according to "transformation type + number of associated objects" (single object / multiple object association);

[0082] Large files: Classified into three levels: "Transformation type + application scenario + number of associated objects", with node labels including "transformation parameter summary" (e.g., "translation X+5cm") and "number of associated cells / macrovolumes", supporting batch association filtering;

[0083] In addition, for large files, the data of frequently accessed displacement nodes is written to the secondary disk cache, while only the index is kept in memory and loaded on demand when the user accesses the file.

[0084] The material tree describes the core physical properties of cells. Each cell references a material number, meaning the current cell contains the physical properties of the referenced material. The scale-adaptive optimization of material tree construction includes:

[0085] Small files are categorized by element type (light elements / heavy elements) at the first level, with nodes annotating core attributes (e.g., "stainless steel - density 7.9 g / cm³"). 3 (”);

[0086] Medium-sized documents are classified into two levels: "element type + functional attribute" (structural materials / shielding materials / nuclear fuel materials);

[0087] Large files are classified into three levels: "element type + functional attribute + core cross section level" (high / medium / low absorption cross section), and a material property index is generated (supporting searching by density, core cross section, and elemental composition). The list of associated cells is sorted by "citation popularity".

[0088] The habit-adaptive optimization includes recording the material properties that users frequently edit (such as the "isotope abundance" and "temperature" parameters commonly used in nuclear fuel materials). The next time such a material is edited, the high-frequency property editing bar will be expanded by default, and the low-frequency properties will be hidden (but can be manually brought up).

[0089] Step S03: Establish a dynamic logical association mechanism between the trees in the tree group structure.

[0090] This involves establishing unidirectional dependency rules among tree groups, automatically reconstructing relationships when the tree structure is adjusted, and dynamically shrinking / expanding the verification scope when nodes are modified (e.g., macro parameter adjustments, material property changes) or structural adjustments are made (e.g., tree splitting due to file size upgrades). This verifies only the modified node and its directly related nodes (e.g., verifying the geometric compliance of cells referencing the macro when a macro parameter is modified, avoiding the time-consuming full verification), triggering linked updates. Linked updates related to the user's current operation (e.g., material property changes associated with a cell being edited) are executed first, while non-urgent updates (e.g., logging associations of low-frequency nodes) are executed asynchronously in the background.

[0091] Specifically, the unidirectional dependency rule of "model tree → raster tree → macro-tree / displacement tree / material tree" is maintained to ensure basic data consistency. It should be noted that when the tree structure is merged / split, the relationships are automatically reconstructed to avoid association failure. Understandably, in tree merging scenarios (such as macro-tree + displacement tree → basic resource tree in small files), the original relationships of "raster tree → macro-tree" and "raster tree → displacement tree" are automatically converted to "raster tree → basic resource tree (macro-tree branch / displacement branch)," with the association index updated synchronously and the original associated node IDs marked. In tree splitting scenarios (such as three-level classification of material trees in large files), the original relationship of "raster tree → first-level node of material tree" is automatically pushed down to the corresponding third-level node, generating association trajectory records (such as "raster 123 → material tree - heavy element - shielding material - high cross-section - lead"). In large files, frequently accessed relationships reside in memory, while low-frequency relationships are cached.

[0092] Step S04: Based on the tree group structure, provide adaptive visual interactive functions to support the intuitive presentation and operation of the core information of the file.

[0093] The view is synchronized with the dynamic tree structure, the display mode is optimized according to the file size, and a personalized visual operation interface is provided based on user habits. Specifically, when tree nodes are merged / split, the 3D view automatically adjusts the display grouping (e.g., after the macro-body tree and displacement tree are merged, the macro-body and transformation trajectory in the view are displayed in a unified group according to the basic resources); small files display all raster elements by default, medium files display by default by default by region grouping, and large files display only core region raster elements by default. Users can quickly switch the display range through tree nodes; in addition, the system records the user's commonly used visualization perspective (e.g., the "top view" commonly used in core models) and display parameters (e.g., transparency level, color coding rules), which are automatically restored the next time the file is opened.

[0094] For large file interactions, hierarchical scaling is supported. When zooming to the overall view, area groups are displayed, and when zooming to a local area, detailed raster / macro volume is displayed. Shortcuts for frequently used operations can also be set. Understandably, based on user habits, a floating bar of frequently used functions (such as the frequently used "raster highlight", "material property view", and "nested relationship expansion") can be added to the visualization interface, which is linked to the right-click menu of tree nodes. During visualization rendering, nodes visible in the current view are rendered first, and the rendering accuracy of invisible nodes is reduced to avoid lag caused by full high-precision rendering.

[0095] Step S05: Based on the tree group structure and dynamic logical association mechanism, provide an adaptive graphical editing and management tool.

[0096] Specifically, differentiated editing interface layouts are designed according to file size, the editing process is optimized based on user habits, and load balancing is achieved through dynamic resource allocation. For small files, a single-window integrated layout is used, with the merged tree structure (such as the basic resource tree) and the visual view displayed on the same screen, and the operation buttons are simplified (only core editing functions are retained); for medium-sized files, a dual-window layout is used, with a tree structure area on the left (independent trees sorted by usage frequency) and an editing + visualization area on the right; for large files, a multi-window draggable layout is used, supporting the free splitting and combination of the tree structure area, editing area, visualization area, and index area to meet complex editing needs.

[0097] In the process of optimizing editing workflows, shortcut operations can be optimized by recording frequently used editing processes (such as "create macro body → associate displacement → bind material → reference to grid cell"), generating custom shortcut workflows, and triggering multi-step operations with one click; default parameters can be filled in, that is, for frequently edited node types (such as shielded material, cylindrical macro body), historical commonly used parameters (such as material density, macro body size tolerance) can be automatically filled in, supporting one-click modification; and operation memory function can also be added, that is, recording the last unfinished editing task of the user (such as unsaved material property modifications), automatically prompting and restoring the editing state when the file is opened again.

[0098] In the process of achieving load balancing during editing through dynamic resource allocation, for dynamic resource allocation, CPU / memory usage is monitored in real time when editing large files. When the usage exceeds 70%, the priority of non-core tasks (such as historical version backups and low-frequency node caching) is automatically reduced to prioritize the current editing operation. For batch operation optimization, when editing large files in batches (such as batch material replacement and batch displacement application), a "segmented execution + background asynchronous processing" approach is adopted, displaying a progress bar and an interrupt button to avoid operation blocking. In addition, node data that is frequently edited (such as commonly used materials and core macros) resides in the first-level memory cache and is directly called during editing to reduce data reading time.

[0099] Step S06: Establish a dynamic data consistency assurance system and adaptively adjust the assurance strategy according to file characteristics and operation scenarios.

[0100] Specifically, small files undergo full verification (quick completion), medium-sized files undergo hierarchical verification (core nodes are verified first, then auxiliary nodes), and large files undergo "incremental verification + key verification" (only modified nodes and associated nodes are verified, with core cells / materials undergoing additional key verification). When merging / splitting tree structures, the verification rules are automatically adjusted (e.g., the associated verification rules for merging trees are merged into basic resource associated verification, and the verification rules for splitting trees are split into independent verification rules for the corresponding subtrees).

[0101] In addition, the number of versions to retain is adjusted according to the file size, with only versions of important operation nodes retained for large files; when retracing versions, only the data of changed nodes is restored, and version differences can be visualized and compared.

[0102] Step S07: Based on the unified adaptation capability of the tree group structure, realize the mutual conversion of Monte Carlo calculation files of different formats.

[0103] Specifically, based on the current tree structure organization method (merging / splitting), the syntax rules of the target file format (MCNP / RMC) are automatically matched. For example, the merged basic resource tree data is automatically split and mapped into macro cards and displacement cards of the target format during conversion.

[0104] When converting large files, a "segmented conversion + background execution" approach is adopted. Core node data (such as raster cells and core materials) is converted first, followed by auxiliary node data, generating a conversion progress report and supporting resume from where interrupted. Furthermore, when converting large files, CPU resources are prioritized for the conversion task, pausing non-urgent tasks such as tree node caching and visualization rendering. Temporary data generated during the conversion process is stored in the disk cache and automatically cleaned up after the conversion is completed to avoid consuming memory.

[0105] In summary, the present invention proposes a method for modeling and managing Monte Carlo simulation files based on a multi-tree structure. This method parses Monte Carlo files and collects scale feature data, determines the file size level based on a dynamic threshold system, and dynamically constructs a tree group structure with scale self-adaptation and habit self-adaptation characteristics. It establishes a dynamic logical association and adaptive update mechanism between tree groups, achieving full-process dynamic adaptation including visual interaction, editing management, data consistency assurance, and cross-format conversion. This invention solves the problems of existing Monte Carlo simulation files, such as lack of intuitive logical organization, inconsistent formats, susceptibility to errors during modification, and low editing efficiency, improving the accuracy and convenience of file processing. It is suitable for modeling and managing large and complex geometric models.

[0106] Example 2

[0107] Embodiment 2 of the present invention provides a Monte Carlo computational file modeling and management system 200 based on a multi-tree structure. Please refer to [link / reference]. Figure 2 This is a structural block diagram of a Monte Carlo computation file modeling and management system based on a multi-tree structure. The Monte Carlo computation file modeling and management system 200 based on a multi-tree structure includes:

[0108] The parsing module 21 is used to parse the Monte Carlo calculation file, extract core data, synchronously collect file size feature data, and determine the file size based on a preset dynamic threshold system. The core data includes grid cells, macro-volumes, spatial transformation matrices, and material core physical properties.

[0109] The file size characteristic data includes basic size indicators, complexity indicators, and format characteristic indicators. The basic size indicators are the total number of raster cells, the total number of macro bodies, the total number of materials, and the number of displacement transformation matrices. The complexity indicators are the average nesting level of raster cells, the maximum number of references to macro bodies, and the material-raster cell association density. The format characteristic indicators are the original file format and whether it contains custom macro bodies / special materials.

[0110] The dynamic threshold system is a three-level threshold system, including small file threshold, medium file threshold, and large file threshold. The small file threshold is: total number of grid cells < 500, total number of macros < 200, total number of materials < 50, and average nesting level < 3. The medium file threshold is: total number of grid cells 500-2000, total number of macros 200-500, total number of materials 50-100, and average nesting level 3-6. The large file threshold is: total number of grid cells ≥ 2000, total number of macros ≥ 500, total number of materials ≥ 100, and average nesting level > 6. The dynamic threshold supports manual fine-tuning by the user.

[0111] Tree group construction module 22 is used to dynamically construct a tree group structure with self-optimization characteristics according to the file size. The tree group structure is composed of multiple trees with different functions, which respectively carry the parsing, management and editing of different dimensions of information in the file.

[0112] The system dynamically constructs model trees, grid trees, macro-body trees, displacement trees, and material trees, enabling the merging, independence, or splitting of tree nodes. It also embeds user-adaptive logic, where the adaptive optimization of the model tree construction scale includes:

[0113] In small files, explicit grid nodes are tiled and implicit grid nodes are folded and integrated.

[0114] Medium-sized files are classified into primary categories of explicit raster cells based on spatial regions;

[0115] Large files are classified into two categories: spatial region and importance level, and region index nodes are generated.

[0116] Habit self-adaptation optimization includes recording users' visual operation habits, automatically restoring the view state, and highlighting frequently operated nodes;

[0117] The adaptive optimization of the scale of the macro-tree construction includes:

[0118] Small files are merged with the displacement tree to form the base resource tree;

[0119] Medium-sized documents are classified into two categories: geometric type and citation popularity.

[0120] Large files are categorized into three levels: geometric type, application scenario, and citation popularity, and a macro-sized resource index table is generated.

[0121] Habit-adaptive optimization includes recording the types of macros that users frequently create / reference, and automatically recommending and filling in commonly used parameters when creating a new macro;

[0122] The first module 23 is used to establish a dynamic logical association mechanism between trees in the tree group structure, establish unidirectional dependency association rules between tree groups, automatically reconstruct association relationships when the tree structure is adjusted, dynamically shrink / expand the verification range when nodes are modified or the structure is adjusted, and trigger linkage updates. Specifically, in the tree merging scenario, the association relationship is automatically converted and the index is updated. In the tree splitting scenario, the association relationship is automatically sinked and the association trajectory is recorded. In large files, high-frequency access association relationships are kept in memory and low-frequency association relationships are stored in the cache.

[0123] Visualization module 24 is used to provide adaptive visualization interaction functions based on the tree group structure, supporting the intuitive presentation and operation of the core information of the file;

[0124] The editing and management module 25 is used to provide an adaptive graphical editing and management tool based on the tree group structure and dynamic logical association mechanism.

[0125] The second module 26 is used to establish a dynamic data consistency assurance system. It adaptively adjusts the assurance strategy according to file characteristics and operation scenarios. Small files are subject to full verification, medium-sized files are subject to layered verification, and large files are subject to incremental verification plus key verification. Version management adjusts the number of versions to be retained according to file size. Large files only retain versions of important operation nodes, and supports visual comparison of version differences.

[0126] The conversion module 27 is used to realize the mutual conversion of Monte Carlo calculation files of different formats based on the unified adaptation capability of the tree group structure.

[0127] Example 3

[0128] Embodiment 3 of the present invention proposes an electronic device, please refer to [link / reference]. Figure 3This is a structural block diagram of an electronic device, including a memory 20, a processor 10, and a computer program 30 stored in the memory and executable on the processor. When the processor 10 executes the computer program 30, it implements the Monte Carlo computational file modeling and management method based on a multi-tree structure as described above.

[0129] In some embodiments, the processor 10 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip, used to run program code stored in memory 20 or process data, such as executing access restriction programs.

[0130] The memory 20 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of an electronic device, such as the hard disk of the electronic device. In other embodiments, the memory 20 can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, the memory 20 can include both internal and external storage units of the electronic device. The memory 20 can be used not only to store application software and various types of data of the electronic device, but also to temporarily store data that has been output or will be output.

[0131] This invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the Monte Carlo computation file modeling and management method based on a multi-tree structure as described above.

[0132] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0133] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0134] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0135] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0136] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A method for modeling and managing Monte Carlo computational files based on a multi-tree structure, characterized in that, The method includes: The Monte Carlo calculation file is parsed, core data is extracted, and file size feature data is collected synchronously. The file size is determined based on a preset dynamic threshold system. The core data includes grid cells, macro-volumes, spatial transformation matrices, and material core physical properties. Based on the file size, a tree group structure with self-optimization characteristics is dynamically constructed. The tree group structure consists of multiple trees with different functions, which respectively carry the parsing, management and editing of different dimensions of information in the file. A dynamic logical association mechanism is established between the trees in the tree group structure. Specifically, a one-way dependency association rule is established between the tree groups. When the tree structure is adjusted, the association relationship is automatically reconstructed. When a node is modified or the structure is adjusted, the verification range is dynamically shrunk / expanded to trigger a linkage update. Specifically, in the tree merging scenario, the association relationship is automatically converted and the index is updated. In the tree splitting scenario, the association relationship is automatically sinked and the association trajectory is recorded. In large files, high-frequency access association relationships are kept in memory and low-frequency association relationships are stored in the cache. Based on the tree group structure, adaptive visual interactive functions are provided to support the intuitive presentation and operation of the core information of the file; Based on the tree group structure and dynamic logical association mechanism, an adaptive graphical editing and management tool is provided. Establish a dynamic data consistency assurance system that adaptively adjusts assurance strategies based on file characteristics and operational scenarios; Based on the unified adaptability of the tree group structure, the mutual conversion of Monte Carlo calculation files in different formats can be realized.

2. The method for modeling and managing Monte Carlo computational files based on a multi-tree structure according to claim 1, characterized in that, The file size characteristic data includes basic size indicators, complexity indicators, and format characteristic indicators. The basic size indicators are the total number of raster cells, the total number of macro bodies, the total number of materials, and the number of displacement transformation matrices. The complexity indicators are the average nesting level of raster cells, the maximum number of references to macro bodies, and the material-raster cell association density. The format characteristic indicators are the original file format and whether it contains custom macro bodies / special materials.

3. The method for modeling and managing Monte Carlo computational files based on a multi-tree structure according to claim 2, characterized in that, The dynamic threshold system is a three-level threshold system, including small file threshold, medium file threshold, and large file threshold. The small file threshold is: total number of grid cells < 500, total number of macros < 200, total number of materials < 50, and average nesting level < 3. The medium file threshold is: total number of grid cells 500-2000, total number of macros 200-500, total number of materials 50-100, and average nesting level 3-6. The large file threshold is: total number of grid cells ≥ 2000, total number of macros ≥ 500, total number of materials ≥ 100, and average nesting level > 6. The dynamic threshold supports manual fine-tuning by the user.

4. The method for modeling and managing Monte Carlo computational files based on a multi-tree structure according to claim 3, characterized in that, The process involves dynamically constructing a self-optimizing tree structure based on file size. This tree structure consists of multiple functionally differentiated trees, each responsible for different aspects of file information parsing, management, and editing. This includes dynamically constructing model trees, raster trees, macro trees, displacement trees, and material trees, merging, de-identifying, or splitting tree nodes, and embedding user-adaptive logic. The adaptive optimization of the model tree construction includes: In small files, explicit grid nodes are displayed in a tiled manner, while implicit grid nodes are folded and integrated. Medium-sized files are classified into primary categories of explicit raster cells based on spatial regions; Large files are classified into two categories: spatial region and importance level, and region index nodes are generated. Habit self-adaptation optimization includes recording users' visual operation habits, automatically restoring the view state, and highlighting frequently used operation nodes.

5. The Monte Carlo computation file modeling and management method based on a multi-tree structure according to claim 4, characterized in that, The adaptive optimization of the scale of the macro-tree construction includes: Small files are merged with the displacement tree to form the base resource tree; Medium-sized documents are classified into two categories: geometric type and citation popularity. Large files are categorized into three levels: geometric type, application scenario, and citation popularity, and a macro-sized resource index table is generated. Habit-based adaptive optimization includes recording the types of macros that users frequently create / reference, and automatically recommending and filling in commonly used parameters when creating a new macro.

6. The Monte Carlo computation file modeling and management method based on a multi-tree structure according to claim 5, characterized in that, In the steps of establishing a dynamic data consistency assurance system and adaptively adjusting the assurance strategy according to file characteristics and operation scenarios, small files undergo full verification, medium-sized files undergo layered verification, and large files undergo incremental verification plus key verification. Version management adjusts the number of versions to be retained according to file size, with large files retaining only versions of important operation nodes, and supports visual comparison of version differences.

7. A Monte Carlo computational file modeling and management system based on a multi-tree structure, characterized in that, The system is used to implement the Monte Carlo computation file modeling and management method based on a multi-tree structure as described in any one of claims 1-6, the system comprising: The parsing module is used to parse the Monte Carlo calculation file, extract core data, synchronously collect file size feature data, and determine the file size based on a preset dynamic threshold system. The core data includes grid cells, macro-volumes, spatial transformation matrices, and material core physical properties. The tree group construction module is used to dynamically construct a tree group structure with self-optimization characteristics based on the file size. The tree group structure consists of multiple trees with different functions, which respectively carry the parsing, management and editing of different dimensions of information in the file. The first establishment module is used to establish a dynamic logical association mechanism between the trees in the tree group structure; The visualization module is used to provide adaptive visualization and interactive functions based on the tree group structure, supporting the intuitive presentation and operation of the core information of the file; The editing and management module is used to provide adaptive graphical editing and management tools based on the tree group structure and dynamic logical association mechanism. The second module is used to establish a dynamic data consistency assurance system, which adaptively adjusts the assurance strategy according to file characteristics and operation scenarios. The conversion module is used to convert between different formats of Monte Carlo calculation files based on the unified adaptation capability of the tree group structure.

8. A computer-readable storage medium, characterized in that, include: The readable storage medium stores one or more programs that, when executed by a processor, implement the Monte Carlo computational file modeling and management method based on a multi-tree structure as described in any one of claims 1-6.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, wherein: The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the Monte Carlo computational file modeling and management method based on a multi-tree structure as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Multiscale fissioning core visualization method based on automatic merging hierarchical structure tree

    CN106126855A

  • Construction method, system and equipment of project dependence tree and storage medium

    CN116932031A