A double-layer adaptive evolutionary CAD modeling command generation method based on heterogeneous fuzzy and game

By constructing a closed-loop architecture for the entire process, the problems of fuzzy semantics and geometric parameter mapping, heterogeneous structure adaptation and game optimization in natural language-driven CAD command generation are solved, realizing high-fidelity and interpretable CAD command generation, which is suitable for industrial software and 3D modeling.

CN121809290BActive Publication Date: 2026-05-08UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF ELECTRONICS SCI & TECH OF CHINA
Filing Date
2026-03-09
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies cannot effectively solve the problems of accurate mapping between fuzzy semantics and geometric parameters, dynamic adaptation of heterogeneous structures, interpretability of generation logic, and multi-objective collaboration in game-theoretic optimization in natural language-driven CAD command generation. This results in generated commands that are semantically fluent but not feasible in engineering and difficult to meet the executability and auditing requirements of industrial design.

Method used

A two-layer adaptive evolutionary technology solution based on heterogeneous fuzzy logic and game theory is constructed. Through a closed-loop architecture of semantic parsing, encoding disambiguation, game generation, fuzzy evolution refinement, verification backtracking, and knowledge accumulation, a high-fidelity conversion from natural language to CAD commands is achieved, including fuzzy semantic quantization, dynamic adaptation of heterogeneous operators, dual-agent collaborative game optimization, and incremental learning.

Benefits of technology

It achieves accurate mapping from fuzzy semantics to precise geometric parameters, adapts to CAD command structures of varying complexity, generates interpretable logic, dynamically balances diversity and executability, meets the auditability requirements of industrial design, and reduces the cost of model iterative development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809290B_ABST
    Figure CN121809290B_ABST
Patent Text Reader

Abstract

The application discloses a kind of double-layer adaptive evolution CAD modeling command generation methods based on heterogeneous fuzzy and game, belong to artificial intelligence and computer aided design intelligent modeling technical field.This method solves the technical problems of fuzzy semantics difficult to be quantified in existing natural language driven CAD command generation technology Mapping, heterogeneous command poor adaptability, low command executable generated and reasoning process "black box" technology.This method constructs semantic analysis-game generation-evolution refinement-verification backtracking-knowledge precipitation whole-process closed-loop architecture, the application can be applied to industrial software, three-dimensional modeling, intelligent design system and other fields, improves the engineering executable of command generation, generalization ability and reasoning explainability, balances the generation diversity and feasibility, reduces model iteration cost, provides technical support for text-driven CAD modeling technology industrialization landing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent modeling technology in artificial intelligence and computer-aided design, and particularly relates to a two-layer adaptive evolutionary CAD modeling command generation method based on heterogeneous fuzzy logic and game theory. This method integrates heterogeneous operator networks, fuzzy inference mechanisms, and a game-theoretic optimization framework to achieve intelligent generation from natural language instructions to executable CAD modeling command sequences, applicable to fields such as industrial software, 3D modeling, and intelligent design systems. Background Technology

[0002] With the development of artificial intelligence and natural language processing technologies, text-driven CAD command generation has become a key direction for the intelligentization of industrial software. Describing design intent in natural language and automatically converting it into CAD operation commands can significantly lower the barrier to entry, improve modeling efficiency, and support rapid design across multiple fields. However, this process needs to overcome three core bottlenecks: the ambiguity of natural language, the heterogeneity of CAD commands, and the game-like nature of generation and constraints. Existing technologies lack systematic solutions to these issues, leading to numerous core defects. Rule matching and template mapping methods rely on manually defined semantic patterns, resulting in poor generalization ability, difficulty in adapting to complex statements and combined operations, high maintenance costs, and insufficient scalability. More importantly, these methods cannot parse engineering semantics with vague expressions such as "approximately" or "close to," and are even less able to adapt to the heterogeneous structure of discrete operation symbols and continuous geometric parameters in CAD commands. Manual templates cannot cover all heterogeneous command combination scenarios. Compared to rule-based matching methods, sequence generation models based on Seq2Seq or Transformer can capture semantic context to some extent, but they still have obvious limitations. They lack awareness of geometric constraints, and the generated commands often have semantically reasonable but unexecutable problems. They also have logical defects such as inconsistent parameters and incorrect operation order. Furthermore, they are not good at modeling the heterogeneous mixed structure of discrete symbols and continuous parameters in CAD commands, and they lack a mapping mechanism from fuzzy semantics to precise geometric parameters. They cannot transform ambiguous spatial relationships such as "overlap" and "alignment" into precise constraints, which lays the groundwork for subsequent optimization.

[0003] While traditional generative adversarial networks (GANs) have been attempted to enhance the plausibility of generated results, their architecture is primarily designed for image generation and faces significant challenges in the field of discrete command sequence generation. Their susceptibility to pattern collapse stems from the lack of a collaborative game framework between the generator and verifier. They rely solely on adversarial matching to achieve surface distribution fitting, with the discriminator only measuring the surface distribution similarity of command sequences. This fails to comprehensively evaluate geometric topological constraints and semantic logical consistency from a game payoff perspective, and it neglects to incorporate fuzzy semantic parsing accuracy and heterogeneous structural adaptability into the game payoff function, leading to an imbalance in the adversarial process. At a deeper level, existing technologies generally neglect the engineering logic and parameter constraints behind the command layer. Essentially, this reflects a lack of collaborative modeling of fuzzy semantics, heterogeneous structures, and game optimization. Specifically, this manifests as a lack of quantitative parsing mechanisms for fuzzy relationships, an inability to convert semantic fuzziness to parameter precision, a lack of a dynamic combination architecture for heterogeneous operators, difficulty adapting to command structure requirements at different design stages, and the absence of a multi-objective collaborative game mechanism, failing to balance generation diversity and executability. Furthermore, the black-box nature of the reasoning process renders it unexplainable and unacceptable for industrial auditing. To address these issues, some studies have attempted to introduce Generative Adversarial Networks (GANs) to enhance the plausibility of generated results, using a discriminator to evaluate the authenticity or executability of generated commands. However, traditional GAN ​​structures are primarily designed for image generation tasks and still face numerous challenges in the field of discrete symbol sequence generation. On one hand, the adversarial process between the generator and discriminator is prone to pattern collapse, failing to cover all command types. On the other hand, discriminators typically only measure surface distribution similarity, lacking a comprehensive evaluation of geometric topological constraints and semantic logical consistency. Furthermore, the training process of GANs demands significant computational resources and is sensitive to changes in data distribution, resulting in limited model generalization ability.

[0004] In summary, current technologies still face significant gaps in areas such as engineered parsing rules for fuzzy semantics, dynamic adaptation architectures for heterogeneous operators, and the collaborative application of a "generation-constraint" dual-agent game mechanism. There are no mature methods to achieve accurate mapping from fuzzy semantics to geometric parameters, a lack of flexible network structures adaptable to heterogeneous commands, and no game-theoretic optimization framework that balances multiple constraints. Therefore, an innovative framework is urgently needed that balances semantic understanding accuracy, geometric constraint consistency, heterogeneous structure adaptability, and game-theoretic optimization balance to overcome existing technological bottlenecks and promote the industrialization of text-driven CAD command generation technology. Summary of the Invention

[0005] This invention aims to address the prominent problems in existing natural language-driven CAD command generation methods, such as the disconnect between semantic understanding and engineering requirements, insufficient consideration of geometric constraints, poor logical coherence of generated commands, and low executability. To this end, a two-layer adaptive evolutionary technology based on heterogeneous fuzzy logic and game theory is proposed. The core objective of this scheme is to achieve high-fidelity conversion from natural language to CAD commands, while simultaneously achieving practical effects such as logical interpretability, controllable parameter generation, adaptive model structure, and high generation diversity.

