A polygon quadrilateral grid automatic subdivision method based on deep reinforcement learning

CN122066802BActive Publication Date: 2026-06-26CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
Filing Date
2026-04-22
Publication Date
2026-06-26

Smart Images

  • Figure CN122066802B_ABST
    Figure CN122066802B_ABST
Patent Text Reader

Abstract

The application discloses a kind of polygon quadrilateral grid automatic subdivision methods based on deep reinforcement learning, it is related to the field of computational geometry and grid generation, the application constructs a kind of automatic subdivision framework of fusion geometry priori knowledge and data-driven strategy.The method predefines 9 kinds of basic topological filling templates covering triangle to hexagon as discrete action space, converts continuous geometry segmentation into sequence decision problem;The mapping relationship between polygon state characteristics and optimal template selection strategy is learned using deep Q network, and exploration and utilization are balanced through dynamic epsilon-greedy mechanism;Combining vertex number priority scheduling strategy and multidimensional quality reward function, guide agent to adaptively generate high-quality quadrilateral grid.The application realizes the full-automatic, high robustness subdivision of complex polygon region, significantly improves the grid orthogonality and aspect ratio quality, avoids manual intervention, and is suitable for finite element analysis and other engineering scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computational geometry and mesh generation, and more specifically, to an automatic polygon quadrilateral mesh generation method based on deep reinforcement learning. Background Technology

[0002] In engineering simulations such as finite element analysis and computational fluid dynamics, quadrilateral mesh generation is a crucial preprocessing step. Currently, the mainstream quadrilateral mesh generation methods include:

[0003] 1) Advancing Front method: Generates meshes from the boundary inwards, but it is difficult to guarantee the consistency of mesh quality;

[0004] 2) Medial-Axis method: generates meshes based on medial axis transformation, but has poor adaptability to complex geometries;

[0005] 3) Template matching method: Predefined subdivision templates are used to select the appropriate template through geometric matching.

[0006] Template matching methods are widely used due to their ability to generate regular meshes. A typical workflow for existing template matching methods is as follows:

[0007] a. Analyze the geometric features of the polygon (number of vertices, angles, side length ratios, etc.);

[0008] b. Select a matching subdivision template from the predefined template library;

[0009] c. Apply a template to subdivide the polygon into smaller sub-regions;

[0010] d. Recursively process until all sub-regions become open on four sides.

[0011] Existing automatic quadrilateral mesh generation technologies have the following main drawbacks:

[0012] Reliance on human experience and rule templates: Traditional methods (such as mapping, sweeping, and paving methods) heavily depend on preset topological rules and human intervention. When dealing with complex, non-convex, or polygonal regions containing holes, manual segmentation or adjustment is often required, resulting in low automation.

[0013] Poor generalization ability: Rule-based methods have difficulty adapting to input polygons with varying numbers of vertices and different shapes. Once they encounter geometric topologies not covered by the training set, the algorithm is prone to failure or generating a large number of low-quality units (such as high aspect ratio, excessively large / small interior angles).

[0014] Lack of a global optimization perspective: Existing heuristic algorithms typically employ a local greedy strategy, which cannot guarantee the validity of single-step segmentation while taking into account the quality distribution of the final overall mesh, resulting in the need for expensive smoothing optimization post-processing in the later stages.

[0015] Variable-length input processing is challenging: the number of vertices in a polygon is not fixed, while traditional deep learning models typically require fixed-dimensional input. Direct truncation or simple padding results in the loss of geometric and topological information, causing the model to fail to accurately understand the polygon structure. Summary of the Invention

[0016] This invention aims to provide an automatic polygon quadrilateral mesh generation method based on deep reinforcement learning. The main objectives include: achieving fully automatic generation, solving the problem of variable-length input, improving mesh quality and success rate, and enhancing generalization ability.

[0017] To achieve the above-mentioned objectives, this invention provides an automatic polygon quadrilateral mesh subdivision method based on deep reinforcement learning, the method comprising a training phase and an application phase;

[0018] The training phase includes the following steps:

[0019] Step 1: Build a reinforcement learning environment, initialize the main Q-network and the target Q-network; generate a training dataset containing polygonal geometric sequences with a variable number of vertices, and build a predefined set of subdivision template actions;

[0020] Step 2: Sample an initial polygon from the training dataset, load the initial polygon into the reinforcement learning environment to initialize its global sub-region set, select a polygon to be processed from the global sub-region set of the reinforcement learning environment according to the preset vertex scheduling strategy, and normalize the variable-length vertex coordinate sequence of the polygon to be processed into a fixed-dimensional state vector through zero-padding and mask marking.

[0021] Step 3: Input the fixed-dimensional state vector into the main Q network, and select the current action to be executed from the predefined set of partitioning template actions based on the ε-greedy strategy;

[0022] Step 4: Feedback the currently executed action to the reinforcement learning environment, which then applies the action to geometrically segment the polygon to be processed, generating several sub-polygons. Quadrilateral sub-regions among the sub-polygons are identified as newly generated quadrilaterals. The sub-polygons are added to the global sub-region set. The polygon to be processed is removed from the global sub-region set to update the global sub-region set. The next polygon to be processed is selected from the updated global sub-region set according to a preset vertex scheduling strategy to form the state vector at the next time step.

[0023] Step 5: Based on the geometric quality, subdivision progress, task completion status, number of execution steps, and legality of the newly generated quadrilateral identified in Step 4, calculate the immediate reward signal;

[0024] Step 6: Combine the current state vector, the current action being executed, the immediate reward signal, the next state vector, and the iteration end label into an experience tuple and store it in the experience replay buffer;

[0025] Step 7: When the batch training condition is met, randomly sample empirical tuples from the empirical replay buffer;

[0026] Step 8: Calculate the maximum Q value of the next time step state vector in the empirical tuple using the target Q network, and construct the target Q value by combining it with the instantaneous reward signal;

[0027] Step 9: Calculate the predicted Q-value of the current state vector in the empirical tuple under the current action using the main Q-network;

[0028] Step 10: Calculate the loss function value between the target Q value and the predicted Q value;

[0029] Step 11: Update the parameters of the main Q-network using the backpropagation algorithm based on the loss function value;

[0030] Step 12: Copy the parameters of the main Q network to the target Q network according to the preset period, and repeat steps 2 to 12 until the training termination condition is met, and save the parameters of the main Q network after training is completed.

[0031] The application phase includes the following steps:

[0032] Step A1: Load the trained main Q-network and construct a reinforcement learning environment for inference;

[0033] Step A2: Obtain the initial polygon to be subdivided, load it into the reinforcement learning environment for inference to initialize the global sub-region set, select the first polygon to be processed according to the preset vertex scheduling strategy, and normalize its variable-length vertex coordinate sequence into a fixed-dimensional initial state vector through zero-padding and mask marking.

[0034] Step A3: Input the initial state vector into the trained main Q network, and select the action with the largest Q value as the current action to be executed;

[0035] Step A4: Perform the current execution action to geometrically segment the polygon to be processed, generate several sub-polygons and update the global sub-region set; select the next polygon to be processed from the updated global sub-region set according to the preset vertex scheduling strategy, and normalize its variable-length vertex coordinate sequence into a fixed-dimensional state vector at the next time step through zero-filling and mask marking;

[0036] Step A5: Repeat steps A3 to A4 until all sub-polygons in the global sub-region set have 4 vertices, and output the final mesh result.

[0037] Existing technologies lack a complete end-to-end automated process for converting arbitrary polygons into full quadrilateral meshes, and the training and application phases are logically disconnected, lacking unified closed-loop control. This method constructs a two-stage architecture including training and application phases. The training phase establishes a reinforcement learning closed loop through steps 1-12, learning the partitioning strategy; the application phase loads the strategy for inference through steps A1-A5. Specifically, standardized steps are explicitly defined in steps A2 and A4 to ensure that data processing during inference is consistent with that during training. This achieves full automation from data preparation and model training to actual inference. The explicit standardized steps ensure the correct input format of the model in the application phase, avoiding inference failures due to input dimension mismatches and ensuring the system's engineering usability.

[0038] This invention is based on the Deep Q-Network (DQN) framework, modeling the polygon subdivision process as a Markov Decision Process (MDP): State Space: The variable-length vertex coordinate sequence of the polygon to be processed is normalized into a fixed-dimensional tensor (N×3) through zero-padding and masking, serving as the input to the neural network. Action Space: A set of predefined topological segmentation templates for different numbers of vertices (3-6 vertices) (e.g., connecting diagonals, connecting specific vertices) is used, and the agent selects the optimal action from these. Reward Mechanism: A composite reward function is designed. A positive reward is given if an action generates a high-quality quadrilateral; a progress reward is given if the subdivision progress is advanced; a high completion reward is given if the task is completed; and a penalty is given if an invalid action is executed or too many steps are taken. Training and Application: Training Phase: The agent continuously tries and fails in the environment, using experience replay and the target network for stable training, learning the state-action value function (Q-value). Application Phase: The trained model is loaded, and greedy reasoning is performed on new polygons, gradually segmenting them into a full quadrilateral mesh. This paper proposes a reinforcement learning agent to autonomously explore the optimal partitioning path, eliminating reliance on human experience and fixed rules to achieve fully automated partitioning. A state standardization method based on zero-padding and masking mechanisms is proposed, enabling the neural network to uniformly handle polygon inputs with arbitrary numbers of vertices, solving the problem of variable-length inputs. By designing a multi-dimensional composite reward function (quality, progress, completion, and penalty), the agent is guided to generate high-quality quadrilateral meshes and avoid invalid actions, improving mesh quality and success rate. Through end-to-end training, the model can adapt to complex geometries never seen before, achieving generalized partitioning of polygons from simple to complex, thus enhancing generalization ability.

[0039] Preferably, the polygon data in the training dataset is generated in the following way:

