A general conversion system for cae solver file formats based on large language models

CN119166779BActive Publication Date: 2026-09-22ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411254720.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2026-09-22
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

[0005]本发明提供了一种基于大语言模型的CAE求解器文件格式通用转换系统,解决了现有技术开发技术门槛高、可扩展性差、进行1转N与N转1困难、转换后需要大量人工干预校核等技术问题

Benefits of technology

[0037]本发明通过结合ChatGLM、Langchain、向量知识库、知识图谱进行CAE求解器文件格式通用转换,能够提高CAE求解器格式转换工具的灵活性、降低CAE求解器格式转换工具二次开发门槛、适应1转N与N转1批量转换任务。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166779B_ABST
    Figure CN119166779B_ABST
Patent Text Reader

Abstract

The application discloses a CAE solver file format universal conversion system based on a large language model, which comprises an LLM analysis conversion module, an application ChatGLM understanding conversion instruction, a query call knowledge storage module and a target file content generated in combination with a document knowledge graph; the knowledge storage module stores a CAE solver file format template, a document knowledge graph and the like; a graph retrieval module quickly indexes a document knowledge graph subgraph related to a current theme format conversion in a file format conversion task process, and combines a conversion algorithm to position a conversion task keyword theme; and a conversion algorithm module realizes construction and storage of a new conversion path in the document knowledge graph, realizes determination and positioning of the conversion task keyword theme in combination with the graph retrieval module, and completes conversion content filling. By using the application, problems in traditional CAE solver file format conversion, such as high development technical threshold, poor scalability, difficulty in 1-to-N and N-to-1 conversion, and the need for a large amount of manual intervention and checking after conversion, can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial digitalization, and in particular relates to a universal conversion system for CAE solver file formats based on a large language model. Background Technology

[0002] The development of CAE (Computer-Aided Engineering) solvers is often independent of the development of pre-processing and post-processing software, and they interact with these two in the form of files. This approach has historical roots and is also driven by practical engineering considerations. However, the field of solver development lacks specific industry standards, making the final solver highly dependent on the individual programming habits of the developers. This affects the compatibility of the solver with other third-party pre- and post-processing software, especially since incompatible input and output file formats can directly prevent the solver from integrating with pre- and post-processing.

[0003] Existing CAE solver file format conversion tools are typically built into commercial CAE software as black boxes, preventing developers from directly extending them. This forces solver developers to either develop according to the specifications of the pre- and post-processing software they intend to use, or write a dedicated converter for adaptation. Converter development involves complex disciplinary backgrounds and programming knowledge, limiting the flexibility and efficiency of solver development. Open-source CAE solver file format conversion tools are diverse, with different reading and writing principles and programming languages, making it difficult to integrate them all onto a single platform for management. Currently available CAE solver file format conversion tools often result in the loss of significant detailed information in the converted models, requiring manual repair, which is extremely inefficient. Furthermore, existing CAE solver file format conversion tools frequently use tables to map the format themes of the files to be converted and the target files, which is cumbersome for batch conversion tasks such as 1-to-N or N-to-1 conversions.

[0004] Therefore, there is an urgent need for a technical solution that can decouple the solver from the pre- and post-processing software without affecting compatibility, further improve accuracy and reliability while ensuring flexible and convenient interaction, and handle batch conversion tasks such as 1 to N and N to 1. Summary of the Invention

[0005] This invention provides a universal CAE solver file format conversion system based on a large language model, which solves the technical problems of high development threshold, poor scalability, difficulty in 1-to-N and N-to-1 conversion, and the need for a lot of manual intervention and verification after conversion.

[0006] A general conversion system for CAE solver file formats based on large language models includes an LLM analysis and conversion module, a knowledge storage module, a conversion algorithm module, and a graph retrieval module.

[0007] The LLM analysis and transformation module uses ChatGLM to understand transformation instructions, queries and calls the knowledge storage module, and combines the document knowledge graph to generate target file content, and outputs the result file path for users to view or call.

