Visual modeling method based on PML language in ship design software
By importing PML model statements into a vector database and combining them with efficient search and semantic matching techniques, visual modeling of the PML language in AVEVA Marine software was achieved, solving the problems of operational complexity and high training costs, and improving design efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA SHIPPING IND JIANGSU
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-02
AI Technical Summary
The PML language of AVEVA Marine software is complex to operate, resulting in low modeling efficiency, high training costs, and insufficient flexibility in model adjustment and reuse.
Import PML model statements into a vector database, combine FAISS and ChromaDB to achieve efficient similarity search and semantic matching, and automatically generate executable PML model statements that conform to the AVEVA Marine software syntax specification through natural language interaction.
It significantly reduced technical training costs, improved design efficiency and accuracy, reduced human error, and enabled automated model generation and intelligent modification.
Smart Images

Figure CN122133263A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a visual modeling method based on the PML language in ship design software, which belongs to the management technology field of ship digital design and manufacturing technology. Background Technology
[0002] With the rapid development of modern industrial technology, digitalization, intelligentization, and informatization have become important driving forces for the transformation and upgrading of the shipbuilding industry. Currently, commonly used ship design software includes AutoCAD, CATIA, ShipConstructor, and AVEVA Marine, among which AVEVA Marine is widely used in ship and marine engineering design. AVEVA Marine has strong integration capabilities, realizing cross-disciplinary functional integration of hull, outfitting, engineering, and design, providing shipbuilding companies with integrated solutions. It also provides powerful 3D modeling tools, enabling designers to create detailed ship models, supporting multiple data formats and interfaces for easy integration with other software systems. Furthermore, it adopts a modular design, allowing users to select and configure different functional modules as needed to meet the requirements of different projects.
[0003] When performing 3D ship design modeling in AVEVA Marine software, the operation relies on a complex design interface, professional operating procedures, and the underlying PML language. The underlying PML language of AVEVA Marine software is a scripting language developed by AVEVA specifically for its engineering design software, primarily used for secondary development and automation tasks. PML is a proprietary macro language within AVEVA Marine software, deeply integrated, and can directly call PDMS / Marine APIs and data structures to automate engineering logic such as equipment modeling and piping design. This includes, for example, pipe support program development or interaction with AutoCAD DWG files. However, due to the complexity of operating the underlying PML language in AVEVA Marine software, it is prone to low modeling efficiency, high personnel training costs, and human error, and model adjustment and reuse are not flexible enough.
[0004] Therefore, there is an urgent need for a visual modeling method based on the PML language in ship design software, which can significantly reduce the software usage threshold, improve design efficiency and accuracy, and achieve rapid, intuitive and automated model building and modification to solve the problems mentioned in the background technology. Summary of the Invention
[0005] The summary section of this application is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0006] To address the problems and shortcomings of existing technologies, this invention aims to provide a visual modeling method based on the PML language in ship design software. Its core components include storing PML model statements from AVEVA Marine software into a vector database, and integrating FAISS and ChromaDB to achieve efficient similarity search and semantic matching. The current system employs techniques such as sentence-transformers embedded models, INT8 quantization, and model distillation, significantly improving retrieval efficiency and reducing resource consumption. Modelers can interact via natural language, and the system automatically calls matching template statements from the vector database. Templates support parametric adjustments; users can modify attributes such as dimensions through drag-and-drop and preview model changes in real time. Finally, it automatically generates executable PML model statements conforming to the AVEVA Marine software syntax specifications, quickly completing design modeling tasks. This addresses the problems mentioned in the background.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] As a first aspect of this application, the present invention discloses a visual modeling method based on the PML language in ship design software, comprising the following steps:
[0009] Step 1: Export PML model statements in language text format from the ship design software and import them in batches into the vector database;
[0010] Step 2: Upload the standard template data to the vector database, and perform correlation training and fine-tuning on the model and its related attribute information in the vector database;
[0011] Step 3: Train the model based on the model statements and their corresponding rules of the parameterized text in the vector database to complete the parameterized model training;
[0012] Step 4: Enter natural language commands in the modeling window, and modify, create, and update the vector database according to the natural language commands;
[0013] Step 5: Generate or modify the 3D model based on the updated vector database, and then output it as an executable file for ship design software.
[0014] Preferably, the step 1, which involves batch importing PML model statements in language text format exported from the ship design software into the vector database, further includes the following steps:
[0015] Step 1.1: Remove redundant comments and invalid characters from the PML model statements to ensure that the data format meets the requirements of the vector database;
[0016] Step 1.2: Then, use the Sentence-Transformers model to generate high-dimensional vectors for the PML model statements and attach metadata;
[0017] Step 1.3: Use the INT8 quantization method to convert the high-dimensional vector into an 8-bit integer to reduce computation and storage requirements;
[0018] Step 1.4: Import the vector database in batches to complete the construction of the standard model knowledge base.
[0019] Preferably, in step 2, the standard template data is uploaded to the vector database, and its model and related attribute information are trained and fine-tuned, specifically including the following steps:
[0020] Step 2.1: Extract language rules and map relationships based on the model and related attribute information in the vector database;
[0021] Step 2.2: Use the parser to construct an AST (Abstract Syntax Tree) and a knowledge graph based on the extracted language rules;
[0022] Step 2.3: Combine the knowledge graph with the rule engine to parse the PML model statements in the vector database;
[0023] Step 2.4: Integrate the incremental results of parsing the PML model statements in the vector database into the knowledge graph.
[0024] Preferably, in step 3.1, contrastive learning is used to establish the association between parameters and features through rule extraction and relation mapping, constructing triplet training data. The triplet training data includes anchor points, positive samples, and negative samples. In the contrastive learning framework, triplet loss is used to optimize the feature space, bringing positive samples closer to samples of the same class and distancing negative samples from samples of different classes. Triplet data is then extracted from the knowledge graph and used as a supervisory signal to guide the training of the feature encoder. A self-attention layer is introduced into the feature editor to dynamically calculate the relational weights between features, achieving flexible association between parameters and features.
[0025] Preferably, in step 3, the model is trained based on the parameterized text model statements and their corresponding rules in the vector database to complete the parameterized model training, specifically including the following steps:
[0026] Step 3.1: Use contrastive learning to establish the association between parameters and features, and construct triple training data;
[0027] Step 3.2: Train the twin network and combine it with the Adapter for fine-tuning to achieve personalized adaptation and automatic maintenance of constraint consistency;
[0028] Step 3.3: Continuously perform Adapter fine-tuning, and through continuous learning, enable the Siamese network to form an evolutionary closed-loop optimized parameter association model.
[0029] Preferably, in step 3.2, training the Siamese network and then combining it with Adapter fine-tuning technology to achieve adaptive maintenance of constraint consistency further includes the following steps:
[0030] Step 3.2.1: Train a large Siamese network model as a general parametric feature encoder;
[0031] Step 3.2.2: Freeze the general parameter feature encoder and only insert and train the Adapter module to adapt to its unique data;
[0032] Step 3.2.3: Encode the modified parameters into new feature vectors, and calculate the similarity between the new feature vectors and other model vectors to generate an adjusted model.
[0033] As a second aspect of this application, the present invention also discloses a visual modeling system based on the PML language in ship design software, comprising:
[0034] The statement processing module is used to export PML model statements in language text format from AM software and import them in batches into the vector database;
[0035] The training and fine-tuning module is used to upload standard template data to the vector database and perform correlation training and fine-tuning on the model and its related attribute information;
[0036] The parameterized training module is used to train the model statements and their corresponding rules of the parameterized text in the vector database to complete the parameterized model training.
[0037] The Create and Modify module is used to input natural language commands in the modeling window, and modify, create, and update the vector database according to the natural language commands.
[0038] The driver generation module is used to generate or modify 3D models based on the updated vector database, and then output them as executable files for AM software.
[0039] As a third aspect of this application, the present invention also discloses an electronic device comprising:
[0040] At least one processor, and a memory communicatively connected to said at least one processor;
[0041] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the steps of the visualization modeling method based on the PML language in ship design software.
[0042] As a fourth aspect of this application, the present invention also discloses a computer storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the above-described visualization modeling method based on the PML language in ship design software.
[0043] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0044] This invention provides a visual modeling method based on PML language in ship design software. The method includes exporting PML model statements in language text format from the ship design software and importing them in batches into a vector database. Standard template data is uploaded to the vector database, and the models and their related attribute information within the vector database are trained and fine-tuned for correlation. The parametric model training is completed based on the model statements and their corresponding rules in the parametric text of the vector database. Natural language commands are input in the modeling window, and the vector database is modified, created, and updated according to these commands. The updated vector database drives the generation or modification of a 3D model, which is then output as an executable file for the ship design software. This invention, through a natural language interaction interface, allows users to automatically generate and modify 3D models without needing in-depth knowledge of the complex operations of professional modeling software such as AVEVA Marine, significantly reducing technical training costs and lowering the skill threshold for personnel. Using the system developed by this invention, designers can clearly view the complete process logic of model generation and modification, enhancing their understanding of the model construction mechanism, reducing errors caused by unfamiliarity with operations, and effectively improving the accuracy and reliability of the design. By combining parametric models with natural language processing, this invention automates model generation and enables intelligent modification, significantly reducing manual operations, lowering the probability of errors caused by repetitive and complex tasks, and improving overall design efficiency. This invention can shorten model design and modification time, reduce reliance on highly skilled operators, and lower the cost of rework due to design errors, achieving cost savings and improved efficiency from multiple dimensions. It is suitable for modern engineering design environments that require frequent iteration and collaboration. Attached Figure Description
[0045] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application and to make other features, objects, and advantages of the application more apparent. The illustrative embodiments and descriptions of this application are used to explain the application and do not constitute an undue limitation of the application.
[0046] In the attached diagram:
[0047] Figure 1 This is a flowchart illustrating the steps of the visual modeling method based on PML language in an embodiment of the present invention.
[0048] Figure 2 This is a flowchart of the visual modeling method based on PML language in an embodiment of the present invention;
[0049] Figure 3 This is the execution diagram of the PML-based visual modeling system in this embodiment of the invention.
[0050] Figure 4 This is a flowchart of generating a model by inputting natural language instructions into the modeling window in an embodiment of the present invention;
[0051] Figure 5 This is a code diagram of the statement for generating a PML model corresponding to a 3D model in an embodiment of the present invention;
[0052] Figure 6 This is a schematic diagram of the structure of the electronic device in an embodiment of the present invention. Detailed Implementation
[0053] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0054] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0055] Example
[0056] This invention discloses a visual modeling method based on the PML language in ship design software. The following will describe this disclosure in detail with reference to the accompanying drawings and embodiments. (Refer to...) Figures 1 to 3 As shown, the present invention mainly includes the following steps:
[0057] Step 1: Export the PML model statements in language text format from the AM software and import them in batches into the vector database;
[0058] Step 2: Upload the standard template data to the vector database, and perform correlation training and fine-tuning on the model and its related attribute information in the vector database;
[0059] Step 3: Train the model based on the parameterized text in the vector database and its corresponding rules to complete the parameterized model training;
[0060] Step 4: Enter natural language commands in the modeling window, and modify, create, and update the vector database according to the natural language commands;
[0061] Step 5: Generate or modify the 3D model based on the updated vector database, and then output it as an executable file for AM software.
[0062] AVEVA Marine (AM) is a dedicated design software for ships and marine engineering, providing a complete solution from conceptual design to production and construction. It supports rapid 3D modeling of hull structures, especially in the conceptual and contract design phases, quickly generating mathematical hull models and performing fundamental calculations such as weight, stability, and cargo capacity. AVEVA Marine supports end-to-end data transfer from conceptual design to production design, reducing the risk of design iterations. It also supports multi-site collaboration suitable for large and complex projects, offering flexible configuration options to adapt to different design processes and improving overall efficiency through digital tools.
[0063] First, we export plain text PML model statements from AVEVA Marine software and import them into a vector database to build a standard model knowledge base. PML model statements use a dedicated scripting language within AVEVA Marine software, supporting object-oriented programming features. We first use commands to collect target model components and filter specific objects using conditions. The filtered data is then stored in PML arrays or object structures, processed into text format, and then organized according to PML syntax rules. Finally, the data is written to a PML format file and exported via a secondary development interface. In AVEVA Marine software, we export model statements in Text format using 3D modeling tools. The exported plain text PML model statements include geometric topological relationships, component assembly hierarchies, material and physical property definitions, coordinate systems, and dimensioning, encompassing all template creation statements such as create (generate geometric elements), stru (structural design), set desc (describe the properties of geometric elements), and set pos (combine the position or coordinates of elements).
[0064] The exported PML model statements are imported in batches into a vector database to build a standardized and parameterized standard model knowledge base. FAISS and ChromaDB are integrated to achieve efficient similarity search and semantic matching. Specifically, redundant comments and invalid characters in the PML model statements are first removed, and numerical parameters such as geometric dimensions and material properties are standardized to ensure the data format meets the requirements of the vector database. Then, a Sentence-Transformers model is used to generate high-dimensional vectors from the PML model statements, along with metadata, creating context-aware vector representations that capture multimodal semantics such as geometry, topology, and materials. Simultaneously, a FAISS approximate nearest neighbor index and a ChromaDB semantic retrieval system are built, supporting batch import. The INT8 quantization method is then used to convert high precision to 8-bit integers to reduce computation and storage requirements. Finally, the data is imported into the vector database in batches to complete the construction of the standard model knowledge base.
[0065] Upload standard template data to a vector database, and perform correlation training and fine-tuning on the models and their related attribute information within the vector database to ensure the consistency of logical relationships between the data. Specifically, this includes the following steps:
[0066] Step 2.1: Extract language rules and map relationships in the vector database based on the model and related attribute information;
[0067] Step 2.2: Use the parser to construct an AST (Abstract Syntax Tree) and a knowledge graph based on the extracted language rules;
[0068] Step 2.3: Combine the knowledge graph with the rule engine to parse the PML model statements in the vector database;
[0069] Step 2.4: Merge the incremental results of the PML model statements in the parsed vector database into the knowledge graph.
[0070] Specifically, an NLP coprocessor extracts language rules and maps relationships to the model and related attribute information from the original database. Combined with the text parsing module of the NLP coprocessor's inference engine, structured knowledge such as entities and relationships is extracted from unstructured text. The NLP coprocessor accelerates semantic analysis and transforms this knowledge into a searchable rule base. Vectorization techniques are used to construct an entity association network, and hardware-accelerated similarity calculations enable efficient relationship mapping and matching. A lexical analyzer decomposes the source code into a sequence of tokens, each token containing type and value information. A parser converts the token sequence into an Abstract Syntax Tree (AST) based on language rules, ensuring that the AST node types correspond to the grammatical structure. The AST represents the code in a tree structure, with each node corresponding to a specific grammatical element. The AST nodes are traversed to extract key entities and their relationships. These entities and relationships are then integrated with the original database and stored as a knowledge graph using a graph database. PML model statements are converted into a structured data format recognizable by the rule engine. Simultaneously, entities, attributes, and relationships from the model are extracted to construct the output knowledge graph triple structure. An inference engine is then used to perform path reasoning and conflict detection based on the knowledge graph. Knowledge graphs resolve semantic ambiguity and relational reasoning problems, while rule engines handle deterministic computational logic. The combination of the two significantly improves the parsing power and decision interpretability of complex PML models. Structured data such as extracted entities, attributes, and relationships are cleaned and standardized to eliminate noise and inconsistencies, ensuring data quality meets knowledge graph requirements. The parsing results are then represented in a triple structure and aligned with the existing knowledge graph's namespace. New triples are then written into the knowledge graph via batch import interfaces or APIs from the graph database, preserving original data version information and ensuring logical consistency between data through the rule engine.
[0071] The model is trained based on the parameterized text in the vector database and its corresponding rules. The specific steps include:
[0072] Step 3.1: Use contrastive learning to establish the association between parameters and features, and construct triple training data;
[0073] Step 3.2: Train the twin network and combine it with the Adapter for fine-tuning to achieve personalized adaptation and automatic maintenance of constraint consistency;
[0074] Step 3.3 involves continuously fine-tuning the Adapter to enable the Siamese network to form an evolutionary closed-loop optimization parameter association model through continuous learning.
[0075] The rules for corresponding model statements in parametric text include model attribute information such as coordinates (pos), material (matref), size (psize), pose, local coordinates (lohe), thickness (height), fuzz radius (fradiu), fill mode (pave), and optional attribute (point). For example, for a square Q235B sheet material of model number 500, the corresponding parameters are the four points of the square sheet material, represented as PAVE1 POS (coordinates): X0 Y0 Z0; PAVE2 POS (coordinates): X0 Y500 Z0; PAVE3 POS (coordinates): X500 Y500 Z0; PAVE4 POS (coordinates): X500 Y0 Z0; where POS represents the corresponding coordinate point. The sheet material's thickness (height) is 20, and the material (matref) is Q235B.
[0076] Specifically, contrastive learning is used to establish the association between parameters and features through rule extraction and relation mapping, constructing triplet training data. Contrastive learning builds a feature space mapping relationship between positive and negative sample pairs, combined with rule extraction and relation mapping methods, to achieve deep association modeling between parameters and features. Triplet training data includes anchor points, positive samples, and negative samples. Anchor points are represented by standard parameter data configurations, such as a straight ladder width of 400mm, which can be based on the "Code for Construction of Steel Seagoing Ships" or the standards of the International Association of Classification Societies (IACS). Positive and negative samples are formed by exporting sample files of existing standard and non-standard parameter data to a vector database using the existing AVEVAMarine model library. In the contrastive learning framework, the feature space is optimized through triplet loss, i.e., narrowing the distance between positive samples and similar samples, and widening the distance between negative samples and dissimilar samples. Triplet data is extracted from the knowledge graph and used as a supervisory signal to guide the training of the feature encoder. A self-attention layer is introduced into the feature editor to dynamically calculate the relational weights between features, achieving flexible association between parameters and features. Adjusting the weights of different tasks in the loss function during the training phase can improve the robustness of the trained model.
[0077] For example, if the anchor point of a straight ladder is {"type": "ladder", "width": 400, "height": 5000,...}, it represents the model information of a standard straight ladder. A positive sample is {"type": "ladder", "width": 350, "height": 5000, ...}, indicating that the width of the ladder has been fine-tuned. A negative sample is {"type": "valve", "diameter": 50, ...}, representing a completely unrelated valve. In other words, V_anchor represents the features of a 400mm standard width ladder, V_positive represents the features of a ladder fine-tuned to 350mm width, and V_negative represents the features of a 50mm valve, which is unrelated to the ladder width. The more similar the parameter configurations of two models, the closer their feature vectors are in space.
[0078] The specific steps for training the Siamese network in step 3.2 include:
[0079] Step 3.2.1: Train a large Siamese network model as a general parametric feature encoder;
[0080] Step 3.2.2: Freeze the general parameter feature encoder and only insert and train the Adapter module to adapt to its unique data;
[0081] Step 3.2.3: Encode the modified parameters into new feature vectors, and calculate the similarity between the new feature vectors and other model vectors to generate the adjusted model.
[0082] Furthermore, we employ model distillation to further improve performance or optimize model efficiency. We first train a high-performance Siamese network model as a knowledge source, continuously adapting and optimizing to enhance generalization ability. We train a large Siamese network using the existing AVEVA Marine model library as a pre-trained model, also serving as an encoder for general parametric features. The AVEVA Marine model library contains parametric models of hull structures, pipeline layouts, etc., whose data is typically stored in point cloud or mesh format, along with attributes such as material and dimensions. A Siamese network is a symmetric neural network that extracts common features from input data through shared weights, often used for similarity measurement or parameter matching tasks. We freeze the general encoder, inserting and training only lightweight trainable adapter modules to adapt to its unique data. The core idea is to insert lightweight trainable adapter modules into each layer of the pre-trained model, updating only the parameters of these modules while keeping the original pre-trained model parameters frozen, thus achieving efficient fine-tuning with low computational and storage costs. When the user modifies the parameters, the parameters are encoded as feature vectors. The system calculates the similarity between the new vector and other model vectors in the database to quickly generate or adjust the model and ensure constraint consistency. The user-confirmed results generate new positive samples. The Adapter module is then continuously fine-tuned, making the Siamese network increasingly intelligent and forming an evolutionary closed loop. The feature representations of the Siamese network model are transferred to the Adapter module. The Siamese network learns the similarity between samples through a parallel structure with shared parameters, while Adapter fine-tuning achieves task adaptation by inserting lightweight modules into the pre-trained model, requiring only a small number of parameters to adapt to new tasks.
[0083] Finally, input natural language commands in the modeling window to modify, create, and update the vector database. Model generation and modification are achieved through inputting natural language commands into the modeling window, interacting with a visual PML language to complete the automated modeling process. The command type is used to determine whether it is a modification command or a creation command, such as... Figure 4 As shown. When a modification instruction is identified, the parameter characteristics are parsed based on the modification instruction, and the corresponding update vector database is updated by traversing the standard model database where the PML model statement is located. When a new instruction is identified, the best model is matched according to the new instruction, the parameter rule base is called, and a parameterized text statement is generated and updated accordingly in the vector database. Afterwards, constraint parsing is performed on the parameters to determine if they violate constraints. Input parameters are validated using predefined rules or conditions to ensure they comply with shipbuilding industry standards. If a constraint violation is detected, an adjustment scheme is regenerated and the constraint is recursively passed. Finally, a new PML model statement is generated, and after syntax validation, an executable PML model statement is output.
[0084] For example, users can simply enter the length and thickness of a square panel in the modeling window, or select "Create Square Panel" and enter the statement "500" for the length and 20 for the thickness. This will automatically create an executable PML model statement. We will embed this natural language input modeling window into the AVEVA Marine software platform. After the PML model statement is generated, it can be directly imported into a specified location within the AVEVA Marine software platform via a button. In other words, designers can automatically import or copy the contents of this text file into AVEVA Marine software with a single click.
[0085] like Figure 5 As shown, Figure 5 A 600x400 manhole cover generates a corresponding PML language text file in the AVEVA Marine software platform. From the AVEVA Marine software platform, a standard 3D model (such as a 600x400 manhole cover) is exported to generate a corresponding PML language text file (TEXT format). This file contains all the statements used to create the manhole cover (such as create stru, set desc, set pos, etc.). This is then processed by the visual modeling system based on PML language in the ship design software according to this invention. The designer inputs a natural language command into the software's interactive interface: "Create an 800x600 watertight manhole cover with a cover thickness of 12". The system's Natural Language Processing (NLP) module performs semantic parsing on this command, identifying the key intent. The system automatically generates a complete and grammatically correct PML statement text file; that is, the designer only needs one click to automatically import or copy the text file content into the AVEVA MARINE software.
[0086] As can be seen from the above embodiments, the core innovation of this invention likely lies in "how to cleverly use this tool" to solve the specific domain problem of PML language in AVEVA Marine software. That is, how to use professional PML code language and marine industry corpus to fine-tune or suggest a general large language model, making it a "domain expert" proficient in ship design. How to seamlessly and accurately convert the structured results parsed by NLP into executable PML code language and drive the generation of a stable automated closed loop from the 3D model. And how to enable the system to understand and handle implicit constraints not explicitly stated in the instructions but present in the design specifications (e.g., a certain size manhole cover must be fitted with a specific number of bolts).
[0087] To implement the above embodiments, this application also proposes a visual modeling system based on the PML language in ship design software, including a statement processing module, a training and fine-tuning module, a parametric training module, a creation and modification module, and a driver generation module. The statement processing module is used to export PML model statements in language text format from the AM software and import them in batches into a vector database. The training and fine-tuning module is used to upload standard template data to the vector database and perform correlation training and fine-tuning on the model and its related attribute information. The parametric training module is used to train the model statements and their corresponding rules in the parametric text of the vector database to complete the parametric model training. The creation and modification module is used to input natural language commands in the modeling window, modify and create new vector databases according to the natural language commands, and update the vector database. The driver generation module is used to generate or modify 3D models based on the updated vector database and then output them as executable files for the AM software.
[0088] To implement the above embodiments, this application also discloses an electronic device. (Refer to...) Figure 6 As shown, electronic device 600 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. The processing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0089] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although... Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can represent a device or multiple devices as needed.
[0090] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of some embodiments of this disclosure.
[0091] It should be noted that, in some embodiments of this disclosure, the computer storage medium described above can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0092] In some embodiments of this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0093] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0094] The aforementioned computer storage medium may be included within the aforementioned electronic device, or it may exist independently and not assembled into the electronic device. The aforementioned computer storage medium carries one or more programs, which, when executed by the electronic device, enable the electronic device to implement a visual modeling method based on the PML language in ship design software.
[0095] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings.
[0097] For example, two consecutively represented blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be located in a processor, and the names of these units do not necessarily constitute a limitation on the unit itself.
[0098] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0099] All technologies not described in detail in this invention are existing technologies. The above descriptions are merely some preferred embodiments of this disclosure and explanations of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalent features without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A visual modeling method based on the PML language in ship design software, characterized in that, Includes the following steps: Step 1: Export PML model statements in language text format from the ship design software and import them in batches into the vector database; Step 2: Upload the standard template data to the vector database, and perform correlation training and fine-tuning on the model and its related attribute information in the vector database; Step 3: Train the model based on the model statements and their corresponding rules of the parameterized text in the vector database to complete the parameterized model training; Step 4: Enter natural language commands in the modeling window, and modify, create, and update the vector database according to the natural language commands; Step 5: Generate or modify the 3D model based on the updated vector database, and then output it as an executable file for ship design software.
2. The visual modeling method based on PML language in ship design software according to claim 1, characterized in that, In step 1, the PML model statements in language text format exported from the ship design software are imported into the vector database in batches. This specifically includes the following steps: Step 1.1: Remove redundant comments and invalid characters from the PML model statements to ensure that the data format meets the requirements of the vector database; Step 1.2: Then, use the Sentence-Transformers model to generate high-dimensional vectors for the PML model statements and attach metadata; Step 1.3: Use the INT8 quantization method to convert the high-dimensional vector into an 8-bit integer to reduce computation and storage requirements; Step 1.4: Import the vector database in batches to complete the construction of the standard model knowledge base.
3. The visual modeling method based on PML language in ship design software according to claim 2, characterized in that, In step 2, the standard template data is uploaded to the vector database, and its model and related attribute information are trained and fine-tuned. Specifically, this includes the following steps: Step 2.1: Extract language rules and map relationships based on the model and related attribute information in the vector database; Step 2.2: Use the parser to construct an AST (Abstract Syntax Tree) and a knowledge graph based on the extracted language rules; Step 2.3: Combine the knowledge graph with the rule engine to parse the PML model statements in the vector database; Step 2.4: Integrate the incremental results of parsing the PML model statements in the vector database into the knowledge graph.
4. The visual modeling method based on PML language in ship design software according to claim 3, characterized in that, In step 3, the model is trained based on the parameterized text in the vector database and its corresponding rules to complete the parameterized model training. This specifically includes the following steps: Step 3.1: Use contrastive learning to establish the association between parameters and features, and construct triple training data; Step 3.2: Train the twin network and combine it with the Adapter for fine-tuning to achieve personalized adaptation and automatic maintenance of constraint consistency; Step 3.3: Continuously perform Adapter fine-tuning, and through continuous learning, enable the Siamese network to form an evolutionary closed-loop optimized parameter association model.
5. The visual modeling method based on PML language in ship design software according to claim 4, characterized in that, In step 3.1, contrastive learning is used to establish the association between parameters and features through rule extraction and relation mapping, constructing triplet training data. This triplet training data includes anchor points, positive samples, and negative samples. Within the contrastive learning framework, triplet loss optimizes the feature space, bringing positive samples closer to samples of the same class and distancing negative samples from samples of different classes. Triplet data is then extracted from the knowledge graph and used as a supervisory signal to guide the training of the feature encoder. A self-attention layer is introduced into the feature editor to dynamically calculate the relational weights between features, enabling flexible association between parameters and features.
6. The visual modeling method based on PML language in ship design software according to claim 4, characterized in that, Step 3.2, which trains the Siamese network and then combines it with the Adapter fine-tuning technique to achieve adaptive maintenance of constraint consistency, also includes the following steps: Step 3.2.1: Train a large Siamese network model as a general parametric feature encoder; Step 3.2.2: Freeze the general parameter feature encoder and only insert and train the Adapter module to adapt to its unique data; Step 3.2.3: Encode the modified parameters into new feature vectors, and calculate the similarity between the new feature vectors and other model vectors to generate an adjusted model.
7. A visual modeling system based on the PML language in ship design software, characterized in that, include: The statement processing module is used to export PML model statements in language text format from AM software and import them in batches into the vector database; The training and fine-tuning module is used to upload standard template data to the vector database and perform correlation training and fine-tuning on the model and its related attribute information; The parameterized training module is used to train the model statements and their corresponding rules of the parameterized text in the vector database to complete the parameterized model training. The Create and Modify module is used to input natural language commands in the modeling window, and modify, create, and update the vector database according to the natural language commands. The driver generation module is used to generate or modify 3D models based on the updated vector database, and then output them as executable files for AM software.
8. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1 to 7.
9. A computer storage medium storing a computer program thereon, characterized in that: When the computer program is executed by the processor, it performs the steps as described in any one of claims 1 to 7.