Modeling command generation model suitable for FMT modeling

By building a modeling command generation model suitable for FMT and generating Pascal modeling commands using natural language expressions, the problem of high threshold for FMT modeling software is solved and the design efficiency of traveling wave tubes is improved.

CN120337831APending Publication Date: 2025-07-18UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510409820.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The imperative modeling of FMT modeling software has a high technical threshold, which leads to low efficiency in traveling wave tube CAD modeling, and designers need to spend a long time learning FMT's imperative modeling.

Method used

Build a modeling command generation model suitable for FMT, generate corresponding Pascal modeling commands through modeling instructions expressed in natural language, and use open source pre-trained general model for fine-tuning training to lower the technical threshold.

Benefits of technology

This greatly reduces the technical threshold for CAD modeling using FMT, improves modeling efficiency, reduces the time cost of learning FMT imperative modeling, and improves the design efficiency of traveling wave tubes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120337831A_ABST
    Figure CN120337831A_ABST
Patent Text Reader

Abstract

The invention relates to the field of traveling wave tube design and three-dimensional modeling, in particular to a modeling command generation model suitable for FMT modeling. According to the method, aiming at a relatively high threshold used by fast imperative modeling software FMT, command data described by a Chinese natural language is constructed, core modeling commands of the FMT are associated with the command data in a one-to-one correspondence manner, and the core modeling commands and the command data are used as a data set with the constructed command data; through open source pre-training universal large model loading, fine tuning training is carried out to obtain a modeling command generation model, so that a corresponding Pascal modeling command capable of being compiled by the FMT can be generated by giving a modeling instruction expressed by a natural language when the FMT is used, the technical threshold of using the FMT to carry out CAD modeling is greatly reduced, the modeling efficiency is improved, and the modeling cost is reduced. And the time cost for learning FMT imperative modeling is reduced, so that the design efficiency of the traveling wave tube is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traveling wave tube design and 3D modeling, and particularly to a modeling command generation model suitable for FMT modeling. Background Art

[0002] Traveling wave tubes are widely used in military applications, communication systems and other fields due to their wide operating frequency band, high output power and high efficiency. The fast modeling software (FastModelingTools, abbreviated as FMT) developed by the computer simulation technology team of the University of Electronic Science and Technology realizes imperative modeling. After writing the Pascal modeling language and compiling, it can generate accurate CAD models, and FMT has been integrated into the traveling wave tube multi-physics digital prototype software, greatly improving the efficiency of traveling wave tube CAD modeling.

[0003] For designers, the imperative modeling of FMT has a relatively high threshold, and it takes a relatively high time cost to learn the imperative modeling of FMT; therefore, if the difficulty of FMT modeling commands can be reduced, the FMT modeling efficiency will be greatly improved, and then the design efficiency of traveling wave tubes will be improved. Summary of the Invention

[0004] In view of the above existing problems or deficiencies, in order to more conveniently perform fast CAD modeling of traveling wave tubes in FMT and reduce the use threshold of the FMT imperative modeling technology, the present invention provides a modeling command generation model suitable for FMT modeling, constructs a large language model for the FMT imperative modeling technology, and through a dialogue form similar to mainstream general large models such as ChatGPT, Claude, and Wenxin Yiyan, the designer gives modeling instructions in natural language, and the model can generate corresponding Pascal modeling commands that can be compiled by FMT, greatly reducing the technical threshold for using FMT for CAD modeling and improving the modeling efficiency.

[0005] A modeling command generation model suitable for FMT modeling is specifically constructed as follows:

[0006] Step1. According to the FMT core modeling commands, construct the command data of the corresponding modeling command generation model.

[0007] Step2. Construct a dataset with a one-to-one correspondence between natural language and FMT modeling commands.

[0008] According to the command data constructed in Step1, construct the corresponding Chinese natural language descriptions for each command data, and use the data pairs composed of the command data after all the Chinese natural language descriptions are constructed and the corresponding core modeling commands as the dataset.