[0040] Diverse convex polygon data can be generated using the random angle-radius method or the convex hull method.

[0041] or;

[0042] The system acquires the CAD model of the aircraft to be processed and constructs a multimodal feature representation, identifies independent functional components and segmentation boundaries, and outputs structured engineering data containing key geometric feature lines. The system analyzes the key geometric feature lines, reconstructs closed contour curves based on the segmentation boundaries, and discretizes them into vertex sequences to generate polygon data.

[0043] Preferably, the preset vertex scheduling strategy is:

[0044] Traverse the global sub-region set and filter out polygons with more than 4 vertices to form a candidate set;

[0045] If the candidate set is not empty, then the polygons are sorted in descending order of the number of vertices, and the polygon with the most vertices is selected as the next polygon to be processed; if the number of vertices is the same, then the polygon with the lowest geometric quality is selected.

[0046] If the candidate set is empty, the polygon with 4 vertices and the lowest geometric quality is selected as the next polygon to be processed for optimization and adjustment, or the subdivision is determined to be complete.

[0047] In situations where multiple sub-regions exist within a polygon set, randomly selecting the processing order can lead to lengthy meshing paths or even local dead ends (e.g., processing smaller regions first results in larger regions being unsegmentable). This method employs a greedy strategy that prioritizes processing polygons with a high number of vertices (high complexity); if the number of vertices is the same, polygons with lower geometric quality are selected; if no polygon has more than 4 vertices, polygons with 4 vertices of poor quality are optimized or the process is terminated. This approach improves meshing efficiency by prioritizing the most complex regions, avoiding the dilemma of leaving complex regions for last and reducing the total number of meshing steps. It also optimizes global quality by dynamically adjusting the processing order, making the overall mesh generation process more orderly and reducing the global quality degradation caused by suboptimal local selections.

[0048] Preferably, the standardization into a fixed-dimensional state vector is specifically achieved in the following way:

[0049] Set the preset maximum vertex count threshold N max ;

[0050] Get the actual number of vertices n of the polygon currently being processed;

[0051] The construction dimension is (N) max The coordinate matrix of n,2): If n <N max Then, fill the first n rows of the matrix with the two-dimensional coordinates of the n vertices, leaving N vertices. max Subtract n rows and fill with zero vectors; if n≥N max Then calculate the parameters of the intermediate vertices of the polygon to be processed. , Take any vertex of the polygon to be processed as the starting point, and starting from the starting point, based on the parameters of the intermediate vertices... The middle vertex of the polygon to be processed is determined clockwise. The starting point and the middle vertex are connected to divide the polygon into two sub-polygons. The transformation from mesh to vector is performed based on the sub-polygons.

[0052] The construction dimension is N max Binary mask vector: if n <N max The first n elements of the vector are marked as the first value to represent valid vertices, and the remaining N elements are... max Subtract n elements and label them as the second value to represent the fill data; if n=N max If , then all elements of the vector are marked as the first value.

[0053] In this case, the number of polygon vertices is not fixed (variable-length sequence), while deep neural networks typically require a fixed-dimensional input matrix. Simple truncation will lose geometric information, while simple padding will cause the model to confuse real vertices with the padded data. To address this issue, this invention sets a threshold N. max For less than N max The vertex sequence is zero-padded with a vector, and a binary mask vector is generated simultaneously (1 indicates valid, 0 indicates filled). This achieves a unified input dimension, enabling the network to handle polygons with any number of vertices. Information losslessness and interference resistance: the masking mechanism allows the network to clearly distinguish between real geometric points and filled noise, preventing zero values ​​from being misidentified as the origin, significantly improving the model's accuracy in extracting geometric features.

[0054] Preferably, the execution logic of the ε-greedy strategy is as follows:

[0055] Generate a random number r∈[0,1]. If r<ε, then randomly select an action from the subset of legal actions corresponding to the current polygon.

[0056] If r≥ε, then select the action with the largest Q value output by the main Q network;

[0057] Among them, the exploration rate ε decreases as the number of training steps increases according to a preset decay function.

[0058] In the early and middle stages of deep reinforcement learning training, the main challenges are exploration and utilization:

[0059] If only Greedy is used, the agent may prematurely converge to a local optimum. For example, it may find that a certain simple segmentation action (such as always cutting the diagonal) can get a few points, and it will only do this action forever, without trying other complex segmentation strategies that may score higher but perform poorly in the early stages, resulting in mediocre performance of the final model.

[0060] If only exploration is performed (Random): the agent tries randomly like a headless fly, resulting in extremely low training efficiency, difficulty in convergence, and even inability to learn basic decomposition logic.

[0061] Fixed exploration rate problem: If ε remains constant, the agent will still perform random actions with a certain probability in the later stages of training, resulting in policy instability and inability to output a deterministic optimal solution.

[0062] This method solves the above problems through a dynamic equilibrium mechanism:

[0063] Dual-mode switching: A comparison mechanism between a random number r and a threshold ε is introduced. When r < ε, a legal action is forced to be randomly selected. This ensures that the agent has the opportunity to try actions with temporarily low Q values ​​but unknown potential value (exploring the unknown space). When r ≥ ε, the action with the largest Q value is forced to be selected. This ensures that the agent fully utilizes the knowledge it has learned and executes the optimal strategy (utilizing known experience). Dynamic decay mechanism: ε is defined to decrease monotonically with the number of training steps. In the early stages of training: ε is relatively large (e.g., 0.9), encouraging a large amount of random exploration to quickly cover the action space and collect diverse experience data. In the later stages of training: ε is gradually reduced (e.g., reduced to 0.01), reducing random interference and allowing the agent to focus on fine-tuning and solidifying the optimal strategy, ensuring convergence stability. Legal action constraint: Emphasis is placed on selecting from a subset of legal actions, avoiding geometrically impossible illegal actions during random exploration (e.g., applying hexagonal segmentation rules to triangles), thus improving the effectiveness of exploration. Through sufficient exploration in the early stages, the agent can discover high-value partitioning paths (i.e., action sequences with low short-term rewards but high long-term returns), thereby finding the globally optimal partitioning strategy. As training progresses, the model gradually shifts from a broad-based approach to a more focused one, reducing the interference of invalid random actions on gradient updates and significantly accelerating the convergence speed of the Q-network. The extremely low exploration rate at the end of training ensures the determinism of the model's output, allowing exploration to be directly disabled (ε=0) during the application phase (inference), resulting in stable, reproducible, and high-quality mesh partitioning. Combined with the restriction on the subset of legal actions, this ensures that even data generated by random exploration conforms to geometric topological rules, preventing the experience replay buffer from being contaminated by a large amount of invalid junk data and improving training efficiency.

[0064] Preferred, instant reward signal The calculation method is as follows:

[0065] ;

[0066] in, For quality awards, As a progress reward, To complete the reward, Punishment for inefficiency Punishment for mistakes.

[0067] A single reward signal can lead to the sparse reward problem, where the agent struggles to receive feedback early in the learning process or focuses solely on completion while neglecting grid quality. This method constructs a composite formula that includes positive rewards for quality, progress, and completion, as well as negative penalties for efficiency and errors. This provides dense and well-guided feedback signals, guiding the agent not only to complete grid partitioning (completion reward), but also to partition well (quality reward), partition quickly (efficiency penalty), and avoid errors (error penalty), thus achieving multi-objective optimization.

[0068] Preferred quality reward The calculation method is as follows:

[0069] The number of newly generated quadrilaterals identified in step 4. ;

[0070] like Then set ;

[0071] like ,but ;

[0072] in, ;

[0073] in, For orthogonality, For smoothness score, The aspect ratio is used to score. Scoring is based on convexity.

[0074] Preferred, progress reward The calculation method is as follows:

[0075] ;

[0076] in, Increase the reward for the number of quadrilaterals. Reduce rewards to reduce complexity.

[0077] Preferred, completion reward The triggering conditions and calculation methods are as follows:

[0078] Check whether all sub-polygons in the global sub-region set have 4 vertices;

[0079] If so, then ;in, Rewards for efficiency The sum of quality scores for all quadrilateral grids;

[0080] If not, then set .

[0081] Preferred, efficiency penalty The calculation method is as follows:

[0082] like ≤10, then ;

[0083] like >10, then ;

[0084] in, Execute the number of steps for the current topology fill action;

[0085] Error Penalty The calculation method is as follows: ;in, Penalty for abnormal number of sub-regions. Penalty for invalid actions.

[0086] One or more technical solutions provided by this invention have at least the following technical effects or advantages:

[0087] High automation and robustness: It can process polygons with any number of vertices without human intervention, significantly reducing the labor cost of preprocessing.

[0088] Excellent mesh quality: The generated quadrilaterals perform well in terms of orthogonality, smoothness, aspect ratio, etc., reducing the error of subsequent simulation calculations.

[0089] High convergence speed: Through a reasonable scheduling strategy (prioritizing polygons with a large number of vertices) and reward guidance, the number of steps required for subdivision is significantly reduced.

[0090] Flexible data compatibility: The proposed standardization method perfectly resolves the contradiction between variable-length geometric data and fixed neural network input, ensuring lossless information transmission. Attached Figure Description

[0091] The accompanying drawings, which are provided to further illustrate embodiments of the invention and constitute a part of this invention, are not intended to limit the scope of the invention.

[0092] Figure 1 This is a schematic diagram of the Q-network model structure;

[0093] Figure 2 A schematic diagram of a triangle topology filling template;

[0094] Figure 3 A schematic diagram of a quadrilateral topology-filling template;

[0095] Figure 4 A schematic diagram of a pentagonal topology filling template;

[0096] Figure 5 Schematic diagram of a hexagonal topology filling template;

[0097] Figure 6 Flowchart of an automatic polygon quadrilateral mesh subdivision method based on deep reinforcement learning;

