INP file multi-thread reading method and device and storage medium

Through memory mapping, modular segmentation and dynamic multithreading technology processing of inp files, the problem of slow parsing inp files is solved and the simulation efficiency of CAE software is improved.

CN120449232AInactive Publication Date: 2025-08-08WU CHUANG XIN YAN KE JI (WU HAN) YOU XIAN GONG SI

Patent Information

Application Number
CN202510963654.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the parsing speed of inp files when imported into other software is slow, resulting in poor simulation efficiency and user experience.

Method used

Memory mapping technology is used to map the inp file to memory space, and modular segmentation and dynamic multithreading technology are used to process the inp file data blocks through the main thread and the child thread, and identify and convert them into target software to identify data.

Benefits of technology

It significantly improves the parsing speed of inp files and improves the simulation efficiency of CAE software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449232A_ABST
    Figure CN120449232A_ABST
Patent Text Reader

Abstract

The invention provides an INP file multi-thread reading method and device and a storage medium. The method and device are used for extracting information from an INP file of a CAE simulation software model and converting the information into target software recognizable data. According to the method, the technical combination of memory mapping, modular segmentation and dynamic multithreading is adopted, system resources are fully utilized, the analysis speed of the inp file is remarkably increased, and the simulation efficiency of CAE software is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of simulation software data processing, and in particular to a multi-threaded reading method, device, and storage medium for INP files. Background Art

[0002] The inp file is a commonly used model storage format in simulation software and the standard input file format for ABAQUS finite element analysis software. It uses text to store all modeling, analysis, and solution information for CAE (Computer-Aided Engineering) simulations. It serves as a critical data interface between CAE simulation preprocessing and the solver. The inp file is based on a series of data blocks, each dedicated to describing a specific part of the model. These blocks begin with a specific keyword, followed by relevant parameters and one or more data lines to form a complete description.

[0003] In existing simulation software, it is often necessary to import INP files from different software into other software. The existing INP file parsing technology has the following bottlenecks during import: traditional INP file parsing usually reads and parses data line by line. Importing INP files for large models takes more than ten or even dozens of minutes, seriously affecting the simulation efficiency and user experience. Summary of the Invention

[0004] In order to make up for the defect of slow reading speed caused by line-by-line data parsing when importing the above-mentioned INP file into other software, the present application proposes an INP file multi-threaded reading method, device and storage medium for extracting information from the INP file of the CAE simulation software model and converting it into data recognizable by the target software. The steps include: When the target software is run using the main thread, at least one child thread is used to read and convert the INP file; The sub-thread reads and converts the INP file, which includes: obtaining the INP file of the simulation software model; mapping the INP file to the memory space to obtain INP mapping data, where the INP data includes multiple data blocks; identifying specified feature identifiers from the multiple data blocks according to preset parameters; traversing the INP mapping data, and dividing the data blocks with the same specified feature identifiers into the same data block set; allocating one or more sub-threads to the same data block set for parsing, and converting the parsed data into data recognizable by the target software.

[0005] Furthermore, there is at least one designated feature.

[0006] Furthermore, the process of allocating one or more sub-threads to the same data block set for parsing includes: determining whether the size of the data block set exceeds a threshold; if so, dividing the data block set into multiple sub-data sets and allocating a sub-thread to each sub-data set; if not, allocating a sub-thread to the data block set.

[0007] Furthermore, the designated feature identifier includes a main identifier and a subordinate sub-identifier of the main identifier, the data block includes multiple sub-data blocks, and the sub-identifier corresponds to the sub-data block; in the process of dividing the data module set into multiple sub-data sets, the sub-data blocks with the same type of sub-identifier are preferentially divided into one sub-data set.

[0008] Furthermore, the main identifier includes part keywords, assembly keywords and material keywords.

[0009] Furthermore, after the main thread obtains the identifiable data of the target software, it updates the display content of the target software in real time according to the identifiable data.

[0010] Furthermore, the process of allocating one or more sub-threads to the same data block set for parsing and converting the parsed data into data recognizable by the target software also includes: establishing data association for the parsing results of the INP mapping data based on the topological reference relationship to generate a preset structure; detecting the data included in the preset structure to identify the missing necessary data; providing an operation interface for the necessary data in the interface of the target software and displaying prompt information, wherein the operation interface is presented in the form of a visual form; receiving the necessary data entered by the user through the operation interface, and filling the necessary data into the corresponding preset structure.

[0011] The present application also proposes an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute any of the above methods through the computer program.

[0012] The present application also proposes a computer-readable storage medium, which includes a stored program, wherein the program performs any of the above methods when executed by a processor.

[0013] The present invention adopts the technical combination of "memory mapping + modular segmentation + dynamic multithreading" to fully utilize system resources, significantly improve the parsing speed of INP files, and enhance the simulation efficiency of CAE software. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is a flow chart of an implementation method of the present application. DETAILED DESCRIPTION