[0009] Step3. Model training:

[0010] The data in the Step 2 dataset is processed into a dialogue between the user and the AI assistant. The Chinese natural language description is [user′s value], and the corresponding modeling command is [assistant′s value]. It is stored in a JSON file and finally forms data.json.

[0011] Then use the open source pre-trained general large model to load data.json for fine-tuning training, and the final modeling command generates a model and saves it in the output folder.

[0012] Step 4. Model deployment: Build an HTTP service, deploy the modeling command generation model obtained in step 3 on the local server, and provide a POST interface for text generation.

[0013] Step 5. Generate FMT core modeling commands;

[0014] Use the modeling command generation model deployed in Step 4 to input modeling instructions expressed in Chinese natural language to generate professional-level FMT core modeling commands.

[0015] Furthermore, the FMT core modeling commands include 12 types, including connecting points into lines, arcs, spirals, stretching, rotation, cylinders, spheres, sweeping, masking, arrays, Boolean operations and assembly.

[0016] Furthermore, each command data corresponding to the core modeling command is provided with at least three natural language descriptions with different expressions but the same semantics, ultimately forming a data set for model fine-tuning training required in Step 3.

[0017] Furthermore, each type of command data in the Step 2 data set is matched and identified using an AI semantic understanding program to further reduce the difficulty of modeling commands.

[0018] The above-mentioned modeling command generation model suitable for FMT modeling has the following specific working process: the core modeling command automatically generates the modeling program command according to the overall architecture of the FMT modeling program; the core modeling command and the modeling program command together constitute a complete modeling program that can be compiled by the FMT modeling kernel, and the CAD model is finally displayed after rendering.

[0019] Furthermore, the modeling program commands include program declaration, definition of parameter variables, definition of entity variables, new model creation and model saving commands.

[0020] In summary, in view of the high threshold of the fast imperative modeling software FMT, by constructing command data described in Chinese natural language, the core modeling commands of FMT are associated with the command data one by one; and taking the constructed command data and the corresponding core modeling commands as a data pair to form a data set, and fine-tuning and training through an open-source pre-trained general large model to obtain a modeling command generation model, so that when using FMT, giving a modeling instruction in natural language can generate corresponding Pascal modeling commands that FMT can compile, greatly reducing the technical threshold of using FMT for CAD modeling, improving the modeling efficiency, reducing the time cost required to learn FMT imperative modeling, and thus improving the design efficiency of traveling wave tubes. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a schematic flowchart of the present invention;

[0022] Figure 2 is the content format of the json file after processing the data set of the model proposed by the present invention;

[0023] Figure 3 is the deployment flowchart of the modeling command generation model of the embodiment;

[0024] Figure 4 are some modeling commands accurately generated by the model of the embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] For the convenience of those skilled in the art to understand the technical content of the present invention, taking the Qwen2.5-7B-Instruct model as the basic model as an example, the content of the present invention will be elaborated in detail below with reference to the accompanying drawings.

[0026] A modeling command generation model suitable for FMT modeling, the construction process of which is as Figure 1 shown, including:

[0027] Step1. Determine the FMT modeling command type, Step2. Construct a "natural language - FMT modeling command" data set, Step3. Fine-tune the Qwen2.5-7B-Instruct model, Step4. Deploy the modeling command generation model, and Step5. Generate FMT modeling commands in five parts.

[0028] Step1. According to the FMT core modeling commands, construct the command data of the modeling command generation model in one-to-one correspondence.

[0029] According to the Pascal language modeling rules of FMT, the current core modeling commands include: connecting points into lines, arcs, helical lines, stretching, rotating, cylinders, spheres, sweeping, masking, arraying, Boolean operations, and assembly, a total of 12 common modeling commands. In addition, the FMT modeling program commands include: declaration, defining parameter variables, defining entity variables, creating a new model, and saving the model commands.

[0030] Step2. Construct the "Natural Language - FMT Modeling Command" dataset.