[0098] Figure 7 This is a flowchart illustrating the intelligent component recognition and segmentation method for aircraft CAD models based on three-modal fusion.

[0099] Figure 8 This is a schematic diagram of the segmentation of the polygon to be processed. Detailed Implementation

[0100] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, where there is no conflict, the embodiments of the present invention and the features thereof can be combined with each other.

[0101] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0102] Example 1;

[0103] Embodiment 1 of this invention provides an automatic polygon quadrilateral mesh subdivision method based on deep reinforcement learning. The complete process of automatic polygon quadrilateral mesh subdivision using this method includes the following steps:

[0104] 1) Environment initialization: Generate or input the polygon dataset to be subdivided, and initialize the reinforcement learning environment;

[0105] 2) State observation construction: For the polygon to be processed, construct state observations containing geometric information and effective masks;

[0106] 3) Agent decision-making: The DQN agent selects the optimal partitioning template action based on the current state;

[0107] 4) Action execution and state transition: Apply the selected topology fill template to subdivide the polygon and update the sub-region set;

[0108] 5) Reward Calculation: Calculate immediate rewards based on the mesh quality after topology filling;

[0109] 6) Experience storage: Store state transition experience to optimize the agent's policy network;

[0110] 7) Batch training: The DQN learning algorithm is used to train the main Q-network;

[0111] 8) Target Q-network update: Periodically update the target Q-network and copy the parameters of the master Q-network to the target Q-network;

[0112] 9) Model Deployment: Apply the trained optimal strategy to the new polygon subdivision task.

[0113] The core principle of this invention is to model the polygon mesh subdivision process as a Markov Decision Process (MDP): 1) State space: geometric feature representation of the polygon (vertex coordinates + effective mask); 2) Action space: a predefined set of subdivision templates (9 subdivision operations); 3) Reward function: a reward signal based on mesh quality to guide the agent to learn a high-quality subdivision strategy; 4) State transition: geometric shape changes caused by template application; through deep Q-learning, the agent learns the mapping function from polygon state to subdivision action to maximize long-term cumulative reward.

[0114] Detailed explanation of each step:

[0115] Step 1: Environment Initialization:

[0116] 1) Implementing entity: Training system;

[0117] 2) Execution content: Generate diverse convex polygon training datasets; define Q-network; define template actions and initialize core components;

[0118] 3) Specific implementation:

[0119] Polygon generation methods include: random generation methods such as the angle-radius method (simple and efficient, ensuring convexity, but with relatively regular shapes) and the convex hull method (ensuring strict convexity, resulting in more natural and diverse shapes); and geometric constraint-based methods such as regular polygon generation and star-shaped polygon generation (there are many automatic polygon generation algorithms available, and the choice can be made based on the specific application). In addition, initial polygons can be generated by recognizing geometric components from a digital model using methods provided by the intelligent component recognition and segmentation method for aircraft CAD models based on three-modal fusion.

[0120] Q network definition (the main / target network structures are exactly the same):

[0121] Input: A straight-edged polygon represented by an ordered sequence of vertices;

[0122] Output: The execution probability of all topology filling template actions;

[0123] Model Structure: The model is a classification network (this is just a reference template for a deep learning neural network, which can be modified according to the actual situation), such as... Figure 1 As shown, Figure 1 This is a schematic diagram of the Q-network model structure.

[0124] The model consists of two 1D convolutional layers (the neural network processes the sequence of polygon vertices (extracting meaningful local geometric features from the original vertex coordinates to provide high-quality input for subsequent LSTM and attention mechanisms)) and two normalization layers; one LSTM layer (enabling the neural network to understand the sequential relationships between vertices, a key capability for processing sequential geometric data like polygons); one multi-head attention layer (multi-head attention allows the model to adaptively focus on the most important parts of the polygon); three fully connected layers (the three fully connected network converts the rich features extracted by the previous layers into the final classification decision); and two Dropout layers to prevent overfitting.

[0125] Template action definition:

[0126] like Figures 2 to 5 As shown, nine template actions are defined to cover the topology filling method from triangle to hexagon.

[0127] like Figures 2 to 5 As shown, this invention predefines nine basic topology filling templates. These templates are categorized based on the number of polygon vertices N, and are designed to transform the current polygon into a combination containing at least one quadrilateral subregion, or to complete the final subdivision, through a single geometric segmentation operation. Category 1: Processing template for triangles (N=3); Category 2: Processing template for quadrilaterals (N=4); Category 3: Processing template for pentagons (N=5); Category 4: Processing template for hexagons (N=6). These nine templates represent the minimum complete set selected through geometric topology analysis.

[0128] These templates compress an infinite number of geometric cutting possibilities into nine discrete options, transforming the action space of reinforcement learning from continuous high-dimensional to low-dimensional discrete, improving training efficiency by several orders of magnitude. This allows the model to learn complex partitioning strategies within a finite number of steps, accelerating convergence. Predefined templates physically prevent the generation of illegal meshes (such as self-intersecting or non-manifold edges). The agent can only choose from legal options, eliminating the need for complex penalty terms in the reward function to correct geometric errors and ensuring topological legality. These nine templates encapsulate the geometric heuristics from traditional mesh partitioning algorithms (such as paving and mapping methods). They incorporate expert knowledge, achieving a combination of data-driven and rule-driven approaches. While the templates are fixed, the template selection strategy (Q-network) is adaptive. Faced with different polygon shapes (flat, elongated, concave), the network automatically selects the most suitable template from these nine options, achieving robust partitioning of arbitrarily complex geometries with high adaptability.

[0129] Initialize core components:

[0130] Initialize the main Q-network (keeping parameters continuously updated) and the target Q-network (with fixed parameters, periodically synchronizing with the main Q-network), keeping the main Q-network and the target Q-network consistent during initialization; initialize the optimizer; initialize the experience replay pool; define hyperparameters (discount factor, ε-greedy, batch training size, number of update steps for the target Q-network, total number of training steps, etc.).

[0131] Step 2: State observation construction:

[0132] 1) Execution Module: Status Extraction Module;

[0133] 2) Execution content: Standardize variable-length polygon data into a fixed-dimensional state representation;

[0134] 3) Specific implementation:

[0135] Polygon coordinates fill: Fills the vertex coordinates to a fixed length (6 vertices).

[0136] Valid mask creation: identifies the actual vertex positions and distinguishes them from padding data;

[0137] State format: {"polygon":(6,2) coordinate array, "mask":(6) mask array}.

[0138] The core objective of filling is to standardize the coordinates of a polygon with any number of vertices (≤6) into an array of 6 fixed vertices, each containing a two-dimensional x / y coordinate, and to distinguish between real vertices and filled vertices through a mask, ultimately outputting a state representation with a unified dimension.

[0139] The specific implementation method is as follows:

[0140] Polygon coordinates fill (polygon array: shape=(6,2));

[0141] Pre-processing:

[0142] Coordinate normalization:

[0143] To eliminate the influence of absolute coordinate scale (such as differences in coordinate range between different polygons), the vertex coordinates of the original polygons are first normalized using the industry-standard Min-Max Scaling method, as shown in the following formula:

[0144] ;

[0145] in, and These are the vertices of the current polygon before and after normalization, respectively. value, and These are the vertices of the current polygon to be normalized. and Axis coordinates and Each of the vertices of the current polygon The maximum and minimum values ​​of the axis coordinates. and Each of the vertices of the current polygon The maximum and minimum values ​​of the axis coordinates;

[0146] Calculation logic:

[0147] ① Traverse all vertices of the current polygon and extract all... Minimum value of coordinates Maximum value Similarly, extract coordinates , ;

[0148] ②If (e.g., a vertical line segment), then (To avoid a denominator of 0); the same applies to the y-axis;

[0149] ③ After normalization, the coordinate range is fixed at [0,1] to ensure the consistency of scale for different polygons.

[0150] Vertex filling and arrangement:

[0151] Rules: Preserve the original vertex order (clockwise). If there are fewer than 6 vertices, fill the end of the original vertex list with invalid vertices. If the number of vertices is greater than 6, segment the polygon before filling and arranging the vertices (calculate the parameters of the intermediate vertices of the polygon to be processed). , Take any vertex of the polygon to be processed as the starting point, and starting from the starting point, based on the parameters of the intermediate vertices... Determine the middle vertex of the polygon to be processed clockwise, and connect the starting point and the middle vertex to divide the polygon into two sub-polygons.

[0152] Invalid vertex values: uniformly fill (0.0, 0.0).

[0153] Example (with) Figure 8 (Taking polygon 1, which is the result of dividing a heptagon, as an example)

[0154] Original vertices (normalized): [(0.1,0.2),(0.3,0.4),(0.5,0.6),(0.7,0.8),(0.9,0.1)] (5 vertices) Polygon array after filling: [

[0156] [0.1,0.2],#True vertex 1

[0157] [0.3,0.4],#True Vertex 2

[0158] [0.5, 0.6], #True Vertex 3

[0159] [0.7,0.8],#True Vertex 4

[0160] [0.9, 0.1], #True Vertex 5

[0161] [0.0,0.0]# Fill vertex 1 ];

[0163] Dimension Explanation: 6 represents a fixed number of vertices, 2 represents the x / y coordinates of each vertex, and the final polygon is a 6-row, 2-column two-dimensional array (shape=(6,2)).

[0164] Valid mask creation (mask array: shape=(6,)):

[0165] The mask array has the same length as the number of vertices. 1 indicates a real vertex and 0 indicates a filled vertex. Only the validity needs to be distinguished; normalization is not required.

[0166] Example (corresponding) Figure 8 Polygon 1 in the middle):

[0167] mask array: [1,1,1,1,1,0]

[0168] Dimension Explanation: A 6-dimensional one-dimensional array, where each element is an integer of type 0 or 1.

[0169] Final state format:

[0170] {

[0171] "polygon":np.array([[0.1,0.2],[0.3,0.4],[0.5,0.6],[0.7,0.8],[0.9,0.1],[0.0,0.0]]),

[0172] "mask":np.array([1,1,1,1,1,0])

[0173] };

[0174] For specific implementation methods, please refer to the literature (min-max normalization): Data Mining: Concepts and Techniques (Third Edition) Pages 83-124. The embodiments of the present invention will not be described or limited accordingly.

[0175] Step 3: Agent Decision Making:

[0176] Execution subject: DQN agent;

[0177] Execution content: Selecting partitioning actions based on the ε-greedy strategy;

[0178] Decision-making mechanism:

[0179] Exploration phase (when the random probability is less than ε-greedy): Randomly select the template action for the current point to expand the search space;

[0180] Exploitation phase (when the random probability is greater than ε-greedy): Select the optimal action with the largest Q value (the template action with the highest score);

[0181] ε decay: Gradually reduce the exploration probability as training progresses.

[0182] Step 4: Action Execution and State Transition

[0183] Execution Entity: Template Action Execution Module;

[0184] Execution content: Apply the selected template to subdivide the current polygon;

[0185] The template library contains nine subdivision operations for different numbers of vertices to ensure geometric validity.

[0186] For details on the nine templates in the template library, please refer to Table 1, which is a template information table.

[0187] Table 1

[0188] template Target graphics Connection method (geometric definition) Generating sub-regions Technical effects / applications Template 1 (e.g.) Figure 2 Triangle template triangle 1. Connect the midpoints of the two legs of the triangle to obtain a line segment parallel to the base; 2. Draw a vertical line segment from the midpoint of this line segment to the midpoint of the base. One small triangular region + two congruent trapezoidal regions, for a total of three sub-regions. Achieving triangular symmetric subdivision facilitates mesh generation, uniform region partitioning, and maintains geometric topological consistency. Template 2 (e.g.) Figure 3 (The first image arranged from left to right) Quadrilateral non-uniform template quadrilateral 1. Draw line segments from the left and right vertices of the upper base of the quadrilateral to the left and right 1 / 3 points of the lower base, respectively; 2. Draw vertical line segments upward from the left and right 1 / 3 points of the lower base, intersecting the left and right line segments from step 1 at a single point inside; 3. Connect the left and right internal points from step 2. The four sub-regions are: a small rectangle on the left, a trapezoid in the upper middle, a square in the lower middle, and a small rectangle on the right. Divide the quadrilateral into equal parts along the horizontal direction to adapt to non-uniform layout and modular area allocation scenarios. Template 3 (e.g.) Figure 3 (The second image from left to right) Quadrilateral center nested template quadrilateral 1. Draw line segments from the left and right vertices of the upper base of the quadrilateral to the left and right 1 / 3 points of the lower base, respectively; 2. Draw line segments from the left and right vertices of the lower base of the quadrilateral to the left and right 1 / 3 points of the upper base, respectively; 3. Connect the four interior points from steps 1 and 2 in sequence. A small central square plus four surrounding trapezoids, totaling five sub-regions. Achieve centrally symmetric subdivision of quadrilaterals, suitable for uniform mesh generation. Template 4 (e.g.) Figure 3 (The third image from left to right) Quadrilateral asymmetric template quadrilateral 1. Draw a line segment from the left vertex of the upper base of the quadrilateral to the right half-point of the lower base; 2. Draw a vertical line segment upwards from the midpoint of the lower base to the point inside the quadrilateral in step 1; 3. Draw a horizontal line segment to the left from the midpoint of the right base to the point inside the quadrilateral in step 1. There are three sub-regions: a trapezoid at the bottom left, a trapezoid at the top right, and a square at the bottom right. It provides asymmetrical yet regular quadrilateral partitioning to meet the functional needs of differentiated areas. Template 5 (e.g.) Figure 3 (The fourth image from left to right) Quadrilateral division template quadrilateral Connect the horizontal and vertical midlines of the square. Four congruent small quadrilaterals, forming four sub-regions. The basic quadrilateral template is suitable for general scenarios such as coordinate partitioning, uniform meshing, and pixelated region splitting. Template 6 (e.g.) Figure 4 (Image on the left side) Pentagon diagonal template pentagon Connect any vertex to a non-adjacent vertex (diagonal). One triangular region + one quadrilateral region, for a total of two sub-regions. Decomposing the pentagon into its basic geometric shapes facilitates geometric subdivision and simplification. Template 7 (e.g.) Figure 4 (The diagram on the right side of the middle section) Pentagonal symmetrical template pentagon The vertical line segment connecting the upper vertex and the midpoint of the lower base. Two symmetrical quadrilateral regions, comprising two sub-regions. Maintaining the lateral symmetry of the pentagon is suitable for geometric simplification and symmetry analysis. Template 8 (e.g.) Figure 5 (Image on the left side) Hexagonal horizontal template hexagon Connect the midpoints of opposite sides in the horizontal direction (horizontal median) There are two isosceles trapezoidal regions, one above the other, making a total of two sub-regions. The hexagon is symmetrically divided horizontally, maintaining the same shape and area between the upper and lower regions. Template 9 (e.g.) Figure 5 (The right side of the image) Hexagonal vertical template hexagon Connect the midpoints of opposite sides in the perpendicular direction (perpendicular median) There are two pentagonal regions on the left and right, making a total of two sub-regions. The hexagon is symmetrically divided along the vertical direction, keeping the shape and area of ​​the left and right regions consistent.

[0189] Step 5: Reward Calculation

[0190] Executing Entity: Reward Calculation Module; Execution Content: Comprehensive evaluation of the quality of the data segmentation;

[0191] Reward Design:

[0192] The reward design formula is shown below. For immediate reward signals, For quality awards, As a progress reward, To complete the reward, Punishment for inefficiency Punishment for mistakes.

[0193] ;

[0194] Basic Quality Bonus: The basic quality bonus is only applied to quadrilateral sub-regions; no quality bonus is awarded if no quadrilaterals are generated. The formula for the basic quality bonus is as follows: The sum of the quality scores for all quadrilateral grids, the number of newly generated quadrilaterals identified in step 4, i.e. the number of valid sub-regions (quadrilateral sub-regions), is multiplied by 10 to amplify the reward magnitude.

[0195] ;

[0196] in The calculation formula is as follows. Where... Orthogonality (angles close to 90 degrees score higher) The smoothness score is awarded based on the smoothness of the edges (those with a gentle change in the length of adjacent edges receive a higher score). Score the aspect ratio (avoid overstretching of quadrilateral sub-regions). Scoring is based on convexity (ensuring the quadrilateral is a convex polygon). 0.4, 0.3, 0.2, and 0.1 are respectively... The weighting percentage.

[0197] ;

[0198] Progress reward: Quantitatively evaluates the progress made by a single partitioning action, providing intermediate guidance signals for the reinforcement learning agent and avoiding rewarding only upon final success (the sparse reward problem). The progress reward formula is as follows, where... Increase the reward for the number of quadrilaterals. To reduce complexity, the reward is reduced (the average number of vertices reduces the reward). Versions 2.0 and 1.5 are respectively... The weighting percentage.

[0199] ;

[0200] in The calculation formula is as follows. This represents the current number of quadrilateral subregions. The number of quadrilateral subregions before topological filling.

[0201] ;

[0202] and The calculation formula is as follows. This represents the average number of vertices in all sub-regions before topology filling. This represents the average number of vertices in all sub-regions after topological filling.

[0203] ;

[0204] Completion Reward: A completion reward is awarded when all sub-regions are filled with quadrilaterals. The completion reward formula is as follows, where... There are efficiency rewards (the fewer steps, the higher the reward). The base score is 20.0, calculated as the sum of the quality scores for all quadrilateral grids. 2.0 and 5.0 are respectively... The weighting percentage.

[0205] ;

[0206] in The calculation formula is as follows. The total number of steps performed for the topology filling action.

[0207] E bon =max(10-Step t ,0);

[0208] Efficiency penalty: An efficiency penalty is applied based on the total number of steps taken in the topology-filling action. The efficiency penalty formula is as follows, where... The number of steps required to fill the current topology is specified, with 0.1 representing the weight of the step penalty. The penalty is divided into a linearly increasing penalty and an overstep penalty. When the maximum number of steps (10) is exceeded, the efficiency penalty increases by 5.0.

[0209] ;

[0210] ;

[0211] Error penalty: A penalty for invalid or erroneous operations. The formula for error operation penalty is as follows, where... Penalize invalid actions (such as applying a quadrilateral template to a triangle). Penalize for abnormal number of sub-regions.

[0212] ;

[0213] ;

[0214] ;

[0215] Step 6: Experience storage;

[0216] Execution entity: DQN learning algorithm;

[0217] Execution content: Store experience in the replay pool;

[0218] Stored content:

[0219] empirical tuples Store in the return tank. This represents the current state (the coordinates of all vertices of the sub-regions after the current polygon topology is filled). The topology fill template action selected for the current step. The reward value obtained after performing topology filling on the current state. This refers to the next stage state after performing the topology fill action (the coordinates of all sub-region vertices after performing polygon topology fill). This is the end label for iterative execution.

[0220] Step 7: Batch Training

[0221] Execution entity: DQN learning algorithm;

[0222] Execution content: Batch training optimization through random sampling of the experience replay pool and deep Q-learning of the target network mechanism;

[0223] Specific implementation:

[0224] Random sampling of the experience replay buffer:

[0225] The experience replay buffer serves as the agent's memory, storing a large amount of state transition experience. During each training session, a small batch of experience data is randomly selected from this buffer for learning.

[0226] Optimal future reward estimation for the target Q network:

[0227] The target Q-network is a lagged copy of the main Q-network, used to calculate a stable estimate of future rewards. First, the next state is... The input is fed into the target Q-network to obtain the Q-value predictions for all possible topology-filling actions. Then, for each next state, the action with the largest Q-value is selected, representing the optimal future reward for that state. Finally, the largest Q-value is multiplied by a discount factor. , represents the present value of future rewards. For states that cause the task to terminate, the future rewards are zero, and only the immediate rewards are calculated.

[0228] Target Q value calculation:

[0229] The calculation formula is as follows, where For the target Q value, Stored in the experience pool of the main Q network Reward value in the state, As a discount factor, For the target Q network in The execution probability of the optimal topology filling template action under the given state.

[0230] ;

[0231] Calculation of the current Q-value of the main Q-network:

[0232] First, set the current Input the main Q-network, obtain Q-value estimates for all actions through the network's forward propagation, and then use the gather operation to select the Q-value corresponding to the actual action to be performed from all the Q-values. .

[0233] Calculation of time-series differential loss:

[0234] Huber loss function Using Smooth L1 Loss provides better robustness to outliers and is more stable for training compared to mean squared error; temporal difference error. : Calculates the difference between the current Q-value and the target Q-value, reflecting the accuracy of the agent's prediction; regularization term :Add to Regularization prevents overfitting and penalizes excessively large network weights. The specific formula is as follows.

[0235] ;

[0236] Backpropagation and parameter optimization:

[0237] The gradient of the network parameters with respect to the loss is calculated through backpropagation of the loss function.

[0238] Step 8: Target Q network update;

[0239] 1) Execution entities: Master Q network, Target Q network;

[0240] 2) Execution content: When the preset target Q network update step number is reached, synchronize the master Q parameters to the target Q network.

[0241] Step 9: Target Q network update;

[0242] 1) Execution subject: The optimal policy network after training;

[0243] 2) Execution Content and Target: Fix the parameters of the optimal policy network after training convergence. For a new geometric model, load this network and execute steps 2 to 6 for it. The agent can then quickly output an optimized action sequence based on the learned policy.

[0244] This step demonstrates the ultimate value and generalization ability of the method, enabling automated optimization that is ready to be trained and used immediately.

[0245] The specific method for standardizing to a fixed-dimensional state vector is as follows:

[0246] Set the preset maximum vertex count threshold Nmax ;

[0247] Get the actual number of vertices n of the polygon currently being processed;

[0248] The construction dimension is (N) max The coordinate matrix of n,2): If n <N max Then, fill the first n rows of the matrix with the two-dimensional coordinates of the n vertices, leaving N vertices. max Subtract n rows and fill with zero vectors; if n≥N max First, calculate the parameters of the intermediate vertices of the polygon to be processed. Then, take any vertex of the polygon to be processed as the starting point 0, and move the corresponding number of vertices clockwise based on the parameters of the middle vertex to obtain the middle vertex of the polygon to be processed. After connecting the starting point and the middle vertex to form two new polygons, perform the conversion from mesh to vector.

[0249] Figure 8 This is a schematic diagram of the segmentation of the polygon to be processed; (taking a heptagon as an example): ,at this time Then calculate the parameters of the middle vertices of the polygon. .like Figure 8 As shown, take any vertex of the polygon to be processed as the starting point 0, take the middle vertex of the polygon to be processed clockwise, i.e. vertex 3, and connect the two points to form a new polygon 1 and polygon 2.

[0250] The construction dimension is N max Binary mask vector: if n <N max The first n elements of the vector are marked as the first value to represent valid vertices, and the remaining N elements are... max Subtract n elements and label them as the second value to represent the fill data; if n=N max If , then all elements of the vector are marked as the first value.

[0251] in, Figure 6 This is a flowchart of a method for automatic subdivision of polygonal quadrilateral meshes based on deep reinforcement learning, which can facilitate understanding of this method.

[0252] Because this invention employs a technical solution that constructs a grid partitioning problem as a sequential decision problem and combines it with deep reinforcement learning, it can achieve the following significant technical effects:

[0253] 1) Intelligent template selection: Through deep learning, template selection strategies are automatically learned, eliminating the dependence on hard-coded rules and adapting to complex and varied geometric shapes;

[0254] 2) Optimal subdivision sequence learning; the agent can learn the optimal subdivision sequence of complex polygons, avoid local optima, and improve the overall mesh quality;

[0255] 3) Adaptive optimization capability: The reward mechanism guides the agent to adaptively adjust the partitioning strategy according to different geometric features, so as to achieve personalized optimization;

[0256] 4) Improved training efficiency: Experience replay and target network mechanisms ensure training stability and convergence speed, while reducing computational costs;

[0257] 5) Strong generalization ability: The trained agent can handle unseen polygonal shapes, demonstrating good generalization performance;

[0258] 6) Quality consistency guarantee: Based on the optimal learning strategy, it can provide consistent high-quality subdivision results for similar geometry.

[0259] Example 2;

[0260] Based on Example 1, Example 2 further describes the method for generating the polygon dataset to be subdivided in step 1 of Example 1 during environment initialization:

[0261] Diverse convex polygons are generated using either the randomly generated angle-radius method or the convex hull method.

[0262] Alternatively, an initial polygon dataset can be generated using a tri-modal fusion-based intelligent component recognition and segmentation method for aircraft CAD models. This process includes:

[0263] Obtain the CAD model of the aircraft and integrate its geometric topology, semantic labels and spatial location information to construct a multimodal feature representation;

[0264] The system identifies independent functional components and determines component segmentation boundaries using a deep learning network, outputting structured engineering data containing the final component segmentation results and extracted key geometric feature lines.

[0265] The key geometric feature lines are parsed from the structured engineering data, and feature lines belonging to the boundary of the same component are topologically connected according to the component segmentation results to reconstruct a closed contour curve.

[0266] The closed contour curve is discretized into a vertex sequence to generate corresponding two-dimensional or multi-dimensional polygons, which serve as the polygon dataset to be subdivided.

[0267] The following section provides a detailed explanation of the intelligent component recognition and segmentation method for aircraft CAD models based on three-modal fusion:

[0268] This invention provides a method for intelligent component recognition and segmentation of aircraft CAD models based on three-modal fusion, the method comprising:

[0269] Step S1: Obtain the CAD model of the aircraft to be processed, wherein the CAD model of the aircraft has a boundary representation structure;

[0270] Step S2: Based on the engineering requirements of mesh generation, perform engineering semantic annotation on the faces in the boundary representation structure of the aircraft CAD model to obtain component semantic labels; extract the geometric parameters of each face from the boundary representation structure; generate a multi-view 2D rendering image for each annotated face; associate and store the multi-view 2D rendering image, the geometric parameters, and the component semantic labels to form training samples;

[0271] Step S3: Train a multimodal recognition model using the training samples. The multimodal recognition model is configured to fuse input image features and language semantic information to output semantic labels for components on the surface of the aircraft CAD model.

[0272] Step S4: Input the aircraft CAD model to be identified into the trained multimodal recognition model, identify the surfaces in the aircraft CAD model, and obtain the preliminary surface-part semantic label mapping relationship;

[0273] Step S5: Based on the preliminary face-part semantic label mapping relationship, for faces whose recognition confidence output by the multimodal recognition model is lower than a preset threshold or whose geometric area ratio is less than a set threshold, the geometric rule auxiliary module is activated to perform semantic completion to obtain the final part segmentation result.

[0274] Step S6: Based on the final component segmentation result, extract the key geometric feature lines corresponding to each component from the boundary representation structure of the aircraft CAD model;

[0275] Step S7: Convert the final component segmentation results and the extracted key geometric feature lines into a structured engineering semantic format for the target mesh generation software to read and utilize, and then output it.

[0276] This method, through step S1, limits the processing object to CAD models with boundary representation structures, ensuring the feasibility of all subsequent geometric operations (topology analysis, parameter extraction). By utilizing steps S2-S3 to construct a multimodal dataset oriented towards mesh engineering semantics and training a specialized model integrating visual, geometric, and linguistic information, the method gains the ability to understand engineering semantics, replacing manual identification by engineers. Steps S4-S5 employ a collaborative mechanism of AI recognition of large components and geometric rule completion of small features, utilizing AI to handle macroscopic patterns while using geometric rules to ensure detailed integrity, overcoming the limitations of single methods on complex engineering geometries. Steps S6-S7 automatically connect the semantic recognition results to the geometric kernel, extracting key geometric feature lines and converting them into a format directly readable by mesh software, thus completing the final step from recognition to application and eliminating manual conversion. This solves the end-to-end automation bottleneck problem in the aircraft CAD mesh generation process, where component recognition relies entirely on manual labor, resulting in extremely low efficiency, inconsistent results, and the inability to directly use the recognition results for subsequent engineering. It achieves a fully automated, high-precision processing flow from the original CAD model to mesh-generated ready engineering data, reducing the time required for manual work, which can take several weeks, to automated processing.

[0277] In step S2, the surfaces in the boundary representation structure of the aircraft CAD model are annotated with engineering semantics. Specifically, in the mesh preprocessing software environment, semantic labels are manually assigned to the surfaces contained in different components based on aerodynamic characteristics or structural functional differences.

[0278] Preferably, the geometric rule auxiliary module determines and corrects the semantic labels of the surface components based on the geometric topological relationships and parametric features of the aircraft CAD model, thereby forming the final component segmentation result.