[0006] Specifically, this invention aims to address four core technical pain points in existing technologies. First, the problem of accurate mapping between fuzzy semantics and geometric parameters: existing models cannot convert fuzzy representations into precise geometric constraints and lack topological constraint feedback mechanisms, easily leading to semantically compliant but engineering-infeasible generated commands. An integrated mechanism for fusion of semantics and geometric constraints needs to be constructed. Second, the problem of dynamic adaptation to heterogeneous structures: fixed network architectures are difficult to reconcile with the mixed structure of discrete symbols and continuous parameters in CAD commands, failing to adapt to tasks of varying complexity. A heterogeneous operator perception and evolutionary reasoning mechanism needs to be introduced to achieve dynamic structural adjustment. Third, the problem of interpretability of generated logic: black-box reasoning models lack logical traceability from fuzzy semantics to parameters and command order, failing to meet the auditability requirements of industrial design. A traceable semantic-modeling logical mapping relationship needs to be established based on fuzzy logic. Fourth, the problem of multi-objective collaborative game optimization: existing frameworks are prone to falling into pattern monotony caused by strategy rigidity and lack overall assessment of semantics, geometry, and heterogeneous adaptability, leading to an imbalance between diversity and executability. An integrated framework of collaborative game and evolutionary learning that integrates geometric and semantic constraints needs to be constructed to improve the accuracy and stability of generation.

[0007] This invention's method achieves end-to-end accurate mapping from natural language to CAD commands by constructing a closed-loop architecture encompassing "semantic parsing - encoding disambiguation - game theory generation - fuzzy evolution refinement - verification backtracking - knowledge accumulation." The specific technical solution is as follows:

[0008] A two-layer adaptive evolutionary CAD modeling command generation method based on heterogeneous fuzzy logic and game theory includes the following steps:

[0009] Step 1: Parse and encode the input natural language instructions to obtain a precise semantic vector that incorporates fuzzy semantic quantization features;

[0010] Step 2: Construct a heterogeneous operator library adapted to the needs of heterogeneous CAD command generation, generate candidate command sequences by dynamically matching heterogeneous operator combinations based on accurate semantic vectors, and construct a non-zero-sum game architecture between the generator and the verifier in the CAD command generation scenario. A balance between semantic fit and geometric constraints is achieved through dual-subject collaborative game verification.

[0011] Step 3: Perform structural adaptive evolution and fuzzy parameter refinement on the candidate command sequence after game validation to obtain the optimized command sequence;

[0012] Step 4: Perform multi-dimensional executability verification on the optimized command sequence, backtrack and correct any substandard sequences, and output qualified CAD command sequences;

[0013] Step 5: The system performs adaptive updates: Incremental learning and knowledge accumulation are performed based on the high-confidence output results to achieve continuous optimization of model performance and reuse of historical knowledge.

[0014] Step 1 is described in detail as follows:

[0015] Step 1.1: Perform word segmentation, part-of-speech tagging, and syntactic dependency analysis on the natural language instructions, then extract keywords based on the semantic dictionary of the CAD domain, and map the text to action-object-parameter triples;

[0016] Step 1.2: Preprocess the triples through format normalization and semantic completion to provide standardized input;

[0017] Step 1.3: Fuzzy semantic disambiguation and encoding: First, match the semantic type, calculate the fuzzy quantization vector through the Gaussian membership function, and at the same time, capture the contextual semantic association of the preprocessed triples by setting the fuzzy attention of the quantity layer and the CAD knowledge encoding architecture to obtain the preliminary semantic vector;

[0018] The fuzzy attention and CAD knowledge encoding architecture has 6 layers, and the expression for a single layer is as follows:

[0019]

[0020] in, This is a preliminary semantic vector. For the preprocessed triples, Indicates transpose; For residual join operations; For layer normalization operation; The first The linear transformation matrix of the query, key, and value of each attention head. For multi-head output fusion linear transformation matrix; This indicates that the outputs of the eight attention heads are concatenated. Scaling factor for function.

[0021] Then, the preliminary semantic vector is fused with the fuzzy quantization vector to obtain the accurate semantic vector.

[0022] The confidence scores for various fuzzy semantics are calculated based on the precise semantic vector E, using the following formula:

[0023]

[0024] in This is the semantic label weight vector. The confidence score is calculated using the semantic-geometric correlation coefficient. The confidence level will be directly applied to the synthesis process of the fuzzy quantization vector as a dynamic weight coefficient, and this confidence level will be passed to the subsequent fuzzy logic parameter refinement step through the data stream as an adjustment factor for the parameter correction intensity.

[0025] Step 2 is described in detail below:

[0026] Step 2.1: The heterogeneous operator library contains 12 core operator classes. Each operator is functionally independent yet collaboratively adapts to the heterogeneous CAD command structure. The operator selection probability is calculated using a temperature coefficient-adjusted operator fitness function. Based on precise semantic vectors, operator combinations in the heterogeneous operator library are dynamically matched and sequence decoding is performed to generate candidate command sequences adapted to the heterogeneous CAD command structure. The formula is as follows:

[0027]

[0028] in, Candidate command sequence, For the first in the heterogeneous operator library An operator, For decoder, Choose probabilities for operators. For precise semantic vectors;

[0029] Step 2.2: Construct a non-zero-sum game architecture between the generator and the checker. Step 2.1 is the generator. The checker includes a semantic checker head for semantic consistency verification and a geometric checker head for geometric topological constraint verification. Then, the game payoff is evaluated and iteratively optimized through the joint payoff function of the checker. The strategy iteration is executed until the Nash equilibrium determination condition is met, and the strategy equilibrium between the generator and the checker is achieved.

[0030] The formula for the joint benefit function of the testing parties is as follows:

[0031]

[0032] in, This indicates the joint benefits of the two entities. Represents the sequence of candidate commands generated by the generator; semantic weights Geometric weights Efficiency weight As a dynamic weight, it satisfies ; The semantic fit is calculated by measuring the cosine similarity between the candidate command sequence and its feature vector. To determine the efficiency gains, the ratio of the actual execution time of candidate command sequence C to the actual execution time of similar tasks is calculated. For geometric constraint consistency, the calculation formula is as follows:

[0033]

[0034] in, The geometric constraint diagram of candidate command sequence C. Design a geometric constraint diagram for the target. For graph feature extraction functions, Representing vectors Norm.

[0035] Iterative optimization aims to maximize joint benefits. The generator adjusts the operator selection probability through gradient descent, while the checker updates the dynamic weights through weight normalization.

[0036] Step 2.3: Based on the deviation of the geometric topology constraint verification, the geometric parameters of the candidate command sequence are corrected, and the constraint adaptation is achieved by reconfiguring the heterogeneous operator parameters. Finally, the optimized candidate command sequence is output.

[0037] Step 3 is described in detail below:

[0038] Step 3.1: Initialize the operator combination population, calculate the task complexity evaluation function based on the number of modeling objects and the number of constraint relationships in the candidate command sequence, lock the evolution direction based on the task complexity, and perform screening, crossover and mutation optimization on the operator combination through the genetic optimization unit to obtain the heterogeneous inference structure;

[0039] Step 3.2: Based on the parameter refinement mechanism driven by the fuzzy rule base, the Gaussian membership function is called to perform continuous domain correction on the parameters generated by the game, and the accurate parameters are obtained through the multi-rule output aggregation function;

[0040] Step 3.3: Based on the gating mechanism, the outputs of Step 3.1 and Step 3.2 are fused to obtain the final command sequence.

[0041] Step 4 is as follows:

[0042] The command sequence is comprehensively scored based on the geometric constraint consistency verification based on geometric topology constraints, the logical rationality based on command dependency graphs, and the parameter feasibility verification based on parameter engineering feasibility. The command sequence that fails to meet the comprehensive score is backtracked and corrected before a qualified CAD command sequence is output.

[0043] Step 5 is described in detail below:

[0044] Step 5.1: Construct an incremental distillation unit, use KL divergence to quantify and minimize the difference in command generation probability distribution between the old and new models, and optimize incremental distillation by combining the cross-entropy loss of the new task;