[0015] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0016] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0017] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood broadly. For example, they can refer to fixed, removable, or integral connections; mechanical or electrical connections; direct connections, indirect connections through an intermediary, or internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention in specific contexts. In the following description, for purposes of illustration and not limitation, specific details such as particular system structures and technologies are provided to facilitate a thorough understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the present application may be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail. It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof. It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0018] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that specific features, structures, or characteristics described in connection with that embodiment are included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear at different places in this specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized.

[0019] A multi-threaded INP file reading method is used to extract information from the INP file of a CAE simulation software model and convert it into data recognizable by a target software. When the target software is run by the main thread, at least one sub-thread is used to read and convert the INP file. The process of the sub-thread reading and converting the INP file includes: obtaining the INP file of the simulation software model; mapping the INP file to a memory space to obtain INP mapping data, and the INP data includes multiple data blocks; identifying a specified feature identifier from the multiple data blocks according to preset parameters; traversing the INP mapping data, and dividing the data blocks with the same specified feature identifier into the same data block set; allocating one or more sub-threads to parse the same data block set, and converting the parsed data into data recognizable by the target software. Refer to Figure 1 , in this embodiment, the specified feature identifier generally uses keywords in the INP file. Each data block of the inp file focuses on describing a specific part of the model. These data blocks start with a specific keyword, followed by relevant parameters and one or more data lines. Using keywords as the specified feature identifier can effectively extract this data block. Taking the example of importing a real chip grid model with 4 million grid units, first match the 4 keywords *NODE, *ELEMENT, *NSET, *ELSET through regular expressions, because these keywords contain the most data in the inp file, and extract the data blocks under the keywords. Determine whether the size M of the data block exceeds the threshold. If M <= 1GB, no sub-blocks are divided; if 1GB < M <= 2GB, it is divided into 2 sub-modules; if 2G < M <= 3G, it is divided into 3 sub-modules. Taking the node *NODE as an example (the data blocks under the other three keywords are the same, first design the data structure, then parse it in multiple threads, and fill the container after parsing), design the data structure of a single node. The partial operation code of the above steps includes: struct InpNode { long id; / / Node id double x, y, z; / / node coordinates }; Use vector container to store all node vectors <inpnode>allNodes; In this embodiment, after the *NODE data block is divided into two sub-modules, each sub-module is parsed simultaneously using one thread, and the parsed data is sequentially saved in the container allNodes and stored in the memory.

[0020] Based on one or each of the above embodiments, the present application further improves that at least one of the specified feature identifiers is present. In this embodiment, the INP file generally includes three major aspects: part, assembly, and material name, as well as multiple sub-features such as assembly name, feature point, instance set, point set set, unit set set, surface set, instance name, original part, instance coordinate, coordinate adjustment, rotation angle, etc. In the process of specifying feature identifiers, one or more feature identifiers can be extracted separately.

[0021] Based on one or more of the above embodiments, the present application further improves upon the aforementioned embodiment, wherein allocating one or more sub-threads to the same data chunk set for parsing includes determining whether the size of the data chunk set exceeds a threshold; if so, dividing the data chunk set into multiple sub-data sets and allocating a sub-thread to each sub-data set; if not, allocating a sub-thread to the data chunk set. In this embodiment, to further improve import speed, during the process of allocating sub-threads to the data chunk set, large data chunk sets are further divided and allocated to sub-threads.

[0022] Based on one or each of the above embodiments, the present application further improves the method in which the designated feature identifier includes a main identifier and a subordinate sub-identifier of the main identifier, the data block includes multiple sub-data blocks, and the sub-identifiers correspond to the sub-data blocks; and in the process of dividing the data module set into multiple sub-data sets, the sub-data blocks with the same type of sub-identifiers are preferentially divided into a sub-data set. In this embodiment, by preferentially dividing the sub-data blocks with the same type of sub-identifiers into a sub-data set, the sub-data blocks are classified while improving the import speed, avoiding the step of data screening and classification in the later import process, and further improving the import speed.

[0023] Based on one or each of the above embodiments, the present application is further improved, and the main identifier includes part keywords, assembly keywords and material keywords.

[0024] Based on one or each of the above embodiments, the present application is further improved, and after the main thread obtains the identifiable data of the target software, the target software display content is updated in real time according to the identifiable data.

[0025] Based on the above one or each embodiment, the present application is further improved. When allocating one or more sub-threads to parse the same data block set and converting the parsed data into data recognizable by the target software, it further includes: establishing data associations for the parsing results of the INP mapping data according to the topological reference relationship to generate a preset structure; detecting the data included in the preset structure to identify the missing necessary data; providing an operation interface for the necessary data on the interface of the target software and displaying a prompt message, where the operation interface is presented in the form of a visual form; receiving the necessary data input by the user through the operation interface and filling the necessary data into the corresponding preset structure.