[0279] Purely data-driven AI models are prone to low confidence or misjudgment when faced with small-sized, weakly textured, feature-fuzzy, or geometrically rare surfaces in the training data (such as slender wing trailing edges, tiny connecting protrusions, and hatches that smoothly transition into the main body). The above approach addresses this by introducing rule modules based on deterministic geometric knowledge to compensate for AI's shortcomings in such cases. General image segmentation models output pixel-level labels, which are difficult to automatically and error-free associate with the precise boundary representation (B-Rep) structure (faces, edges, vertices, and their topology) in CAD models. The above approach directly limits operations to the geometric and topological levels of the original CAD model, ensuring that any judgments and corrections are precisely applied to specific B-Rep surfaces, guaranteeing absolute geometric accuracy. By filling in gaps and correcting errors in the AI ​​recognition results, the final component segmentation results ensure that all geometric details affecting subsequent mesh generation and simulation analysis are covered, reducing the degradation of mesh quality or simulation accuracy caused by missing key small features. This approach eliminates reliance on a single AI model, creating a hybrid intelligence model that combines data-driven (AI) and knowledge-driven (rule-based) approaches. When faced with new aircraft models or those with unique geometries, even if the AI ​​model performs poorly initially, the method can still ensure the correct identification of basic and critical components through geometric rules, thus enhancing the method's generalization ability and practical stability.

[0280] Preferably, the multi-view 2D rendered image is generated as follows:

[0281] For each surface to be processed, multiple angles are used to wrap around it along its normal vector, and rendering is performed at each viewpoint to generate a series of two-dimensional view images.

[0282] Specifically, for each facet, multi-angle rendering is performed along its normal vector. This simulates the process of viewing a geometric facet from various directions, ensuring that the generated image fully reflects the facet's shape characteristics. This solves the problem of generating richly informative 2D image data from a single, planar aircraft CAD model facet, allowing the visual model to learn from it. It provides the visual model with multi-angle, comprehensive observation data, enhancing the model's robustness in recognizing component faces under different viewing angles and lighting conditions.

[0283] The preferred method for training the multimodal recognition model is as follows:

[0284] A neural network architecture is constructed, comprising a visual encoder, a language understanding module, and a cross-modal attention fusion module. First, the visual encoding module, based on Vision Transformer (ViT), is responsible for extracting features from the input image and outputting a visual token. Second, the language encoding module, based on a pre-trained large model, is responsible for encoding text prompts into text tokens. Finally, the cross-modal fusion module achieves bidirectional deep interaction between the visual and language tokens through a cross-attention mechanism. After multiple rounds of interaction, the features of the two modalities are aligned and fused in a unified semantic space to form a joint feature representation.

[0285] The neural network architecture is trained under supervision by using the multi-view two-dimensional rendered images and corresponding component semantic label texts in the training samples as input.

[0286] The multimodal recognition model is optimized using a combination loss function, which includes the classification cross-entropy loss function, the segmentation cross-union ratio loss function, and the boundary weighted loss function.

[0287] This paper presents a clear technical framework for fusing multimodal information through an architecture consisting of a visual encoder, a language module, and a cross-modal attention fusion module. Supervised learning is performed using a pre-constructed dataset, enabling the model to learn the mapping from images to semantic labels. A combined loss function is employed to simultaneously optimize classification accuracy, segmentation region consistency, and boundary precision, ensuring the quality of the model's output from multiple dimensions. The paper addresses the core technical path of model implementation by solving the problem of how to specifically construct and train a dedicated recognition model capable of understanding image-semantic associations. An optimized and trained intelligent model capable of accurately associating surface images with component semantic labels has been implemented.

[0288] Preferably, step S4 specifically involves identifying the main structural component surfaces in the aircraft CAD model; wherein, the main structural component refers to the component with independent function on the aircraft, such as the entire wing, the entire fuselage, and the tail fin, which will be referred to as large components for simplicity in the following description. Step S5 specifically involves semantic completion of the local feature surfaces, connecting area surfaces, or low-confidence recognition surfaces of the multimodal recognition model in the aircraft CAD model.

[0289] Steps S4 and S5 are defined as a hierarchical collaborative process: the first layer (AI) is responsible for large components (efficiently handling regularities); the second layer (rules) is responsible for local features, connecting surfaces, and other complex situations (accurately handling special characteristics). This design concept is an efficient way to solve engineering complexity problems. It realizes intelligent division of labor and collaboration in the recognition process, significantly improving the completeness of recognizing small and special features while ensuring the efficiency of large component recognition.

[0290] Preferably, the rules for determining the geometric topological relationships and parametric features of the aircraft CAD model include at least one of the following rules:

[0291] Rule 1: If a face is located at the geometric intersection of two identified large component faces, and the area of ​​the face is less than the area of ​​the adjacent large component face, then the component semantic label of the face is determined to be a connecting feature face or an edge face.

[0292] Rule 2: If a surface is directly adjacent to the main wing, and the angle between its normal vector and the normal vector of the main wing's reference plane is greater than or equal to 45°, and this surface is located on the outermost side of the wing span, with an area between 0.5% and 5% of the main wing's area, then it is classified as a winglet or wingtip. The area proportion rule can identify small surfaces at boundaries (such as edges). The direction relationship rule can identify small surfaces that are not parallel to the main airflow direction (such as doors). This provides quantifiable and verifiable rule examples, enabling the system to automatically identify specific types of geometric features such as the wing trailing edge and doors.

[0293] Preferably, the extraction of key geometric feature lines corresponding to each component includes:

[0294] For the components identified by the multimodal recognition model, by analyzing the curvature distribution and boundary topology of its constituent surfaces, a geometric algorithm is used to extract the key geometric feature lines of the components, including its boundary lines and feature contour lines.

[0295] For the feature surfaces identified by the geometric rule assistance module, the corresponding key geometric feature lines are extracted based on their geometric definitions and their relationship with adjacent surfaces.

[0296] For large components identified by AI, geometric algorithms such as curvature and topology analysis are used to automatically extract their boundaries and contours. For small features identified by rules, they are extracted directly based on their geometric definitions (such as the intersection of two faces). Both methods ensure that the output feature lines are accurately associated with the semantic labels of the components. This achieves automated connection from semantic segmentation to geometric feature extraction, outputting geometric data that is directly relied upon for operations such as mesh encryption and block division.

[0297] Preferably, in step S5, before or after forming the final component segmentation result, a post-processing step is also included:

[0298] The semantic labels of components are smoothed based on the adjacency relationship of surfaces to integrate the recognition results of the multimodal recognition model with the supplementary results of the geometric rule auxiliary module, thereby eliminating misjudgments of isolated surfaces; and the final component segmentation results are visualized and exported.

[0299] The label smoothing process is based on the adjacency relationship of faces, performing consistency checks and adjustments on the labels of adjacent faces to eliminate unreasonable abrupt changes or isolated points. The AI ​​results are fused with rule-based results, and visualization and export are supported, forming a complete closed loop from processing to delivery. Post-processing improves the topological consistency and visual smoothness of the segmentation results, and visualization and export functions make the results easy for engineers to verify and use.

[0300] The input to the multimodal recognition model includes natural language instructions; the method allows users to specify the type of part to be recognized or the segmentation requirements by inputting natural language instructions; the visual encoder adopts a Transformer-based architecture, the language understanding module adopts a pre-trained large language model, and the cross-modal attention fusion module adopts a cross-attention mechanism.

[0301] The model's input can include natural language commands, which are then translated into internal tasks that drive the model and geometry engine, achieving intelligent conversion from natural language to concrete operations. This enhances the system's usability and flexibility, allowing users to drive the system to perform specific tasks using natural language (such as segmenting all wing surfaces). The key modules in the architecture are concretized into corresponding selections, ensuring the feasibility of the solution: a visual encoder (ViT or other Transformer architectures), a language understanding module (QwenLM or other large models), and a fusion module (CrossAttn), ensuring the powerful capabilities of each module.

[0302] Preferably, in step S7, the structured engineering semantic format includes: a set of component geometric groups for the mesh generation software to recognize and call, a set of feature lines describing the key geometric features of the components, and optional mesh generation strategy parameters associated with preset components. By explicitly defining the output format as the structured engineering semantic format required by industrial software, including the component group set, feature line set, and mesh strategy parameters, the output of this method is no longer merely a display result, but rather instructions or data that can be directly read and applied by CAE software, thus achieving a closed loop of engineering value.

[0303] One or more technical solutions provided in Embodiment 2 of the present invention have at least the following technical effects or advantages:

[0304] (1) Full automation of component identification has been achieved, greatly improving the efficiency of mesh preprocessing;

[0305] Because this invention employs a visual-geometric-linguistic three-modal fusion recognition and hierarchical collaborative processing mechanism, it can automatically and accurately complete the identification and semantic segmentation of various aircraft components. The effect is that it shortens the process of identifying medium-sized passenger aircraft components, which originally relied entirely on manual identification and grouping by engineers and took 1-2 weeks, to automated processing, thus solving the primary efficiency bottleneck in the mesh generation process.

[0306] (2) Outputs engineering semantics and geometric features that can directly drive mesh generation;

[0307] Because the output of this invention is not a general image segmentation mask, but rather a face-part label mapping table and key geometric feature lines that are precisely associated with the original B-Rep model, the effect is that the recognition results can be directly converted into components, sets, or layers that mesh generation software can recognize, and key feature lines (such as wing leading / trailing edge lines) used for mesh partitioning and densification control are automatically extracted, achieving recognition-ready functionality and eliminating the large amount of manual conversion and interpretation work required in traditional methods.

[0308] (3) Improved the completeness of identification and engineering practicality of small-sized and weak-featured parts;

[0309] Because this invention employs a layered strategy of AI recognition for large components combined with geometric completion for small features, it intelligently completes small or inconspicuous components such as wing trailing edges and access hatches using geometric rules. The effect is a significant improvement in the overall segmentation integrity, ensuring that subsequent mesh generation covers all necessary geometric details and making the generated mesh more consistent with the geometric integrity requirements of high-fidelity simulation.

[0310] (4) Improve grid quality by supporting smart grid strategy presets through semantic understanding;

[0311] Because the model training of this invention incorporates knowledge of mesh engineering, it possesses engineering semantic understanding capabilities. The effect is that the system can automatically recommend or apply preset mesh generation strategies based on component semantics (such as the leading edge of an airfoil), thereby generating higher-quality meshes more suitable for computation in key aerodynamic regions.