[0008] The knowledge storage module stores the file format templates, domain knowledge, version information, and document knowledge graph of the CAE solver; the document knowledge graph marks whether a valid conversion path already exists between files in the form of directed edges, serving as the basis for the conversion algorithm switching process;

[0009] The graph retrieval module quickly indexes the document knowledge graph subgraphs related to the current topic format conversion during the file format conversion task, and combines the conversion algorithm to locate the keyword topic of the conversion task, providing the LLM analysis and conversion module with the current task background knowledge.

[0010] The conversion algorithm module contains a conversion algorithm that enables the construction and storage of new conversion paths in the document knowledge graph, combines with the graph retrieval module to determine and locate the keywords and themes of the conversion task, completes the filling of conversion content, and connects the LLM analysis conversion module and the graph retrieval module.

[0011] Each module will be explained in more detail below.

[0012] In the LLM analysis and conversion module, querying and calling the knowledge storage module refers to connecting the knowledge stored in the knowledge base in vector form through Langchain, thereby expanding the knowledge content and related subject knowledge rules of ChatGLM in the solver file conversion business.

[0013] Combining document knowledge graphs refers to enriching the specific task background knowledge from the file format to be converted to the target file format, as well as the topic hierarchy and complex relationships in the target file format template, by combining the template structure information supplemented by document knowledge graphs.

[0014] In the knowledge storage module, the CAE solver's file format template, domain knowledge, and version information are efficiently stored in vector form based on FAISS.

[0015] The document knowledge graph is based on Neo4j and classifies the content of document templates in a bottom-up manner. It is constructed based on the classification results to show the complex relationships between various topics in the document templates.

[0016] Furthermore, the file format template is stored in the knowledge base as a vector before the conversion task begins. If it does not exist, it should be created first. The template should include keywords and content structure examples of the corresponding keywords representing the topics.

[0017] Template keywords include node definition, element definition, material definition, property definition, boundary conditions, load definition, and analysis control.

[0018] In the knowledge storage module, common CAE solver file formats include .inp, .nas, .k, and .mph, which typically include node coordinates, material properties, boundary conditions, load step information, mesh information, solution control parameters, geometric model, and calculation results. The domain knowledge includes mathematical models, algorithm theories, subject knowledge, and engineering principles. The version archive refers to the config and log files that store the history of the ChatGLM model, enabling developers to trace and manually correct model optimization effects.

[0019] The conversion path refers to the target file template storage path and the topic positioning table. The topic positioning table contains the relative positions of all keyword topics in the template. The relative positions in the topic positioning table will float as the conversion result content under the keyword topics is filled in during the specific conversion task.

[0020] A valid conversion path refers to the file template path and topic location table recorded in the solver format conversion process that has been successfully completed and can be replicated; in the document knowledge graph, format documents with valid conversion paths are connected together by directed edges.

[0021] In the graph retrieval module, the document knowledge graph subgraph related to the current topic format is used to provide ChatGLM with complex relationships between file structures, alleviate the illusion phenomenon in the solver file format conversion task of ChatGLM, and improve efficiency when creating new conversion paths;

[0022] The fast indexing process requires combining a document knowledge graph, the file to be converted, the target file format template, and a topic positioning table to work according to the conversion algorithm. During the conversion task, the relative positions in the topic positioning table are updated according to the specific conversion algorithm process.

[0023] The aforementioned conversion algorithm module implements the construction and storage of new conversion paths in the document knowledge graph, including:

[0024] The conversion algorithm locates the target file template and records the path; it retrieves the subgraph with the highest relevance from the document knowledge graph related to the target file format template; it obtains the topic location at the terminal node of the retrieved highest relevance subgraph and records it in the topic location table; it creates a directed edge from the file to be converted to the target file and marks the conversion path.

[0025] The conversion algorithm module, combined with the graph retrieval module, determines and locates the keyword topic of the conversion task. For tasks with valid conversion paths, it includes:

[0026] The file format template path can be obtained from the valid path known by the graph search. After locating it, a copy is created, and the template topic counter i, the actual topic counter j, and the content counter count are initialized. According to the topic location table in the conversion path, the pointer is located to the topic position Pi = Pi + count inside the file template copy, where count is used to compensate for topic location fluctuations.

[0027] For tasks where no valid path transformation exists, including:

[0028] Locate the path of the target file format template based on the node where the document name is located, record the path, create a copy, and initialize the content counter count to compensate for location fluctuations; obtain the relative position of the file template where the smallest unit keyword topic is located from the end node of the graph retrieval, locate the keyword topic in the template copy, and record the topic position as P = current position - count.

[0029] The conversion algorithm module completes the content filling process. For conversion tasks with valid conversion paths, this includes:

[0030] ChatGLM is used to analyze and classify the text of the file to be converted. If the content is a topic, it first checks whether the initial template topic counter i and the actual topic counter j point to the same topic. If not, an alarm is triggered and manual intervention is requested. If they are the same topic, the topic structure example is extracted to the prompt to restrict ChatGLM behavior, and the structure example is deleted from the copy. If it is content, ChatGLM is used to convert it according to the prompt fused with the conversion instructions, knowledge and rules from the knowledge storage module, and relevant subgraph information. The generated conversion result is then filled into the file template copy pointer. If it is EOF, a completion instruction is sent to the LLM analysis and conversion module.

[0031] For conversion tasks for which no valid conversion path exists, including:

[0032] ChatGLM is used to perform LLM analysis and classification on the text to be converted. If the content is a topic, a graph search is performed to obtain the subgraph with the highest average cosine similarity. The relative position of the smallest unit keyword topic in the file template is obtained from the end node of the graph search, and the keyword topic is located in the template copy. The structural examples are extracted to the prompt and deleted from the copy. If it is content, ChatGLM is applied to perform LLM conversion based on the prompt fused with the conversion instructions, knowledge and rules from the knowledge storage module, and relevant subgraph information, and the generated content is filled into the file template copy pointer. If it is EOF, a completion instruction is sent to the LLM analysis and conversion module.

[0033] The aforementioned transformation algorithm module, which connects the LLM analysis and transformation module with the graph retrieval module, includes:

[0034] Search the document knowledge graph to determine if there is a valid conversion path from the file format to the target file format, and select different algorithm processes for topic localization based on the results;

[0035] After successful topic localization, the algorithm calls ChatGLM to classify and analyze the text of the file to be converted, and selects to perform content filling, continue topic localization, and send a conversion completion signal to the LLM analysis and conversion module based on the results.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] This invention combines ChatGLM, Langchain, vector knowledge base, and knowledge graph to perform universal conversion of CAE solver file formats, which can improve the flexibility of CAE solver format conversion tools, reduce the threshold for secondary development of CAE solver format conversion tools, and adapt to batch conversion tasks of 1 to N and N to 1. Attached Figure Description

[0038] Figure 1 This is an overall architecture diagram of a universal conversion system for CAE solver file formats based on a large language model, according to the present invention.

[0039] Figure 2 This is a structural diagram of the knowledge storage module in the basic invention;

[0040] Figure 3 This is a flowchart of the solver format conversion in this invention;

[0041] Figure 4 This is the first flowchart of the conversion algorithm in this invention;

[0042] Figure 5 This is the second flowchart of the conversion algorithm in this invention; Detailed Implementation

[0043] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be noted that the embodiments described below are intended to facilitate the understanding of the present invention and do not constitute any limitation thereof.

[0044] like Figure 1 As shown, a general conversion system for CAE solver file formats based on large language models includes an LLM analysis and conversion module, a knowledge storage module, a conversion algorithm module, and a graph retrieval module.

[0045] The LLM analysis and transformation module uses ChatGLM to understand transformation instructions, queries and calls the knowledge storage module, and combines the document knowledge graph to generate target file content, outputting the result file path for users to view or call.

[0046] Knowledge storage module, such as Figure 2 As shown, the CAE solver stores file format templates, domain knowledge, version information, and document knowledge graphs. The document knowledge graphs use directed edges to mark whether a valid conversion path already exists between files, serving as the basis for switching conversion algorithms.