[0026] An electronic device includes a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the method described in any one of the above embodiments through the computer program.

[0027] A computer-readable storage medium includes a stored program. When the program is run by a processor, it executes the method described in any one of the above embodiments.

[0028] Taking the actual computer import process of the present application as an example, the parsing process is as follows: 1. Use C++ mmap to map the inp file to memory 2. Read the inp file in memory, quickly match keywords such as *Node, *Element, *Elset, *Material, etc. through regular expressions, and put the same modules together.

[0029] 3. Determine whether to divide sub-blocks according to the size of the module. Specifically: assume the module size is M. If M <= 1GB, no sub-blocks are divided; if 1GB < M <= 2GB, it is divided into 2 sub-modules; if 2G < M <= 3G, it is divided into 3 sub-modules.

[0030] 4. Initialize the thread pool and allocate a thread to each sub-module or module (in the case of no sub-module).

[0031] 5. Start multi-threaded parsing. Each sub-module or module is parsed separately, and the parsing results are saved in a designed data structure.

[0032] 6. Nine structures are designed according to its topological relationship to store the content extracted from the inp file: 1) INP data: stores all extracted INP data contents, including three major aspects: parts, assemblies, and material names; 2) Assemblies: contains assembly name, feature points, instance sets, point sets, element sets, and surface sets; 3) Instances: contains instance name, original part, instance coordinates, coordinate adjustment, and rotation angle; 4) Parts: contains part name, all nodes, all elements, section sets, point sets, element sets, and surface sets; 5) Sections: contains section category, element set name, and material name; 6) Surfaces: contains surface type, surface name, attributes, element set name, and face direction; 7) Nodes / element sets: contains set name, attributes, instance name, and set data; 8) Elements: contains element ID, element type, and node ID array; 9) Nodes: contains node ID and node coordinates.

[0033] 7. Design an exception handling mechanism for each module parsing thread to capture and record exceptions to avoid the entire parsing process being interrupted by errors in a single thread.

[0034] The present application implements all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a device / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, mobile hard disk, magnetic disk or optical disk. In some jurisdictions, based on legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0035] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0036] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0037] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device controller embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0038] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0039] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.< / inpnode>

Claims

1. A multi-threaded INP file reading method for extracting information from the INP file of a CAE simulation software model and converting it into data recognizable by the target software, characterized in that: When the target software is run using the main thread, at least one child thread is used to read and convert the INP file; The sub-thread reads and converts the INP file, which includes: obtaining the INP file of the simulation software model; mapping the INP file to the memory space to obtain INP mapping data, where the INP data includes multiple data blocks; identifying specified feature identifiers from the multiple data blocks according to preset parameters; traversing the INP mapping data, and dividing the data blocks with the same specified feature identifiers into the same data block set; allocating one or more sub-threads to the same data block set for parsing, and converting the parsed data into data recognizable by the target software.

2. The method according to claim 1, characterized in that There is at least one designated characteristic identifier.

3. The method according to claim 1, characterized in that The process of allocating one or more sub-threads to the same data block set for parsing includes: determining whether the size of the data block set exceeds a threshold; if so, dividing the data block set into multiple sub-data sets and allocating a sub-thread to each sub-data set; if not, allocating a sub-thread to the data block set.

4. The method according to claim 3, characterized in that The designated feature identifier includes a main identifier and a subordinate sub-identifier of the main identifier, the data block includes multiple sub-data blocks, and the sub-identifier corresponds to the sub-data block; in the process of dividing the data module set into multiple sub-data sets, the sub-data blocks with the same type of sub-identifier are divided into one sub-data set.

5. The method according to claim 4, characterized in that The main identifier includes part keywords, assembly keywords and material keywords.

6. The method according to claim 1, characterized in that After the main thread obtains the identifiable data of the target software, it updates the display content of the target software in real time according to the identifiable data.

7. The method according to claim 1, characterized in that The process of allocating one or more sub-threads to the same data block set for parsing and converting the parsed data into data recognizable by the target software also includes: establishing data association for the parsing results of the INP mapping data based on the topological reference relationship to generate a preset structure; detecting the data included in the preset structure to identify the missing necessary data; providing an operation interface for the necessary data in the interface of the target software and displaying prompt information, wherein the operation interface is presented in the form of a visual form; receiving the necessary data entered by the user through the operation interface, and filling the necessary data into the corresponding preset structure.

8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program is executed by a processor to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • CAE data and full-scale experiment data uniform reading and lightweight display tool

    CN103593513A

  • A method, apparatus, device, and storage medium for timing statistics of digital circuits.

    CN116805143A

  • Data processing method and device, computer equipment and storage medium

    CN119669180A

  • STDF file parsing method, device, equipment, and medium

    CN119759850A

  • Handling semidurable writes in a storage system

    US20250117140A1

Cited By

  • INP file analysis method

    CN121807316A