[0312] (5) Possesses strong domain generalization ability and knowledge accumulation value;

[0313] Because the core framework of this invention is not dependent on any specific aircraft model and supports incremental learning, the benefits are significant: only a small amount of data from new aircraft models needs to be labeled and fine-tuned to quickly adapt to new aircraft models, greatly reducing technical maintenance and expansion costs. Simultaneously, the system can distill the mesh generation experience of senior engineers into reusable models and rules, forming core knowledge assets.

[0314] Please refer to Figure 7 , Figure 7This invention provides a method for intelligent component recognition and segmentation of aircraft CAD models based on three-modal fusion, comprising:

[0315] Step S1 - Model Acquisition and Format Confirmation: Acquire the CAD model of the aircraft to be processed, wherein the CAD model of the aircraft has a boundary representation structure;

[0316] Step S2 - Construction of a multimodal dataset oriented towards engineering semantics: Based on the engineering requirements of mesh partitioning, engineering semantic annotation is performed on the faces in the boundary representation structure of the aircraft CAD model to obtain component semantic labels; geometric parameters of each face are extracted from the boundary representation structure; for each labeled face, a multi-view 2D rendering image is generated; the multi-view 2D rendering image, the geometric parameters, and the component semantic labels are associated and stored to form training samples;

[0317] Step S3 - Multimodal Fusion Recognition Model Training: The multimodal recognition model is trained using the training samples. The multimodal recognition model is configured to fuse input image features and language semantic information to output semantic labels for components on the surface of the aircraft CAD model.

[0318] Step S4 - Initial identification of macroscopic components based on AI: Input the CAD model of the aircraft to be identified into the trained multimodal recognition model, identify the surfaces in the aircraft CAD model, and obtain the preliminary surface-component semantic label mapping relationship;

[0319] Step S5 - Collaborative completion of small features based on geometric rules: Based on the preliminary face-part semantic label mapping relationship, for faces whose recognition confidence output by the multimodal recognition model is lower than a preset threshold or whose geometric area ratio is less than a set threshold, the geometric rule auxiliary module is activated to perform semantic completion to obtain the final part segmentation result.

[0320] Step S6 - Automatic extraction of key geometric feature lines: Based on the final component segmentation results, extract the key geometric feature lines corresponding to each component from the boundary representation structure of the aircraft CAD model;

[0321] Step S7 - Structured Engineering Semantic Output: The final component segmentation results and extracted key geometric feature lines are converted into a structured engineering semantic format for the target mesh generation software to read and utilize, and then output.

[0322] This invention provides a fully automated and high-precision component identification and geometric feature extraction capability for mesh generation in computational fluid dynamics and finite element analysis, and is applicable to the digital simulation and manufacturing of complex equipment such as aviation, aerospace, and ships.

[0323] This invention provides a method for intelligent recognition, semantic segmentation, and geometric feature extraction of aircraft components based on a three-modal fusion of vision, geometry, and language. This invention addresses the inefficiencies, inconsistencies, and automation breakpoints caused by reliance on manual component recognition in the aircraft mesh generation process. Specifically, it includes:

[0324] (1) Eliminate the manual dependence in the component identification process and realize the automatic and accurate identification and semantic grouping of each component in the aircraft CAD model;

[0325] (2) Provide engineering semantic output that can be directly used for mesh generation, including component face sets and key feature lines (such as boundary lines and densification lines).

[0326] (3) Supports preset differentiated grid strategies for different components, enabling intelligent grid planning that is configured upon identification;

[0327] (4) Improve the automation level and processing efficiency of the entire mesh generation process, and provide reliable pre-processing tools for digital simulation.

[0328] This invention provides a joint modeling and processing method for a visual-geometric-linguistic three-modal approach. Its overall architecture comprises four parts: data construction, model training, inference and recognition, geometric processing, and mesh strategy generation. The specific steps are as follows:

[0329] (1) Data Construction: A Semantic Annotation System Oriented to Grid Requirements

[0330] 1) B-Rep Surface-Level Semantic Annotation: Using mesh generation software such as NNW-GridStar, and combining experience in aerodynamic and structural mesh generation, surface-level annotations are performed on aircraft CAD models represented in B-Rep format. This includes, but is not limited to: nose, forward fuselage, mid-fuselage, aft fuselage, upper wing surface, lower wing surface, vertical tail, horizontal tail, engine nacelle, etc. After annotation, each component is visualized in a different color for easy verification.

[0331] 2) Multi-view image generation: For each B-Rep face, perform 360-degree multi-view rendering around its normal vector to generate a series of main view images. Scaling, rotation, and lighting adjustments are supported to enhance view coverage and lighting robustness.

[0332] 3) Dataset Augmentation and Construction: Data diversity is enhanced using geometric transformations (rotation, translation, scaling), color perturbation, and noise injection. A structured multimodal dataset is constructed, with each data point including: B-Rep facet ID, multi-view image set, semantic labels, and original geometric parameters.

[0333] (2) Model training:

[0334] 1) Model Architecture Design: ViT (Vision Transformer) is used as the visual encoder to extract image features. CrossAttn (a cross-attention mechanism) is used to align visual features with linguistic features (from QwenLM). QwenLM serves as the language understanding and generation module, responsible for semantic mapping and prompt response.

[0335] 2) Supervised fine-tuning strategy: The input is the main view image of the face, the corresponding semantic label, and the structured prompt words (such as the face belongs to [category]).

[0336] 3) The loss function adopts a ternary combination: semantic cross-entropy loss (optimizes classification accuracy) + IoU loss (improves the overlap of segmented regions) + boundary weighted loss (enhances the accuracy of boundary pixel recognition).

[0337] The loss function is:

[0338] ;

[0339] in, For semantic cross-entropy loss, For IoU loss, For boundary-weighted loss, the weighting coefficients are initially set. , , Adjustments can be made based on subsequent experiments.

[0340] Semantic cross-entropy loss:

[0341] ;

[0342] In the formula, N is the total number of pixels, i.e., the total number of faces in the B-Rep model, C is the number of semantic categories of the component, and y i,c Let p be the true label of the i-th pixel belonging to category c. i,c Let be the probability predicted by the model that the i-th pixel belongs to category c.

[0343] The IoU loss is calculated by averaging the IoU for each part category:

[0344] ;

[0345] Boundary loss ( The initial setting is 0.3 (which can be adjusted based on experiments), where L cls For boundary binary classification loss, L dist Loss for distance transformation:

[0346] ;

[0347] In the formula, This represents the true boundary label of the i-th pixel. This indicates that the pixel is located inside the component. This indicates that the pixel is located on the geometric boundary of two different components; This represents the probability that a pixel predicted by the model is a boundary. Based on the topological relationships of the B-Rep model, when two adjacent faces belong to different components, their shared edge is marked as a boundary.

[0348] Loss for distance transformation:

[0349] ;

[0350] In the formula, The total number of boundary pixels, This represents the distance from pixel i to the nearest real geometric boundary. This represents the distance from pixel i predicted by the model to the boundary. This forces the predicted boundary lines to be closer to the actual geometric boundaries, improving the geometric usability of the segmentation results in CAD models.

[0351] 4) The training employs progressive fine-tuning, first pre-training on large-scale general image-text data, and then fine-tuning on domain image-text pairs labeled with semantic tags for each component of the aircraft. This approach can utilize prior knowledge of general visual language while enabling the model to accurately grasp the fine-grained semantics of the aircraft's unique components, thus improving domain adaptability and recognition accuracy.

[0352] (3) Reasoning and recognition:

[0353] 1) Input: The CAD model of the aircraft to be processed (B-Rep) and natural language prompts (e.g., please identify all fuselage surfaces).

[0354] 2) Layered recognition processing flow:

[0355] The first layer is the overall component recognition: the model extracts visual features face by face, combines them with the semantics of prompt words to make inferences, and prioritizes the recognition of macroscopic large components, such as the entire wing, the entire fuselage, and the tail fin. It outputs the primary semantic label of each B-Rep face to form a face-component mapping table.

[0356] The second layer is small component / feature geometric completion: For small surfaces (such as surfaces belonging to the trailing edge of an wing or local protrusions) whose confidence level is lower than the set threshold or ignored by the model in the previous round of recognition, the geometric rule assistance module is activated instead of relying directly on the AI ​​model for secondary recognition.

[0357] Widgets / features mainly include the following types:

[0358] Connecting feature surfaces or edge surfaces: Surfaces located at the junction of two large components (such as the upper and lower surfaces of an wing), such as the trailing edge and leading edge of an wing.

[0359] Featured surfaces with opening, closing, or maintenance functions: surfaces surrounded by large components and whose orientation differs significantly from the main body, such as hatches and maintenance access covers.

[0360] Localized raised or recessed surfaces: such as rivet heads, sensor mounting bases, oil filler caps, and other small geometric features.

[0361] Low-confidence recognition surfaces: Surfaces that AI models cannot recognize with high confidence due to reasons such as blurred geometric features and insufficient training data coverage.

[0362] 3) Working principle of the geometric rule auxiliary module:

[0363] Input: The set of large components identified by AI (such as the upper surface of the left wing and the lower surface of the left wing) and all the B-Rep surfaces contained therein.

[0364] Processing: Based on the geometric topology and parametric information of the CAD model, preset geometric rules are executed. For example, Rule 1: If a surface belongs to the upper or lower surface of the wing, or is located at the boundary between the two, at the leading edge of the wing, has high curvature, and its spanwise length is close to the entire wing span, it is classified as the leading edge of the wing. Rule 2: If a surface is located at the boundary between the upper and lower surfaces of the wing, and its area is less than 1% of the overall wing area, it is classified as the trailing edge of the wing. Rule 3: If a surface is directly adjacent to the main wing but its normal is significantly deviated from the main wing plane, and it is located at the outermost point of the wing spanwise, with an area between 0.5% and 5% of the main wing area, it is classified as a winglet or wingtip. Rule 4: If a surface is surrounded by a large fuselage component, and its normal is approximately perpendicular to the main fuselage direction, and its area is small, it may be an access hatch or door, and further determination is made based on the geometric characteristics of its adjacent surfaces. Rule 5: If a surface belongs to a large component of the engine nacelle, is located at the foremost end of the nacelle, and has a closed annular boundary and a smooth Gaussian positive curvature transition, then it is classified as an air intake lip.