[0031] According to the command data constructed in Step1, construct the corresponding Chinese natural language descriptions for each command data. Each modeling command is equipped with three natural language descriptions with different expressions but the same semantics, and finally form the fine-tuning training dataset required for the Step3 modeling command generation model.

[0032] Some modeling commands and their corresponding Chinese natural language descriptions are as follows:

[0033] (1) Boolean command

[0034] Command: I := Bool(P, Comp, 'and');

[0035] Natural language description: 1. Merge P and Comp through Boolean addition to obtain I; 2. Boolean addition: Merge P and Comp into I; 3. Add P and Comp to generate I.

[0036] (2) Rotation command

[0037] Command: T := Revolution(0, Y, 'z');

[0038] Natural language description: 1. Rotate the line segment Y around the z-axis to generate the three-dimensional body T; 2. T is generated by rotating the line segment Y around the z-axis; 3. Rotate the line segment Y around the z-axis to generate the three-dimensional body named T.

[0039] (3) Stretching command

[0040] Command: Obj := Extrusion(0, WH_48, 11.8, '-z');

[0041] Natural language description: 1. Stretch the line segment WH_48 by 11.8 along the -z direction to generate the shape named Obj; 2. Stretch the line segment WH_48 along the -z axis direction by 11.8 to generate Obj; 3. Stretch WH_48 along the negative z-axis direction by 11.8 to obtain WH_48.

[0042] (4) Arc command

[0043] Command: H := Circle1(11.2, 2.3, 7.4, 11.9, 14.7, 13.4, 13.8, 11.8, 5.3);

[0044] Natural language description: 1. Draw an arc H in space with points (11.2, 2.3, 7.4), (11.9, 14.7, 13.4), and (13.8, 11.8, 5.3); 2. The arc H is defined by three points (11.2, 2.3, 7.4), (11.9, 14.7, 13.4), and (13.8, 11.8, 5.3); 3. Generate an arc using the three points (11.2, 2.3, 7.4), (11.9, 14.7, 13.4), and (13.8, 11.8, 5.3), called H.

[0045] (5) Cylinder command

[0046] Command: Shape := Cylinder(0, 16.1, 2.9, 9.3, 'x', 1.4, 1.4);

[0047] Natural language description: 1. Generate a cylinder Shape through the bottom center coordinates (16.1, 2.9, 9.3), along the x - direction, with a diameter of 1.4 and a height of 1.4; 2. Definition of the cylinder Shape: The bottom center is at (16.1, 2.9, 9.3), the direction is x, the diameter is 1.4, and the height is 1.4; 3. Construct a cylinder Shape with the bottom center coordinate point (16.1, 2.9, 9.3), along x, with a bottom - circle diameter of 1.4 and a height of 1.4.

[0048] Step3. Fine - tune the Qwen2.5 - 7B - Instruct model;

[0049] Process the data in the Step2 dataset in the form of a dialogue between "user" and "AI assistant". The Chinese natural language description is [user′s value], and the corresponding modeling command is [assistant′s value]. Store the processed data in a JSON file to finally form data.json. The data format is as Figure 2 shown.

[0050] Load data.json using the Qwen base model Qwen2.5-7B-Instruct model, and perform fine-tuning training using the parameter-efficient fine-tuning (PEFT) method of LoRA (Low-Rank Adaptation) technology. The final modeling command generation model is saved in the output folder, which contains the model weight file adapter_model.safetensors, the tokenizer-related files vocab.json and merges.txt, the model training and configuration files adapter_config.json and tokenizer_config.json, and the checkpoint folder checkpoints. It supports directly importing the model from the checkpoint to continue training for newly added data, eliminating the need to train from scratch and saving the model fine-tuning training time.

[0051] Step4. Deploy the modeling command generation model;

[0052] Build an HTTP service using FastAPI and deploy the modeling command generation model obtained in Step 3 on a local server, providing a POST interface named generate for text generation. The model deployment process is as Figure 3 shown.

[0053] (1) Initialize the FastAPI application instance and define all API routes and functions.