[0047] The graph retrieval module quickly indexes the document knowledge graph subgraphs related to the current topic format conversion during the file format conversion task, and combines the conversion algorithm to locate the keyword topic of the conversion task, providing the LLM analysis conversion module with the current task background knowledge.

[0048] The conversion algorithm module contains conversion algorithms to construct and store new conversion paths in the document knowledge graph, and, in conjunction with the graph retrieval module, to determine and locate the keywords and themes of the conversion task, complete the conversion content filling, and connect the LLM analysis conversion module and the graph retrieval module.

[0049] like Figure 3 As shown, the method for converting CAE solver file formats using the universal CAE solver file format conversion system of the present invention includes the following steps:

[0050] S01, Knowledge base construction and data processing, including building a vector knowledge base and document knowledge graph with rich CAE solver file formats and domain knowledge, and connecting them to the ChatGLM model through the Langchain framework.

[0051] As shown in Table 1, data collection included obtaining relevant data on various solver file formats from publicly available resources such as CAE solver documents, technical specifications, academic papers, and technical blogs; as shown in Table 2, subject area experts were invited to provide subject knowledge on solver file formats in specific subject areas through interviews, questionnaires, and participation in technical seminars.

[0052] Table 1: Examples of common solvers and their file formats

[0053]

[0054] Table 2: Examples of Subject Knowledge

[0055]

[0056] The knowledge graph is built based on Neo4j, extracting features of each part of the format file template in a bottom-up manner and classifying them step by step, and constructing the graph based on the classification results. The subsequent maintenance of the knowledge graph mainly involves adding, deleting, modifying and querying directed edges and effective paths between documents that have successfully completed the conversion task.

[0057] The knowledge base is constructed using FAISS to store the vectors mentioned above, and Langchain is used to connect the vector knowledge base with the ChatGLM model.

[0058] S02, the ChatGLM model is used to obtain developer instructions and define file format conversion tasks. Developers submit their requirements for the CAE solver file formats that need to be converted, and send these requirements to ChatGLM in easy-to-understand natural language commands, such as "convert file format A to file format B".

[0059] After receiving a command, the ChatGLM model understands the specific intent of the command, matches these intents with the content in the vector knowledge base through the Langchain architecture, and searches and extracts knowledge and rules related to format A and format B in the knowledge base.

[0060] S03, search the document knowledge graph to determine if there is a valid conversion path from the file format to be converted to the target file format.

[0061] S04-1, if it exists, then proceed as follows: Figure 4 The algorithm flow is shown below.

[0062] The file format template path can be obtained from the known valid path. After locating it, a copy is created, and the template theme counter i, actual theme counter j, and content counter count are initialized. The actual theme counter and content counter for the 1-to-N task can theoretically be increased to N, and the initial template theme counter and content counter for the N-to-1 task can theoretically be increased to N.

[0063] According to the topic positioning table in the conversion path, the pointer is positioned at the topic position Pi = Pi + count inside the file template copy, where count is used to compensate for topic positioning fluctuations.

[0064] The ChatGLM application analyzes and categorizes the text of the file to be converted. If the content is a topic, it first determines whether topic i and topic j are the same topic. If not, it issues an alert and waits for manual intervention. If they are the same topic, it extracts the topic structure example to the prompt to restrict ChatGLM behavior, deletes the structure example in the copy, moves the pointer, increments the template topic counter and the actual topic counter by 1, and returns to ChatGLM for analysis and subsequent content processing.

[0065] If it is content, ChatGLM is applied to convert it according to the prompt, the generated converted content is filled into the file template copy pointer, the pointer is moved to the end of the content, the content counter count = the content position offset, and the pointer positioning step is returned.

[0066] If the result is EOF, the process ends.

[0067] S04-2, if it does not exist, then proceed as follows Figure 5 The algorithm flow is shown below.