[0045] Step 5.2: Cache semantic-command-geometric triples as high-confidence samples for incremental learning. The semantic-command-geometric triples include precise semantic vectors, the optimal command sequence after game-theoretic optimization and parameter refinement, and the geometric constraint graph corresponding to the command sequence. Based on the high-confidence samples and domain rules, extract core entities in the CAD domain and quantify the entity association strength.

[0046] For entities in the semantic-command-geometric triplet, the comprehensive matching degree is calculated based on the semantic feature vectors and entity association strength between entities in the new task and the historical task, so as to quickly locate the historical experience that is adapted to the new task.

[0047] Step 5.3: Construct a task-adaptive structure update mechanism, and introduce the parameter update formula for the structure adaptive evolution layer:

[0048]

[0049] in, Here are the configuration parameters for the adaptive evolution layer of the structure at time t. For the structure learning rate, Indicates parameters gradient operator, For evolutionary loss, calculate the fit error between the current operator combination and the task requirements. For entropy weighting coefficients, To determine the entropy of operator combinatorial diversity, when performing dynamic structure reconstruction, the number of operators is adjusted and the parameters are updated according to the task complexity.

[0050] The beneficial effects of this invention are as follows:

[0051] Compared to traditional methods such as rule matching and Seq2Seq, this invention proposes a fuzzy semantic and geometric constraint fusion parsing technique. This technique uses a fuzzy semantic disambiguation unit to quantify the engineering semantics of fuzzy expressions such as approximation and alignment. Combined with fuzzy logic parameter refinement and geometric evaluation feedback in dual-agent collaborative game, it establishes a deep association between semantic features and geometric constraints, achieving a precise mapping from fuzzy semantics to accurate geometric parameters, and effectively improving the engineering executability of command generation.

[0052] Compared to traditional methods such as Transformer that use a fixed network architecture, this invention proposes a heterogeneous operator dynamic evolution and adaptation technology. This technology relies on a heterogeneous operator library that covers the entire process of drawing, constraint, and editing. Through a genetic optimization unit, it dynamically selects and combines suitable matching operators based on the task complexity evaluation results, and simultaneously adjusts the inference structure topology. This achieves full-scene adaptation from simple drawing to complex constraint modeling, and significantly improves the generalization ability of the model.

[0053] Compared to traditional GAN ​​models used for discrete sequence generation, this invention proposes a dual-agent collaborative game optimization technique. This technique constructs a non-zero-sum game framework between the generator and the checker. The generator generates candidate commands based on a combination of heterogeneous operators to ensure semantic fit and diversity, while the checker forms constraint feedback through semantic consistency verification and geometric topology verification. Both parties iteratively optimize the strategy with a joint payoff function as the objective, achieving a dynamic balance between generation diversity and engineering feasibility, which is particularly suitable for complex industrial modeling scenarios.

[0054] Compared to traditional sequence generation models that use deep learning, which suffer from black-box reasoning problems and lack explicit logical records, failing to meet industrial audit requirements, this invention proposes a full-process traceable closed-loop architecture technology. This technology extracts structured data of "action-object-parameter" through semantic parsing and triple extraction modules, and combines explicit constraint rules in the fuzzy rule base with process data records of each module to establish a full-link logical association from the original natural language instructions to the final CAD command. This achieves traceability and interpretability of the generation process, fully adapting to the needs of industrial design audit.

[0055] Compared to traditional models, this invention proposes an incremental learning and knowledge accumulation evolution technique. This technique minimizes the difference in command generation probability distribution between the old and new models by using incremental distillation units with KL divergence as the loss function. Combined with the "semantic-command-geometric" entity association knowledge graph to accumulate historical reasoning experience, it realizes rapid transfer learning and reuse of historical knowledge in new scenarios, effectively reducing the cost of model iteration and development, and is especially suitable for rapid adaptation to customized modeling scenarios. Attached Figure Description

[0056] Figure 1 This is a diagram of the overall architecture of the algorithm system;

[0057] Figure 2 Here is a flowchart of the semantic parsing and triple extraction process;

[0058] Figure 3 This is a schematic diagram of the fuzzy semantic disambiguation and encoding module structure;

[0059] Figure 4 A flowchart illustrating the process of generating an inference engine based on heterogeneous fuzzy logic and game theory;

[0060] Figure 5 This is a flowchart of the interactive process of a two-entity collaborative game.

[0061] Figure 6 This is a schematic diagram of the structure of the adaptive evolution reasoning module.

[0062] Figure 7 This is a diagram of a three-dimensional executability verification model;

[0063] Figure 8 A schematic diagram of the module structure for incremental learning and reuse of historical knowledge;

[0064] Figure 9 Example diagram of a knowledge graph for "semantic-command-geometric" entity association;

[0065] Figure 10 Generate the corresponding CAD model drawing for the example command;

[0066] Figure 11 To verify the loss change curve. Detailed Implementation

[0067] This embodiment provides a two-layer adaptive evolutionary CAD modeling command generation method based on heterogeneous fuzzy logic and game theory, such as Figure 1 As shown, the hierarchical relationship and data interaction path of the above eight modules are clearly illustrated, intuitively presenting the core logic of the closed-loop architecture. This invention constructs a closed-loop architecture encompassing "semantic parsing - encoding disambiguation - game generation - fuzzy evolution refinement - verification backtracking - historical knowledge reuse - feedback iteration." This is achieved through semantic parsing and triplet extraction modules, fuzzy semantic disambiguation and encoding modules for dual semantic encoding and accurate representation, heterogeneous operator-driven command generation modules, and dual-subject collaborative game verification modules, which combine to construct a generative inference engine based on heterogeneous fuzzy logic and game theory. A structural adaptive evolution inference module and a fuzzy logic parameter refinement module form a two-layer adaptive fuzzy collaborative inference module. A three-dimensional executability verification and backtracking correction module performs command output and verification, and an incremental learning and historical knowledge reuse module adaptively updates the system. The synergistic interaction of these eight modules achieves high-fidelity conversion from natural language instructions to executable CAD modeling command sequences. Traditional natural language-driven CAD command generation methods often employ a linear architecture of "semantic recognition-sequence generation," focusing only on textual semantic matching without establishing a mechanism for linking semantics with geometric constraints. Furthermore, they lack a dynamic adaptation architecture for the heterogeneity of CAD commands, leading to situations where generated commands are semantically fluent but impractical in engineering, and exhibit poor adaptability to heterogeneous commands, failing to meet the accuracy requirements of industrial modeling. This invention addresses this by constructing a multi-module collaborative closed-loop architecture, incorporating core technologies such as fuzzy semantic quantization, heterogeneous operator evolution, and game-theoretic verification optimization, forming a comprehensive constraint system encompassing "semantics-geometry-structure-knowledge," thus resolving the core shortcomings of traditional linear architectures. The specific steps are as follows:

[0068] Step 1: Parse and encode the input natural language design instructions to obtain a precise semantic vector that incorporates fuzzy semantic quantization features;

[0069] Step 1.1: Semantic parsing and triple extraction: such as Figure 2 As shown, the lexical-syntactic joint analysis unit performs word segmentation, part-of-speech tagging, and syntactic dependency analysis on natural language instructions. Then, the triple extraction unit extracts core elements based on a semantic dictionary in the CAD domain. These elements are then mapped to a structured triple space through a composite mapping function, achieving accurate conversion from unstructured text to structured data. The core mapping relationship is as follows:

[0070]

[0071] in It is a triplet. is a composite mapping function, where L is a natural language instruction and S is a semantic dictionary for the CAD domain. , It represents a set of actions, covering core CAD operation types such as drawing, editing, and constraints; It represents a collection of objects, including core modeling elements such as circles, squares, and line segments; This represents a set of parameters, encompassing geometric features such as radius, coordinates, and angles. The core idea of ​​this method is to deconstruct the language structure through lexical and syntactic analysis, and then rely on a semantic dictionary in the CAD domain to pinpoint the core elements of the modeling. For example, in an embodiment, the input natural language command is "Draw a circle with a radius of 50 at the origin, whose center coincides with the top-left corner vertex of a square 100 units away to the right." The resulting triplet can be A={draw}, O={circle, square}, and P={circle radius=50, center coordinates=(0,0), square-circle distance=100, position constraint=center coincides with top-left corner of square}.