[0054] (2) Load the tokenizer to convert the input text into a token sequence acceptable to the model.

[0055] (3) Load the base model Qwen2.5-7B-Instruct model, which provides natural language generation capabilities without fine-tuning.

[0056] (4) Integrate the base model with the LoRA weights to generate a new model instance, adding fine-tuning weights while maintaining the original base model weights, enabling the model to be used for modeling command generation tasks while retaining its original functions.

[0057] (5) Set the model to evaluation mode to ensure that the weights are not updated during inference, saving memory and computational resources.

[0058] Step5. Generate FMT modeling commands;

[0059] Input the modeling instructions in Chinese natural language into the modeling command generation model deployed in Step4. The FMT modeling commands that can be generated in Step5 include connecting dots into lines, stretching, and rotating. As Figure 4The following are some of the modeling commands that can be accurately generated, namely the cylinder command, the Boolean addition command, the Boolean subtraction command, the revolution command, the extrusion command, and the arc command.

[0060] As can be seen from the above embodiments, the modeling commands provided by the present invention generate a model, which constructs a large language model for the imperative modeling technology of FMT. In the form of dialogue similar to mainstream general large models such as ChatGPT, Claude, and ERNIE Bot, the designer gives modeling instructions expressed in natural language, and the model can generate corresponding Pascal modeling commands that can be compiled by FMT, greatly reducing the technical threshold for using FMT for CAD modeling, improving the modeling efficiency, reducing the time cost required to learn the imperative modeling of FMT, and thus improving the design efficiency of traveling wave tubes.

Claims

1. A modeling command generation model applicable to FMT modeling, characterized in that, The specific construction steps are as follows: Step1. According to the FMT core modeling commands, construct the command data of the modeling command generation model in one-to-one correspondence; Step2. Construct a dataset with a one-to-one correspondence between natural language and FMT modeling commands; According to the command data constructed in Step1, construct the Chinese natural language descriptions corresponding to each command data respectively, and use the data pairs composed of the command data after all the Chinese natural language descriptions are constructed and the corresponding core modeling commands as the dataset; Step3. Model training; Process the data in the Step2 dataset into the form of a conversation between the user and the AI assistant. The Chinese natural language description is [user′s value], and the corresponding modeling command is [assistant′s value], and store it in a JSON file to finally form data.json; Then use the open-source pre-trained general large model to load data.json for fine-tuning training, and save the final modeling command generation model in the output folder; Step4. Model deployment; Construct an HTTP service, deploy the modeling command generation model obtained in Step3 on the local server, and provide a POST interface for text generation; Step5. Generate FMT core modeling commands; Use the modeling command generation model deployed in Step4 to input the modeling instructions in Chinese natural language expression, and the generation of professional-level FMT core modeling commands can be realized.

2. The modeling command generation model applicable to FMT modeling according to claim 1, wherein: The FMT core modeling commands include 12 types: connecting points into lines, arcs, helical lines, stretching, rotation, cylinders, spheres, sweeps, masking, arrays, Boolean operations, and assemblies.

3. The modeling command generation model applicable to FMT modeling according to claim 1, wherein: Each command data corresponding to the core modeling commands is accompanied by at least three natural language descriptions with different expressions but the same semantics.

4. The modeling command generation model applicable to FMT modeling according to claim 1, characterized in that: Each command data in the Step2 dataset is matched and recognized by the AI semantic understanding program to further reduce the difficulty of the modeling commands.

5. The modeling command generation model applicable to FMT modeling according to claim 1, characterized in that, The specific working process is as follows: The core modeling commands automatically generate modeling program commands according to the overall architecture of the FMT modeling program. The core modeling commands and the modeling program commands together form a complete modeling program that can be compiled by the FMT modeling kernel, and finally display the CAD model after rendering.

6. The modeling command generation model applicable to FMT modeling according to claim 5, characterized in that: The modeling program commands include commands for declaring, defining parameter variables, defining entity variables, creating a new model, and saving the model in the program.