[0068] Locate the path to the format file based on the node containing the document name, record the path, create a copy, and initialize the content counter `count` to compensate for location fluctuations. In 1-to-N and N-to-1 tasks, if x (N≥x≥1) conversion paths are missing, the content counter can theoretically be set to x.

[0069] ChatGLM is used to perform LLM analysis and classification on the text to be converted. If the content is a topic, a graph search is performed to obtain the subgraph with the highest average cosine similarity. This is then combined with a vector knowledge base to expand the contextual understanding. The relative position of the smallest unit keyword topic in the file template is obtained from the end node of the graph search. The keyword topic is located in the template copy and the topic position is recorded as P = current position - count.

[0070] Extract the structural example to prompt, delete the structural example in the copy, loop back to the LLM analysis step, and wait for the transformation results to be filled.

[0071] If it is content, ChatGLM is applied to perform LLM transformation based on the prompt, and the generated content is filled into the file template copy pointer. The pointer is moved to the end of the content, and count is updated to the content position offset. The process is repeated until the LLM analysis step is completed to process the subsequent content.

[0072] If it is EOF, then the conversion path from the file to be converted to the target file is recorded and the process ends, and a directed edge from the file to be converted to the target file is created in the document knowledge graph.

[0073] S05, the LLM analysis and conversion module returns the path to the result file for users to view or access.

[0074] The embodiments described above provide a detailed explanation of the technical solutions and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A universal conversion system for CAE solver file formats based on a large language model, characterized in that, It includes an LLM analysis and transformation module, a knowledge storage module, a transformation algorithm module, and a graph retrieval module; The LLM analysis and transformation module uses ChatGLM to understand transformation instructions, queries and calls the knowledge storage module, and combines the document knowledge graph to generate target file content, and outputs the result file path for users to view or call. The knowledge storage module stores the file format templates, domain knowledge, version information, and document knowledge graph of the CAE solver; the document knowledge graph marks whether a valid conversion path already exists between files in the form of directed edges, serving as the basis for the conversion algorithm switching process; The graph retrieval module quickly indexes the document knowledge graph subgraphs related to the current topic format conversion during the file format conversion task, and combines the conversion algorithm to locate the keyword topic of the conversion task, providing the LLM analysis and conversion module with the current task background knowledge. The conversion algorithm module contains a conversion algorithm that enables the construction and storage of new conversion paths in the document knowledge graph, combines with the graph retrieval module to determine and locate the keywords and themes of the conversion task, completes the filling of conversion content, and connects the LLM analysis conversion module and the graph retrieval module. The graph retrieval module is used to determine and locate the keywords and topics of the conversion task. For tasks with valid conversion paths, the following steps are taken: the valid path known from the graph retrieval can be used to obtain the file format template path. After locating the path, a copy is created, and the template topic counter i, the actual topic counter j, and the content counter count are initialized. According to the topic location table in the conversion path, the pointer is located to the topic position Pi = Pi + count inside the file template copy, where count is used to compensate for topic location fluctuations. For tasks where no valid path transformation exists, including: Locate the path of the target file format template based on the node where the document name is located, record the path, create a copy, and initialize the content counter count to compensate for positioning fluctuations; obtain the relative position of the file template where the smallest unit keyword topic is located from the end node of the graph retrieval, locate the keyword topic in the template copy, and record the topic position as P = current position - count; Complete the conversion content population. For conversion tasks with valid conversion paths, this includes: ChatGLM is used to analyze and classify the text of the file to be converted. If the content is a topic, it first checks whether the initial template topic counter i and the actual topic counter j point to the same topic. If not, an alarm is triggered and manual intervention is requested. If they are the same topic, the topic structure example is extracted to the prompt to restrict ChatGLM behavior, and the structure example is deleted from the copy. If it is content, ChatGLM is used to convert it according to the prompt fused with the conversion instructions, knowledge and rules from the knowledge storage module, and relevant subgraph information. The generated conversion result is then filled into the file template copy pointer. If it is EOF, a completion instruction is sent to the LLM analysis and conversion module. For conversion tasks for which no valid conversion path exists, including: ChatGLM is used to perform LLM analysis and classification on the text to be converted. If the content is a topic, a graph search is performed to obtain the subgraph with the highest average cosine similarity. The relative position of the smallest unit keyword topic in the file template is obtained from the end node of the graph search, and the keyword topic is located in the template copy. The structural examples are extracted to the prompt and deleted from the copy. If it is content, ChatGLM is applied to perform LLM conversion based on the prompt fused with the conversion instructions, knowledge and rules from the knowledge storage module, and relevant subgraph information, and the generated content is filled into the file template copy pointer. If it is EOF, a completion instruction is sent to the LLM analysis and conversion module.