[0072] Step 1.2: Preprocess the triples using a triple preprocessing method that combines format regularization and semantic completion. Perform preprocessing operations to provide standardized input for subsequent encoding; the core preprocessing function's mathematical expression is:

[0073]

[0074] in, The preprocessed standardized triples; This is a semantic completion subfunction used to supplement implicit semantic information omitted in natural language and eliminate semantic ambiguity; This is a formatting subfunction used to convert parameters with different expressions into a standardized format. The core idea of ​​this operation is to eliminate ambiguity through semantic completion and unify the input through formatting. In this embodiment, the semantic completion subfunction completes "right distance 100" to "the center of the square is 100 units to the right of the circle". The formatting subfunction converts the parameters into a "key-value" pair format. After preprocessing, the triplet is T'={action: draw, object1: circle (type: basic shape), object1 parameter: {radius: 50, center coordinates: 0, 0}}, object2: square (type: basic shape), object2 parameter: {side length: 100, position constraint: distance between the top left vertex and the center of the circle = 100, relative orientation: right side of the circle}}.

[0075] Step 1.3: Fuzzy semantic disambiguation and encoding: such as Figure 3 As shown, the fuzzy semantic disambiguation unit calculates the quantization vector F of the fuzzy representation using a set of Gaussian membership functions, then the FAKE encoding unit extracts the contextual semantic features, and the feature fusion unit obtains the accurate semantic vector through element-wise multiplication fusion; the core encoding relationship is: Where E is the precise semantic vector, FAKE encoding unit This is an element-wise product operation;

[0076] The fuzzy semantic disambiguation unit is based on the fuzzy semantic type in the CAD domain and calculates the quantization vector through a set of Gaussian membership functions. For ambiguous expressions such as "overlap" and "right side" in triples, the corresponding semantic type is first matched, and then the quantization value is calculated by calling the dedicated Gaussian membership function. The core formula is:

[0077]

[0078] Where F is the fuzzy quantization vector, For semantic type weights, in this embodiment, for K=3 semantic types, the position is set to 0.4, the size to 0.3, and the constraint to 0.3. Let be the Gaussian membership function for the k-th semantic class. For domain experience parameters, The value is the fuzzy semantic parsing value, where L represents the sequence length, which is determined by the number of elements in the triplet.

[0079] The FAKE encoding unit uses a 6-layer fuzzy attention-CAD knowledge encoding architecture to capture the contextual semantic associations of preprocessed triples. Its core encoding calculation formula integrates multi-head attention, residual connections, and layer normalization. The single-layer expression is:

[0080]

[0081] in, This is a preliminary semantic vector. d represents the feature dimension, which is 512 in this embodiment. This is a residual join operation used to preserve the original feature information of the preprocessed triples; This is a layer normalization operation used to stabilize the feature distribution during model training; The first Query, key, and value linear transformation matrices for each attention head (all dimensions are...) ), For multi-head output fusion linear transformation matrix (dimension: ); This indicates that the outputs of the 8 attention heads are concatenated, and the concatenated dimension is... (L is the sequence length); This is a scaling factor used to mitigate the curse of dimensionality in multi-head attention computation. for function;

[0082] The computational logic of this encoding architecture is as follows: the preprocessed standardized triples are input into the above formula, and eight attention heads are used in parallel to capture multi-dimensional semantic associations such as "action-object", "object-parameter", and "action-parameter". After each attention head focuses on the association features of different dimensions, the multi-head outputs are spliced ​​together and then fused linear transformation is performed. Subsequently, the original triple features are preserved by residual connection operation, and the feature distribution is stabilized by layer normalization operation. The preliminary semantic vector is directly output, which serves as the core input for subsequent fuzzy semantic quantization and feature fusion.

[0083] The feature fusion unit will generate a preliminary semantic vector. By fusing with the fuzzy quantization vector F through element-wise multiplication, deep coupling between contextual semantics and fuzzy quantization features is achieved:

[0084]

[0085] in, Represents element-wise product. Represents a precise semantic vector.

[0086] Fuzzy Semantic Selection Probability Optimization: This paper introduces a fuzzy semantic selection mechanism weighted by semantic-geometric correlation. Based on the precise semantic vector E, it calculates the confidence level of various fuzzy semantics, aiming to establish a quantitative relationship between semantic uncertainty and the accuracy of geometric parameters. Its core calculation formula is:

[0087]

[0088] in This is a semantic label weight vector used to weigh the contribution of different semantic labels; This is the semantic-geometric correlation coefficient, which improves the accuracy of identifying key engineering semantics through correlation weighting. The calculated confidence level... It will be used as a dynamic weighting coefficient directly applied to the fuzzy quantization vector. The synthesis process replaces traditional static empirical weights, enabling the system to automatically strengthen high-probability semantic features based on context. Furthermore, this confidence level is passed through the data stream to subsequent fuzzy logic parameter refinement steps, serving as an adjustment factor for the strength of parameter correction. When the confidence level of a certain semantic category... A higher value indicates a clearer intent in the fuzzy representation, and the system will increase the corresponding geometric parameters. The correction weight is adjusted to ensure that it strictly conforms to semantic constraints; otherwise, the correction magnitude is reduced.

[0089] Step 2: Heterogeneous Fuzzy and Game Theory Generate Inference Engine. A heterogeneous operator library is introduced to adapt to the heterogeneous command generation requirements of CAD. Candidate command sequences are generated by dynamically matching heterogeneous operator combinations based on precise semantic vectors. A non-zero-sum game architecture of "generator-verifier" for the CAD command generation scenario is constructed. A balance between semantic fit and geometric constraints is achieved through collaborative game verification between the two parties. For example... Figure 4 As shown, the details are as follows:

[0090] Step 2.1: The heterogeneous operator-driven command generation module consists of a heterogeneous operator library and an operator adaptation generation unit. The operator adaptation generation unit calculates the operator selection probability based on the precise semantic vector using an operator fitness function. Then, it dynamically matches operator combinations from the heterogeneous operator library and performs sequence decoding to generate candidate command sequences for CAD heterogeneous command structure adaptation. The core generation relationship is:

[0091]

[0092] in, Indicates decoder, This represents a dynamically weighted combination of heterogeneous operators, based on operator selection probabilities. The comprehensive execution entity, obtained by weighting and fusing the basic operators in the library, is used to abstract precise semantic vectors. Transformed into specific operator feature expressions; For the first in the heterogeneous operator library The operator library contains 12 core operators, covering the entire workflow of drawing, constraint, editing, parameter processing, and fault tolerance correction. Each operator is independent yet collaboratively adapts to the heterogeneous command structure of CAD. This is a candidate command sequence, which is directly used as input to the game validation module. N is the length of the candidate command sequence, which is determined by the complexity of the modeling task. This represents the Nth candidate command; This is a sequence decoding function that dynamically matches 12 types of core operator combinations and performs sequence decoding, responsible for converting the output of operator combinations into a command format that can be recognized by CAD. The probability of selecting an operator is calculated by the operator fitness function and is used to select operators that fit the current semantics.

[0093] The formula for calculating the operator selection probability is as follows:

[0094]

[0095] in To adjust the temperature coefficient for selecting diversity, This represents the operator fitness function used to calculate the matching degree between the operator and the semantic vector; it performs operator fitness scoring, optimal operator combination selection, and sequence decoding operations.

[0096] Step 2.2: The dual-agent collaborative game verification module is specifically a non-zero-sum game architecture of "generator-verifier". The generator aims to maximize semantic fit and diversity, constructing a three-level functional structure design of "semantic mapping - operator selection - sequence decoding". The verifier aims to verify geometric constraints and semantic consistency, configuring a semantic verification head for semantic consistency verification and a geometric verification head for geometric topological constraint verification. Then, the game payoff is evaluated through a joint payoff function and the strategy is iteratively optimized, as follows:

[0097] Initialize semantic weights Geometric weights Efficiency weight ,satisfy The initial weight is set to This completes the initial deployment of the dual-subject and heterogeneous operator setup. Generator initial strategy. Initial strategy of the verification party To form the initial policy pair, i.e. .

[0098] The generator configures the semantic mapping layer, and the semantic mapping function is defined as follows: Then, operator selection-sequence decoding is performed to generate the sequence, i.e., step 2.1;

[0099] The semantic verification head of the tester is implemented using a binary classifier, and the geometric verification head is implemented using a topological constraint evaluator.

[0100] A triple verification mechanism integrating semantics, geometry, and efficiency is constructed, and a joint payoff calculation formula for two agents is introduced. When the game reaches Nash equilibrium, an optimal candidate command sequence is output:

[0101]

[0102] in, This represents the joint benefit of the two subjects; the semantic verification head calculates the semantic fit. The calculation formula is defined as follows:

[0103]

[0104] in, Let C be the feature vector of the candidate command sequence. This is the function for calculating cosine similarity.

[0105] Geometric verification head performs geometric constraint consistency The calculation formula is defined as follows:

[0106]

[0107] in, The geometric constraint diagram of candidate command sequence C. Design a geometric constraint diagram for the target. For graph feature extraction functions, Representing vectors Norms are used to calculate the magnitude or Euclidean distance of eigenvectors.

[0108] Furthermore, by combining this with efficiency testing, the benefits of execution efficiency can be realized. The calculation formula is defined as follows:

[0109]

[0110] in, The actual execution time of candidate command sequence C. These are the upper and lower thresholds for the execution time of similar tasks; the triple verification results are integrated through a joint benefit calculation formula to output the verification score, parameter correction direction, and joint benefit value.

[0111] Figure 5 A flowchart illustrating the interactive process of a two-agent collaborative game is provided, detailing the complete flow of strategy iteration, payoff evaluation, and equilibrium determination. A two-agent strategy iteration optimization mechanism is designed, which considers the joint payoff of the two agents. Maximizing is the core optimization objective, and the iterative process uses the initial strategy to... Starting from, i.e., the generator uses Initial operator selection probability Verification party Initial dynamic weights in As initial policy parameters, the Nash equilibrium determination condition is introduced:

[0112]

[0113] in, This represents the change in the joint payoff of the two entities, and is used to quantify the convergence of game strategies. and The first Next and first The combined return value at the next iteration; This is the threshold for changes in revenue, with a default value of 0.001; the generator is based on... Initial operator selection probability The operator selection probability is adjusted using the gradient descent algorithm, and the update formula is as follows:

[0114]

[0115] in, The learning rate is set to 0.01 by default. Represents the joint benefit function Regarding operator selection probability The gradient operator.

[0116] Verification party based on Initial dynamic weights in The dynamic weight coefficients are iteratively updated using a weight normalization method, with the update formula as follows:

[0117]

[0118] in, These correspond to semantic, geometric, and efficiency weights, respectively. The policy iterative process continues until the Nash equilibrium condition is met. Iterative optimization into equilibrium strategy pairs This achieves a strategy balance between the generator and the verifier.

[0119] Step 2.3: Construct a parameter constraint correction mechanism based on verification feedback. Define the parameter correction amount based on the geometric constraint deviation and semantic consistency feedback output by the verifier. Calculation formula:

[0120]

[0121] in, This is the correction factor used to control the correction magnitude; the default value is 0.1. These are the geometric parameters to be corrected in the candidate commands; Geometric consistency score function Regarding parameters The gradient operator. Precise adjustment of candidate command parameters is performed using the following formula:

[0122]

[0123] in, Indicates the first The corrected parameter values ​​after the next iteration update; These are the parameter values ​​at the current moment. To address the issue of unmet geometric constraints, constraint adaptation is achieved through heterogeneous operator parameter reconfiguration, ultimately outputting an optimized candidate command sequence. , which serves as the input to the two-layer adaptive fuzzy collaborative reasoning module.

[0124] Step 3: The two-layer adaptive fuzzy collaborative inference module performs structural adaptive evolution and fuzzy parameter refinement on the candidate command sequence after game validation to obtain the optimized command sequence, such as... Figure 6 As shown, the linkage architecture between the heterogeneous operator evolution graph and the genetic optimization unit is illustrated below:

[0125] Step 3.1: The structural adaptive evolutionary reasoning module uses a heterogeneous operator evolutionary graph as a carrier, combined with a genetic optimization unit, to lock the evolutionary direction based on the task complexity evaluation function, and performs screening, crossover, and mutation optimization on operator combinations. The core evolutionary relationship is:

[0126]

[0127] in For the genetic selection function, Let be the evolution function. for Time-based heterogeneous reasoning structure This is the task complexity evaluation value; the following is a detailed explanation.

[0128] Introducing the initial combinatorial population of multivariate operators such as drawing, constraint, and editing. As a heterogeneous reasoning structure Where M is the initial population size, Indicates the first The first generation of the population Combining heterogeneous operators. Design a task complexity evaluation function:

[0129]

[0130] in, For the number of modeling objects, To constrain the number of relations, For weighting coefficients; execute the candidate command sequence. The complexity assessment classifies drawing a single graphic as low complexity. Determining the correlation between multiple graph constraints is a high-complexity task. The evolution direction is locked, that is, low-complexity basic drawing operators are prioritized, and high-complexity reinforcement constraint operators are used to complete the initial deployment of the structural evolution layer.

[0131] Design a genetic optimization-driven inference structure update mechanism and introduce an evolution function:

[0132]

[0133] in, The crossover function is used to randomly select operator combinations in the population and exchange their internal constraint operator modules to generate new structural features. It is a mutation function that randomly replaces the type of plotting operator with a certain probability to maintain the diversity of the population and prevent premature convergence. This represents the union operation on the results of crossover and mutation.

[0134] Introducing selection functions:

[0135]

[0136] in, This represents the candidate population after evolution, that is, the set of intermediate populations generated after crossover and mutation operations are performed by the evolution function; Find a suitable degree function for the operator set. Perform initial population setup. The genetic operations, namely the crossover operation, randomly select two operators to exchange constraint operator modules, and the mutation operation replaces the drawing operator type with a 10% probability; based on the fitness function, the optimal combination is selected, and the inference structure update formula is given:

[0137]

[0138] in, Let t be the operator selection probability. These are operator parameters, enabling dynamic adaptation of heterogeneous inference structures.

[0139] Step 3.2: The fuzzy logic parameter refinement module is based on a fuzzy rule base-driven parameter refinement mechanism, consisting of a fuzzy rule base and an inference engine unit. It calls the Gaussian membership function to perform continuous domain correction on the parameters generated by the game, and obtains the precise parameters through a multi-rule output aggregation function. The fuzzy rule base is preset with n=5 position constraint rules, and the calculation formula is as follows:

[0140]

[0141] in, These are the precise parameters after refinement; Initial parameters generated for the game; For the first The Gaussian membership function for fuzzy rules is used to measure the initial parameters. The degree to which the rule is met; For the first Correction coefficients for class rules; For the first The ideal reference parameter value corresponding to the class rule, for example: for the "vertical" rule, Regarding the "overlap" rule, By employing a weighted averaging mechanism, the membership degree of fuzzy semantics is transformed into a precise correction amount for geometric parameters, thus ensuring the final parameters... Approximates the ideal value pointed to by the semantic constraints.

[0142] Gaussian membership function The calculation formula is as follows:

[0143]

[0144] in, These are the initial parameters. These are parameters for domain experience rules.

[0145] Step 3.3: The cross-layer feature fusion module decodes and outputs the final command sequence; specifically, the cross-layer feature fusion mechanism is designed to adapt to the output characteristics of the dual modules, and a gating matrix calculation formula is introduced:

[0146]

[0147] in, As a gating feature, The heterogeneous reasoning structure output by the structural adaptive evolutionary reasoning module. Based on refined parameters The parameter feature vector obtained by mapping for function, These are the gating parameters. Perform cross-layer feature fusion operation:

[0148]

[0149] in, This represents element-wise multiplication, dynamically balancing the contributions of the two feature layers; it calls a sequence decoding function to decode the fused features, deriving the final command sequence in the form of...

[0150] The parameters, after being processed by the fuzzy logic parameter refinement module, meet the geometric constraint requirements.

[0151] Step 4: Command output and verification of the 3D executability verification and backtracking correction module. Perform multi-dimensional executability verification on the optimized command sequence, and output a qualified CAD command sequence after backtracking correction of any substandard sequences.

[0152] Construct a collaborative architecture of 3D verification unit and backtracking optimization unit, such as Figure 7 As shown, the weight allocation and evaluation process for the three verification dimensions are clearly defined, providing core evaluation criteria for the system to output qualified command sequences. This process integrates three types of scoring results: geometric topological consistency, command logical coherence, and parametric engineering feasibility. Through dynamic weight allocation, it achieves multi-dimensional collaborative evaluation and introduces a core comprehensive scoring formula:

[0153]

[0154] in The overall score for feasibility assessment The geometric constraint consistency score calculated in step 2.2 is... Score for logical rationality. The parameter feasibility score is calculated; the backtracking optimization unit performs reverse optimization on sequences that fail to meet the evaluation criteria until they meet the criteria, and then outputs the result.

[0155] Based on the parametric engineering feasibility verification mechanism, the parametric feasibility score is calculated as follows:

[0156]

[0157] in For the total number of parameters, Candidate parameters, These are reference values ​​for feasible engineering parameters. To prevent extremely small values ​​where the denominator is zero, the default value is 1e-6.

[0158] Construct a command dependency graph, defining... .in, For the set of command nodes, This is a set of logically related edges between commands. Logical consistency is assessed by analyzing the completeness and rationality of these edges, including drawing and constraint relationships. The logical rationality score is used to measure the dependency structure of the generated command sequence. Dependence structure with the target reference truth The consistency between them is calculated using the following formula:

[0159]

[0160] in, The number of logically distinct edges represents the generated command dependency graph. With reference logical dependency graph , that is, the number of topological deviations between ideal logic diagrams constructed based on target design intent or standard truth values; This refers to the total number of dependency edges in the reference logical dependency graph. When the dependency structure of the generated command is completely correct, .

[0161] Step 5: The incremental learning and historical knowledge reuse module adaptively updates the system, performing incremental learning and knowledge accumulation based on high-confidence output results to achieve continuous optimization of model performance and reuse of historical knowledge. For example... Figure 8 As shown, the synergistic relationship between the incremental distillation unit and the entity association knowledge graph unit is intuitively presented. The incremental distillation unit adopts KL divergence quantification and minimizes the difference in command generation probability distribution between the old and new models. It works in conjunction with the entity association knowledge graph unit to store "semantic-command-geometric" triples. The structure update unit realizes continuous optimization of model performance and the accumulation and reuse of reasoning experience.

[0162] Step 5.1: The incremental distillation unit uses the KL divergence loss formula to implement incremental distillation. The core objective is to retain the modeling knowledge already acquired by the old model when learning new task data, avoiding catastrophic forgetting. The specific formula is:

[0163]

[0164] in To cache the number of triplet samples, the proportion of new task samples can be set to 40% + 60% randomly sampled from the old sample pool, ensuring a balance between new and old knowledge. This indicates the calculation of KL divergence. The term "parameter-frozen old model" refers to the soft labels of probability distributions generated for input samples based on accumulated historical knowledge. Its purpose is to serve as a knowledge benchmark to prevent the model from deviating from its original cognitive structure when updating parameters. This indicates that the "new model with continuously iterating parameters" is based on the real-time probability distribution generated from the current mixed data stream.

[0165] When performing incremental distillation optimization, a dual-loss joint optimization strategy is adopted, and the total loss is:

[0166]

[0167] in, For the cross-entropy loss of the new task, This is to account for distillation loss. Through this strategy, the new model can maintain the accuracy of command generation for old scenarios when learning new scenarios, ensuring the stability of model updates.

[0168] Step 5.2: The entity association knowledge graph unit stores "semantic-command-geometric" triples as the core sample source for incremental learning. The cached triples... This is not random data, but a high-confidence result evaluated by the three-dimensional executability verification module, i.e., the overall score. Samples exceeding the baseline threshold of 0.9 are considered high-confidence samples to ensure sample quality. The sample set definition is introduced as follows:

[0169]

[0170] in, This is a high-confidence sample set. Index for high-confidence samples. For precise semantic vectors, This is the optimal command sequence after game theory optimization and parameter refinement. This is the geometric constraint graph corresponding to the command sequence, containing topological relationships and parameter information. During the execution of the triplet knowledge cache storage operation, sample generation scene labels, such as "mechanical parts drawing" and "building outline modeling," are recorded simultaneously, forming an initial sample set with scene attributes to provide data support for subsequent task adaptive learning.

[0171] Design a structured construction and reuse mechanism for a generalized entity association knowledge graph, and extract core entities (including semantic concepts, command types, geometric features, constraint types, etc.) in the CAD domain based on high-confidence samples and domain rules. Figure 9 This example diagram illustrates a "semantic-command-geometric" entity association knowledge graph, showcasing the association edges and weight annotation methods between entities. An entity association weight calculation formula is introduced to quantify association strength and ensure the reliability of knowledge associations.

[0172]

[0173] in, For entities (e.g., "fuzzy semantic 'alignment'") and (e.g., the associated weight of the constraint command 'COINCIDENT'); This indicates the number of times two entities co-occur in a high-confidence sample; Weighted induction can improve the credibility of association weights; Representation and entity The total number of all different entities that appear simultaneously in the same batch of high-confidence samples is used to normalize the calculated association weights, which are between 0 and 1.

[0174] A graph of knowledge across the entire "semantic-command-geometry" chain. Storage operations construct multi-dimensional association edges (all labeled with the aforementioned association weights), specifically including mapping edges between semantically ambiguous expressions and precise command parameters, association edges between command logic and geometric constraints, and adaptation edges between heterogeneous operator combinations and task complexity, forming a structured knowledge network.

[0175] To achieve knowledge reuse, a knowledge retrieval matching formula is introduced to quickly locate historical experience suitable for new tasks:

[0176]

[0177] in, For new task entities With historical entities Overall matching degree; New mission entity The corresponding precise semantic feature vector (derived from the semantic encoding result of the current input instruction); For historical entities The corresponding precise semantic feature vector (historical semantic features stored in knowledge graph nodes); This is a cosine similarity calculation function, used to measure the directional similarity between two things in the semantic dimension; This represents the maximum association weight between two entities, used to strengthen the matching priority of historical associations with high confidence.

[0178] Step 5.3: The structure update unit constructs a task-adaptive structure update mechanism to solve the problem that a fixed architecture cannot adapt to tasks with new complexity. The parameter update formula for the structure adaptive evolution layer is introduced:

[0179]

[0180] in, The configuration parameters for the structure adaptive evolution layer at time t are the set of evolvable parameters in the structure adaptive evolution inference module that determine the network topology and computational complexity, such as the connection topology weights and attention head number configurations between heterogeneous operators. The structure learning rate is dynamically adjusted: initially set to 0.02 for new tasks to accelerate adaptation, and then reduced to 0.005 to stabilize after convergence. This indicates that the composite objective function has respect to the structural layer parameters. The gradient operator. Evolutionary loss represents the adaptation error between the current operator combination and the task requirements. . This is the entropy weighting coefficient, with a default value of 0.1, used to balance structural stability and diversity. To mitigate the entropy of operator combinatorial diversity and prevent structural rigidity, dynamic structural reconstruction adjusts the number of operators and updates parameters based on task complexity during the process.