[0365] Output: Add annotations to the corresponding part categories for facets that conform to the geometric rules, or create new subcategory labels for them.

[0366] 4) Post-processing: Label smoothing is performed based on face adjacency relationships, integrating AI recognition results with geometric rule supplementary results to avoid misjudgment of isolated faces. Component-level result visualization and export are supported.

[0367] (4) Geometric treatment:

[0368] 1) Key Geometric Feature Line Extraction: Based on the complete identification of all components (including large components identified by AI and small features supplemented by geometric rules), boundary lines, curvature extrema lines, and feature contour lines of each component are extracted using B-Rep topology and geometric information. For large components identified by AI, geometric algorithms (such as curvature-based edge detection and topological connectivity analysis) are used for automated extraction. For small features identified by the geometric rule-assisted module, feature lines are extracted directly using their geometric definitions (such as the trailing edge line, i.e., the intersection of the upper and lower wing surfaces), resulting in higher accuracy.

[0369] 2) Output Interface: Feature lines are output in a format supported by NNW-GridStar. Seamless integration with simulation workflows is supported, improving CAE analysis efficiency.

[0370] The visual encoder (ViT) can be replaced by other mainstream networks (such as ConvNeXt, ResNet), and this embodiment of the invention does not impose any restrictions on it. The language model (QwenLM) can be replaced by other large language models (such as GLM, LLaMA), and this embodiment of the invention does not impose any restrictions on it. The specific judgment conditions and parameters of the geometric rules can be adjusted according to the characteristics of different components. The output interface can be adapted to different target mesh generation software (such as ANSA, HyperMesh).

[0371] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0372] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for automatic polygon quadrilateral mesh subdivision based on deep reinforcement learning, characterized in that, The method is used to automatically mesh a quadrilateral mesh of an aircraft CAD model to generate a mesh for finite element analysis. The method includes a training phase and an application phase. The training phase includes the following steps: Step 1: Construct a reinforcement learning environment, initialize the main Q-network and the target Q-network; generate a training dataset containing polygonal geometric sequences with a variable number of vertices, and construct a predefined set of subdivision template actions; Step 2: Sample an initial polygon from the training dataset, load the initial polygon into the reinforcement learning environment to initialize its global sub-region set, select a polygon to be processed from the global sub-region set of the reinforcement learning environment according to the preset vertex scheduling strategy, and normalize the variable-length vertex coordinate sequence of the polygon to be processed into a fixed-dimensional state vector through zero-padding and mask marking. Step 3: Input the fixed-dimensional state vector into the main Q network, and select the current action to be executed from the predefined set of partitioning template actions based on the ε-greedy strategy; Step 4: Feedback the currently executed action to the reinforcement learning environment, which then applies the action to geometrically segment the polygon to be processed, generating several sub-polygons. Quadrilateral sub-regions among the sub-polygons are identified as newly generated quadrilaterals. The sub-polygons are added to the global sub-region set. The polygon to be processed is removed from the global sub-region set to update the global sub-region set. The next polygon to be processed is selected from the updated global sub-region set according to a preset vertex scheduling strategy to form the state vector at the next time step. Step 5: Based on the geometric quality, subdivision progress, task completion status, number of execution steps, and legality of the newly generated quadrilateral identified in Step 4, calculate the immediate reward signal; Step 6: Combine the current state vector, the current action being executed, the immediate reward signal, the next state vector, and the iteration end label into an experience tuple and store it in the experience replay buffer; Step 7: When the batch training condition is met, randomly sample empirical tuples from the empirical replay buffer; Step 8: Calculate the maximum Q value of the next time step state vector in the empirical tuple using the target Q network, and construct the target Q value by combining it with the instantaneous reward signal; Step 9: Calculate the predicted Q-value of the current state vector in the empirical tuple under the current action using the main Q-network; Step 10: Calculate the loss function value between the target Q value and the predicted Q value; Step 11: Update the parameters of the main Q-network using the backpropagation algorithm based on the loss function value; Step 12: Copy the parameters of the main Q network to the target Q network according to the preset period, and repeat steps 2 to 12 until the training termination condition is met, and save the parameters of the main Q network after training is completed. The application phase includes the following steps: Step A1: Load the trained main Q-network and construct a reinforcement learning environment for inference; Step A2: Obtain the initial polygon to be subdivided, load it into the reinforcement learning environment for inference to initialize the global sub-region set, select the first polygon to be processed according to the preset vertex scheduling strategy, and normalize its variable-length vertex coordinate sequence into a fixed-dimensional initial state vector through zero-padding and mask marking. Step A3: Input the initial state vector into the trained main Q network, and select the action with the largest Q value as the current action to be executed; Step A4: Perform the current execution action to geometrically segment the polygon to be processed, generate several sub-polygons and update the global sub-region set; select the next polygon to be processed from the updated global sub-region set according to the preset vertex scheduling strategy, and normalize its variable-length vertex coordinate sequence into a fixed-dimensional state vector at the next time step through zero-filling and mask marking; Step A5: Repeat steps A3 to A4 until all sub-polygons in the global sub-region set have 4 vertices, and output the final mesh result; The polygon data in the training dataset is generated in the following way: The system acquires the CAD model of the aircraft to be processed and constructs a multimodal feature representation, identifies independent functional components and segmentation boundaries, and outputs structured engineering data containing key geometric feature lines. The system analyzes the key geometric feature lines, reconstructs closed contour curves based on the segmentation boundaries, and discretizes them into vertex sequences to generate polygon data.

2. The method for automatic polygon quadrilateral mesh subdivision based on deep reinforcement learning according to claim 1, characterized in that, The preset vertex scheduling strategy is as follows: Traverse the global sub-region set and filter out polygons with more than 4 vertices to form a candidate set; If the candidate set is not empty, then the polygons are sorted in descending order of the number of vertices, and the polygon with the most vertices is selected as the next polygon to be processed; if the number of vertices is the same, then the polygon with the lowest geometric quality is selected; if the candidate set is empty, then the polygon with 4 vertices and the lowest geometric quality is selected as the next polygon to be processed for optimization and adjustment, or the subdivision is determined to be complete.

3. The method for automatic polygon quadrilateral mesh subdivision based on deep reinforcement learning according to claim 1, characterized in that, The specific method for standardizing into a fixed-dimensional state vector is as follows: Set the preset maximum vertex count threshold N max ; Get the actual number of vertices n of the polygon currently being processed; The construction dimension is (N) max The coordinate matrix of n,2): If n <N max Then, fill the first n rows of the matrix with the two-dimensional coordinates of the n vertices, leaving N vertices. max Subtract n rows and fill with zero vectors; if n≥N max Then calculate the parameters of the intermediate vertices of the polygon to be processed. point, Take any vertex of the polygon to be processed as the starting point, and starting from the starting point, based on the parameters of the intermediate vertices... The middle vertex of the polygon to be processed is determined clockwise. The starting point and the middle vertex are connected to divide the polygon into two sub-polygons. The transformation from mesh to vector is performed based on the sub-polygons. The construction dimension is N max Binary mask vector: if n <N max The first n elements of the vector are marked as the first value to represent valid vertices, and the remaining N elements are... max Subtract n elements and label them as the second value to represent the fill data; if n=N max If , then all elements of the vector are marked as the first value.

4. The method for automatic polygon quadrilateral mesh subdivision based on deep reinforcement learning according to claim 1, characterized in that, The execution logic of the ε-greedy strategy is as follows: Generate a random number r∈[0,1]. If r<ε, then randomly select an action from the subset of legal actions corresponding to the current polygon. If r≥ε, then select the action with the largest Q value output by the main Q network; Among them, the exploration rate ε decreases as the number of training steps increases according to a preset decay function.

5. The method for automatic polygon quadrilateral mesh subdivision based on deep reinforcement learning according to claim 1, characterized in that, Instant reward signal The calculation method is as follows: ; in, For quality awards, As a progress reward, To complete the reward, Punishment for inefficiency Punishment for mistakes.

6. The method for automatic polygon quadrilateral mesh subdivision based on deep reinforcement learning according to claim 5, characterized in that, Quality Award The calculation method is as follows: The number of newly generated quadrilaterals identified in step 4. ; like Then set ; like ,but ; in, ; in, For orthogonality, For smoothness score, The aspect ratio is scored. Scoring is based on convexity.

7. The method for automatic polygon quadrilateral mesh subdivision based on deep reinforcement learning according to claim 5, characterized in that, Progress Rewards The calculation method is as follows: ; in, Increase the reward for the number of quadrilaterals. Reduce rewards to reduce complexity.

8. The method for automatic polygon quadrilateral mesh subdivision based on deep reinforcement learning according to claim 5, characterized in that, Completion Reward The triggering conditions and calculation methods are as follows: Check whether all sub-polygons in the global sub-region set have 4 vertices; If so, then ;in, Rewards for efficiency The sum of quality scores for all quadrilateral grids; If not, then set .

9. The automatic polygon quadrilateral mesh subdivision method based on deep reinforcement learning according to claim 5, characterized in that, efficiency penalty The calculation method is as follows: like ≤10, then ; like >10, then ; in, Execute the number of steps for the current topology fill action; Error Penalty The calculation method is as follows: ;in, Penalty for abnormal number of sub-regions. Penalty for invalid actions.