2. The universal CAE solver file format conversion system based on a large language model according to claim 1, characterized in that, In the LLM analysis and conversion module, querying and calling the knowledge storage module refers to connecting the knowledge stored in the knowledge base in vector form through Langchain, thereby expanding the knowledge content and related subject knowledge rules of ChatGLM in the solver file conversion business. Combining document knowledge graphs refers to enriching the specific task background knowledge from the file format to be converted to the target file format, as well as the topic hierarchy and complex relationships in the target file format template, by combining the template structure information supplemented by document knowledge graphs.

3. The universal CAE solver file format conversion system based on a large language model according to claim 1, characterized in that, In the knowledge storage module, the CAE solver's file format template, domain knowledge, and version information are efficiently stored in vector form based on FAISS. The document knowledge graph is based on Neo4j and classifies the content of document templates in a bottom-up manner. It is constructed based on the classification results to show the complex relationships between various topics in the document templates.

4. The universal CAE solver file format conversion system based on a large language model according to claim 3, characterized in that, The file format template is stored in the knowledge base as a vector before the conversion task begins. If it does not exist, it should be created first. The template should include keywords and content structure examples of the corresponding keywords representing the topics. Template keywords include node definition, element definition, material definition, property definition, boundary conditions, load definition, and analysis control.

5. The universal CAE solver file format conversion system based on a large language model according to claim 1, characterized in that, In the knowledge storage module, an effective conversion path refers to the file template path and topic location table recorded in the solver format conversion process that has been successfully completed and can be replicated; in the document knowledge graph, format documents with effective conversion paths are connected together by directed edges.

6. The universal CAE solver file format conversion system based on a large language model according to claim 1, characterized in that, In the graph retrieval module, the document knowledge graph subgraph related to the current topic format is used to provide ChatGLM with complex relationships between file structures, alleviate the illusion phenomenon in the solver file format conversion task of ChatGLM, and improve efficiency when creating new conversion paths; The fast indexing process requires combining a document knowledge graph, the file to be converted, the target file format template, and a topic positioning table to work according to the conversion algorithm. During the conversion task, the relative positions in the topic positioning table are updated according to the specific conversion algorithm process.

7. The universal CAE solver file format conversion system based on a large language model according to claim 1, characterized in that, The aforementioned conversion algorithm module implements the construction and storage of new conversion paths in the document knowledge graph, including: The conversion algorithm locates the target file template and records the path; it retrieves the subgraph with the highest relevance from the document knowledge graph related to the target file format template; it obtains the topic location at the terminal node of the retrieved highest relevance subgraph and records it in the topic location table; it creates a directed edge from the file to be converted to the target file and marks the conversion path.

8. The universal CAE solver file format conversion system based on a large language model according to claim 1, characterized in that, The aforementioned transformation algorithm module, which connects the LLM analysis and transformation module with the graph retrieval module, includes: Search the document knowledge graph to determine if there is a valid conversion path from the file format to the target file format, and select different algorithm processes for topic localization based on the results; After successful topic localization, the algorithm calls ChatGLM to classify and analyze the text of the file to be converted, and selects to perform content filling, continue topic localization, and send a conversion completion signal to the LLM analysis and conversion module based on the results.

Citation Information

Patent Citations

  • Simulation calculation system, method and device, electronic equipment and readable storage medium

    CN115904622A

  • Domain knowledge graph automatic construction method based on large language model and prompt project

    CN117035076A