[0181] This invention achieves high-precision conversion from natural language instructions to industrial-grade CAD executable commands through deep collaboration between a structural adaptive evolutionary inference module and a fuzzy logic parameter refinement module. For the example instruction "Create two cubes, one of which is perpendicularly attached to one end of the other cube," the structural adaptive evolutionary inference module first uses a task complexity evaluation function... (in For the number of modeling objects, The complexity assessment value Com(C) was calculated as 0.4 × 2 + 0.6 × 1 = 1.4 (based on the number of constraint relationships), which, combined with a preset threshold, classifies it as a low-to-medium complexity associative modeling task. Subsequently, the weights of the heterogeneous operator combination are automatically adjusted. The weight of the basic drawing operator is reduced from the initial 0.6 to 0.3, while the weights of the constraint operator and the geometric relationship operator are increased from 0.2 and 0.2 to 0.4 and 0.3 respectively. This ensures that the generated command sequence naturally carries the associative logic framework of "main cube - auxiliary cube," avoiding the inefficient manual association required by traditional methods that generate commands independently. The fuzzy logic parameter refinement module focuses on the fuzzy spatial representation of vertical auxiliary, calling a preset fuzzy rule library of "spatial position - angle constraint" type, and applying the Gaussian membership function... (Mean 90°, Standard Deviation 1.2°) The vertical angle threshold is quantified to ensure that the included angle between the axes of the two cubes is stable within the range of 90°±1.5°. For the end face positioning requirements of "one end", the positioning deviation threshold of ≤1.8mm is calculated by the position deviation membership function. Combined with the empirical values ​​of cube size commonly used in the CAD field, the parameters of the main cube are refined to 50mm×50mm×30mm (length×width×height) and the parameters of the auxiliary cube are refined to 20mm×30mm×50mm. This achieves a precise mapping from qualitative description to accurate geometric parameters and provides a quantitative basis for command generation.

[0182] Figure 10 This example command generates a corresponding CAD model drawing based on... The screenshots of CAD-Assistant, a CAD model display platform for geometry engines, visually demonstrate the implementation effect of the technical solution of this invention. The core features of the interface and their corresponding technical value are as follows:

[0183] Interface Layout and Platform Identification: The screenshots adopt the standard operation layout of CAD-Assistant—the left side is the function panel area, which includes two main expanded panels: "Property" and "Display Mode." In the "Property" panel, the "Material" option is selected, which is used to configure the model's material properties; in the "Display Mode" panel, the "Shaded with Edges" option is active, corresponding to the rendering effect of the intermediate model; the bottom of the interface is marked with the "OPEN CASCADE" label, which clearly indicates that the platform is built on the OCCT geometry engine, verifying the compatibility of the generation commands of this invention with industrial-grade CAD engines.

[0184] Model Display and Command Matching: The solid model displayed in the central 3D window perfectly matches the example command and parameter refinement results—the main cube (50mm×50mm×30mm) is horizontally distributed, and the auxiliary cube (20mm×30mm×50mm) is vertically attached to the right end face of the main cube. Verified by the built-in measurement tools, the angle between their axes is 89.2°, meeting the quantization threshold requirement of 90°±1.5°. The end face fitting gap is only 0.9mm, less than the positioning deviation threshold of 1.8mm. The LEFT view icon and X / Y / Z axis coordinate system in the lower right corner further clarify the spatial positioning relationship of the model. This result is the product of directly parsing and executing the easily parsed CAD command sequence generated by this invention after importing it into CAD-Assistant, without any manual parameter adjustments or constraint supplementation. The command sequence is as follows: CREATE(CUBE("Main_Cube", 0, 0, 0, 50.0, 50.0,30.0));

[0185] CREATE(CUBE("Auxiliary_Cube", 50.0, 10.0, 0, 20.0, 30.0, 50.0));

[0186] COINCIDDENT(CONSTRAINT("90.0","Auxiliary_Cube","Main_Cube", "Auxiliary_Cube_Face_Tag", "Main_Cube_Face_Tag"));

[0187] The core design of this command sequence is explained below. The `CREATE()` function encapsulates the entity creation logic, conforming to the "operation-object" parsing paradigm of CAD engines and clearly identifying the core operations for entity creation. All geometric parameters are appended with decimal points, unifying them into floating-point data format to avoid parsing errors of integer parameters in high-precision modeling scenarios, thus adapting to the precision requirements of industrial-grade modeling. The core constraint command uses `COINCIDENT()` to explicitly specify the type of coincident constraint, directly corresponding to the design requirement of "two cube end faces fitting" mentioned earlier. Among the constraint parameters, 90.0 precisely defines the vertical angle threshold, and `Auxiliary_Cube_Face_Tag` and `Main_Cube_Face_Tag` are standardized face identifiers that can be automatically associated with the target fitting surface by platforms such as CAD-Assistant. The overall syntax strictly follows the command parsing rules of the OCCT geometry engine, allowing direct import and execution without format conversion, achieving integrated implementation of entity creation and constraint association.

[0188] Figure 11 The graph shows the validation loss curve of the model generated by the CAD command in the invention. Based on 100 sets of validation data during model training, the curve visually presents the optimization trend of model performance. The horizontal axis represents the number of training iterations, and the vertical axis represents the validation loss value. The curve shows a significant and continuous downward trend overall. Specifically, the initial training loss value was 25.9487, which gradually decreased with the increase of iterations, stabilizing at 16.5370 in the later stages of training, ultimately achieving a 36.3% loss reduction rate. Furthermore, the fluctuation range of the curve significantly decreased in the later stages, indicating that the model converged and stabilized. The downward trend of the loss curve quantitatively verifies the effectiveness of the technical solution of this invention: on the one hand, it confirms the optimization value of the dual-subject collaborative game mechanism—the strategy iteration of the generator and the verifier continuously improves the model's ability to adapt to semantic vectors, command sequences, and geometric constraints, and the loss reduction corresponds to the simultaneous improvement of the semantic fit and geometric consistency of the generated commands; on the other hand, it reflects the role of incremental learning and knowledge accumulation mechanism. Through the experience reuse of the "semantic-command-geometric" knowledge graph, the model can still maintain stable optimization in the later stages of training, avoiding the overfitting-loss rebound problem of traditional models.

[0189] This invention discloses a two-layer adaptive evolutionary CAD modeling command generation method based on heterogeneous fuzzy logic and game theory. The core of the method is to construct a closed-loop architecture with a full process of semantic parsing, game theory generation, evolutionary refinement, verification backtracking and knowledge accumulation through eight major modules, including semantic parsing and triple extraction. This achieves high-fidelity conversion of natural language instructions into executable CAD modeling command sequences.

[0190] Addressing the four major pain points of existing technologies—difficulty in quantifying fuzzy semantics, poor adaptation to heterogeneous commands, low executability of generated data, and black-box reasoning—this paper innovatively proposes four core technologies. First, a fuzzy semantics and geometric constraint fusion analysis technology to map fuzzy representations to precise parameters; second, a heterogeneous operator dynamic evolution adaptation technology to adapt to modeling tasks of varying complexity; third, a generation-verification dual-agent collaborative game theory technology to balance generation diversity and engineering feasibility; and fourth, incremental learning and knowledge accumulation technology to enable experience reuse and iterative model optimization.

[0191] It is understood that the present invention has been described through some embodiments, and those skilled in the art will recognize that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.

Claims

1. A two-layer adaptive evolutionary CAD modeling command generation method based on heterogeneous fuzzy logic and game theory, characterized in that, Includes the following steps: Step 1: Parse and encode the input natural language instructions to obtain a precise semantic vector that incorporates fuzzy semantic quantization features; Step 2: Construct a heterogeneous operator library adapted to the needs of heterogeneous CAD command generation, generate candidate command sequences by dynamically matching heterogeneous operator combinations based on accurate semantic vectors, and construct a non-zero-sum game architecture between the generator and the verifier in the CAD command generation scenario. A balance between semantic fit and geometric constraints is achieved through dual-subject collaborative game verification. Step 3: Perform structural adaptive evolution and fuzzy parameter refinement on the candidate command sequence after game validation to obtain the optimized command sequence; Step 4: Perform multi-dimensional executability verification on the optimized command sequence, backtrack and correct any substandard sequences, and output qualified CAD command sequences; Step 5: The system performs adaptive updates: Incremental learning and knowledge accumulation are performed based on high-confidence output results to achieve continuous optimization of model performance and reuse of historical knowledge; Step 5 is described in detail below: Step 5.1: Construct an incremental distillation unit, use KL divergence to quantify and minimize the difference in command generation probability distribution between the old and new models, and optimize incremental distillation by combining the cross-entropy loss of the new task; Step 5.2: Cache semantic-command-geometric triples as high-confidence samples for incremental learning. The semantic-command-geometric triples include precise semantic vectors, the optimal command sequence after game-theoretic optimization and parameter refinement, and the geometric constraint graph corresponding to the command sequence. Based on the high-confidence samples and domain rules, extract core entities in the CAD domain and quantify the entity association strength. For entities in the semantic-command-geometric triplet, the comprehensive matching degree is calculated based on the semantic feature vectors and entity association strength between entities in the new task and the historical task, so as to quickly locate the historical experience that is adapted to the new task. Step 5.3: Construct a task-adaptive structure update mechanism, introducing the parameter update formula for adaptive structure evolution: ; in, Here are the configuration parameters for the adaptive evolution layer of the structure at time t. For the structure learning rate, Indicates parameters gradient operator, For evolutionary loss, calculate the fit error between the current operator combination and the task requirements. For entropy weighting coefficients, To achieve the entropy of operator combinatorial diversity, during dynamic structure reconstruction, the number of operators is adjusted and parameters are updated according to the task complexity. Step 1 includes a fuzzy attention and CAD knowledge encoding architecture, which has 6 layers. The expression for a single layer is as follows: ; in, This is a preliminary semantic vector. For the preprocessed triples, Indicates transpose; For residual join operations; For layer normalization operation; The first The linear transformation matrix of the query, key, and value of each attention head. For multi-head output fusion linear transformation matrix; This indicates that the outputs of the eight attention heads are concatenated. Scaling factor for function.

2. The method for generating two-layer adaptive evolutionary CAD modeling commands based on heterogeneous fuzzy logic and game theory as described in claim 1, characterized in that, Step 1 is described in detail as follows: Step 1.1: Perform word segmentation, part-of-speech tagging, and syntactic dependency analysis on the natural language instructions, then extract keywords based on the semantic dictionary of the CAD domain, and map the text to action-object-parameter triples; Step 1.2: Preprocess the triples through format normalization and semantic completion to provide standardized input; Step 1.3: Fuzzy Semantic Disambiguation and Encoding: First, match the semantic type, calculate the fuzzy quantization vector using the Gaussian membership function, and capture the contextual semantic association of the preprocessed triples by setting the fuzzy attention of the quantity layer and the CAD knowledge encoding architecture to obtain the preliminary semantic vector; then, fuse the preliminary semantic vector with the fuzzy quantization vector to obtain the accurate semantic vector.

3. The method for generating two-layer adaptive evolutionary CAD modeling commands based on heterogeneous fuzzy logic and game theory according to claim 2, characterized in that, Step 2 is described in detail below: Step 2.1: The heterogeneous operator library contains 12 core operator classes. Each operator is functionally independent yet collaboratively adapts to the heterogeneous CAD command structure. The operator selection probability is calculated using a temperature coefficient-adjusted operator fitness function. Based on precise semantic vectors, operator combinations in the heterogeneous operator library are dynamically matched and sequence decoding is performed to generate candidate command sequences adapted to the heterogeneous CAD command structure. The formula is as follows: ; in, Candidate command sequence, For the first in the heterogeneous operator library An operator, For decoder, Choose probabilities for operators. For precise semantic vectors; Step 2.2: Construct a non-zero-sum game architecture between the generator and the checker. Step 2.1 is the generator. The checker includes a semantic checker head for semantic consistency verification and a geometric checker head for geometric topological constraint verification. Then, the game payoff is evaluated and iteratively optimized through the joint payoff function of the checker. The strategy iteration is executed until the Nash equilibrium determination condition is met, and the strategy equilibrium between the generator and the checker is achieved. Step 2.3: Based on the deviation of the geometric topology constraint verification, the geometric parameters of the candidate command sequence are corrected, and the constraint adaptation is achieved by reconfiguring the heterogeneous operator parameters. Finally, the optimized candidate command sequence is output.

4. The method for generating two-layer adaptive evolutionary CAD modeling commands based on heterogeneous fuzzy logic and game theory according to claim 3, characterized in that, Step 3 is as follows: Step 3.1: Initialize the operator combination population, calculate the task complexity evaluation function based on the number of modeling objects and the number of constraint relationships in the candidate command sequence, lock the evolution direction based on the task complexity, and perform screening, crossover and mutation optimization on the operator combination through the genetic optimization unit to obtain the heterogeneous inference structure; Step 3.2: Based on the parameter refinement mechanism driven by the fuzzy rule base, the Gaussian membership function is called to perform continuous domain correction on the parameters generated by the game, and the accurate parameters are obtained through the multi-rule output aggregation function; Step 3.3: Based on the gating mechanism, the outputs of Step 3.1 and Step 3.2 are fused to obtain the final command sequence.

5. The method for generating two-layer adaptive evolutionary CAD modeling commands based on heterogeneous fuzzy logic and game theory according to claim 4, characterized in that, Step 4 is as follows: The command sequence is comprehensively scored using geometric constraint consistency verification based on geometric topology constraints, logical rationality verification based on command dependency graphs, and parameter feasibility verification based on parameter engineering feasibility. Command sequences that fail to meet the comprehensive score are backtracked and corrected before outputting qualified CAD command sequences.

6. The method for generating two-layer adaptive evolutionary CAD modeling commands based on heterogeneous fuzzy logic and game theory according to claim 5, characterized in that, The confidence scores for various fuzzy semantics are calculated based on the precise semantic vector E, using the following formula: ; in This is the semantic label weight vector. The confidence score is calculated using the semantic-geometric correlation coefficient. The confidence level will be directly applied to the synthesis process of the fuzzy quantization vector as a dynamic weight coefficient, and this confidence level will be passed to the subsequent fuzzy logic parameter refinement step through the data stream as an adjustment factor for the parameter correction intensity.

7. The method for generating two-layer adaptive evolutionary CAD modeling commands based on heterogeneous fuzzy logic and game theory according to claim 6, characterized in that, The formula for the joint benefit function of the testing parties is as follows: ; in, This indicates the joint benefits of the two entities. Represents the sequence of candidate commands generated by the generator; semantic weights Geometric weights Efficiency weight As a dynamic weight, it satisfies ; The semantic fit is calculated by measuring the cosine similarity between the candidate command sequence and its feature vector. To determine the efficiency gains, the ratio of the actual execution time of candidate command sequence C to the actual execution time of similar tasks is calculated. For geometric constraint consistency, the calculation formula is as follows: ; in, The geometric constraint diagram of candidate command sequence C. Design a geometric constraint diagram for the target. For graph feature extraction functions, Representing vectors Norm.

8. The method for generating two-layer adaptive evolutionary CAD modeling commands based on heterogeneous fuzzy logic and game theory according to claim 7, characterized in that, In step 2.2, the iterative optimization aims to maximize the joint benefit. The generator adjusts the operator selection probability through gradient descent, and the checker updates the dynamic weights through weight normalization.

Citation Information

Patent Citations

  • Enterprise multi-modal data intelligent processing system fusing RAG technology and intelligent processing method of enterprise multi-modal data intelligent processing system

    CN120781307A

  • Low-code development automatic generation method based on large language model

    CN121433632A