Structural optimization method based on mechanical embedded heterogeneous graph neural network
By using a structural optimization method based on mechanically embedded heterogeneous graph neural networks, the problems of low computational efficiency, insufficient accuracy, and two-dimensional limitations in existing technologies are solved, and a highly efficient, accurate, and physically reliable solution for three-dimensional structural optimization is achieved.
Patent Information
- Application Number
- CN202511504401.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-10-21
AI Technical Summary
Existing technologies struggle to balance computational efficiency, accuracy, and physical reliability in structural optimization, and cannot overcome the limitations of two-dimensionality.
A structural optimization method based on mechanical embedding heterogeneous graph neural networks is adopted. By pre-training the heterogeneous graph neural network, the load conditions are converted into graph structural features. Combined with mechanical loss function and transfer learning, efficient optimization of engineering structures is achieved.
It significantly improves computational efficiency, enhances prediction accuracy, and enables efficient and accurate structural optimization in 3D scenes, meeting mechanical performance requirements.
Smart Images

Figure CN120974952A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of structural optimization technology, and in particular to a structural optimization method based on mechanically embedded heterogeneous graph neural networks. Background Technology
[0002] Traditional structural optimization methods, such as the variable density method and the level set method, rely on finite element analysis to iteratively solve partial differential equations, resulting in low computational efficiency. In three-dimensional scenes, the problem of dimensional explosion is prominent, and it is easy to get trapped in local optima.
[0003] Deep learning technologies, such as CNN and GAN, can generate topological information of structures end-to-end to improve speed, but they have drawbacks such as strong data dependence, weak generalization ability, lack of physical rationality, and are limited to two-dimensional scenarios.
[0004] While graph neural networks are suitable for non-Euclidean data and unstructured grids, they still rely on massive amounts of training data. Training costs increase dramatically as grid size grows, and the lack of explicit embedding of fundamental theorems in solid mechanics leads to insufficient physical reliability in predictions. Furthermore, neural network reparameterization methods are still based on image inversion of Euclidean data, making them difficult to handle complex geometries and primarily applicable to two-dimensional structure optimization.
[0005] Chinese invention patent application CN113204907A discloses a three-dimensional structure topology optimization design method based on Mobile-U-Net for variable design domains. This invention proposes a method for three-dimensional structure optimization, but it still cannot solve problems such as low computational efficiency.
[0006] In summary, there is an urgent need for an optimization method that balances computational efficiency, accuracy, and physical reliability while overcoming the limitations of two-dimensionality. Summary of the Invention
[0007] The main objective of this invention is to provide a structural optimization method based on mechanically embedded heterogeneous graph neural networks, which aims to solve the technical problems in the prior art that it is difficult to balance computational efficiency, accuracy and physical reliability, and that it has failed to overcome the two-dimensional limitation.
[0008] To achieve the above objectives, this invention provides a structural optimization method based on mechanically embedded heterogeneous graph neural networks, applied to the optimization of engineering structures, including: The heterogeneous graph neural network is pre-trained to convert the load conditions of the input engineering structure into graph structure features, and to obtain a first prediction value for the engineering structure based on the graph structure features. Transfer learning is performed on the pre-trained heterogeneous graph neural network to obtain a pre-trained model; A preset mechanical loss function is embedded in the pre-trained model to obtain a mechanical embedding heterogeneous graph neural network; wherein, the mechanical loss function is used to optimize the first predicted value to output a second predicted value for the engineering structure; The real-time load conditions of the engineering structure are input into the mechanical embedded heterogeneous graph neural network, and the second predicted value is output. The second predicted value is the result of structural optimization.
[0009] Preferably, the trained heterogeneous graph neural network converts the input load conditions into graph structure features, and obtains a first predicted value for the engineering structure based on the graph structure features, specifically: The physical features corresponding to the nodes and elements of the mesh are processed separately by a dual-branch encoder, and the stress distribution across nodes is aggregated to enhance the feature representation of the elements, thereby obtaining the graph structure features; wherein, the physical features corresponding to the nodes include at least displacement and coordinates, and the physical features corresponding to the elements include at least stress, strain and node statistics; Based on the interaction of the heterogeneous message passing layer, the graph structure features are transmitted to capture the multi-scale mechanical behavior of the engineering structure. The strain energy distribution of the unit is predicted based on physical perception as a regularization constraint, and the high stress-sensitive region is located by combining the attention mechanism. The decoder outputs the first predicted value.
[0010] Preferably, the dual-branch encoder processes the physical features corresponding to the nodes and elements of the mesh separately, and aggregates stress distribution across nodes to enhance the feature representation of the elements, thereby obtaining the graph structure features, including: The physical characteristics corresponding to the processed node are defined as node features, and the node features are: The node features include their corresponding spatial coordinates. and displacement field , express It is a four-dimensional vector; The physical characteristics corresponding to the processed unit are defined as the unit characteristics, wherein the unit characteristics are: The unit feature storage unit-level stress-strain data includes data represented as follows: Mise stress, expressed as The response, express It is a two-dimensional vector; The graph structure features include the node features and the cell features.
[0011] Preferably, the node statistics are: in, For the first Average stress statistics at each node In order to be with the first The set of neighboring nodes of a given node that have a first-type adjacency relationship. For the set of neighbor nodes The number of nodes in For the set of neighbor nodes The Middle The stress value at each node.
[0012] Preferably, the graph structure features are transmitted interactively based on the heterogeneous message passing layer, specifically as follows: Four types of heterogeneous edge relationships are defined for modeling multi-granularity physical interactions; wherein, the four types of heterogeneous edge relationships include: The bidirectional membership mapping shape function interpolation theory uses positive edges to transfer displacement gradients from the node to the element to calculate element strain, and negative edges to perform stress smoothing recovery of the node from the element to the node. The adjacency relationship encoding discrete equilibrium constraints includes: the unit adjacency edges between the units sensing local stress compatibility and boundary abrupt change phenomena; and the node adjacency edges between the nodes strengthening the displacement compatibility conditions of spatially adjacent nodes.
[0013] Preferably, embedding a preset mechanical loss function into the pre-trained model to obtain a mechanically embedded heterogeneous graph neural network specifically involves: The pre-trained model is initialized as a predictor, and the first predicted value is obtained through the pre-trained model. The mechanical loss function is used as the loss function in the pre-trained model, and the first predicted value is constrained based on the mechanical loss function to obtain the second predicted value.
[0014] Preferably, when constraining the first predicted value based on the mechanical loss function, the first predicted value is further optimized by a differentiable correction function, including density filtering and projection operations. The density filtering is based on a preset filtering matrix, which replaces the density of each cell with the weighted average of its neighboring cells to force a smooth density distribution. The projection operation is based on the improved Heaviside projection method.
[0015] Preferably, using the mechanical loss function as the loss function in the pre-trained model specifically means: The volume constraint term is incorporated into the mechanical loss function, and the penalty is dynamically increased when the volume deviates from the target value, guiding the optimization back to the feasible region; wherein, the loss function incorporated into the volume constraint term is: in: This represents the overall loss function value; The compliance term consists of optimization objectives other than volume constraints. These are the weighting coefficients for the volume constraint term, used to adjust the strength of the influence of the volume constraint on the optimization process; The actual volume of the structure is calculated based on fuzzy density during the current structural optimization process; The pre-defined target volume for the structure.
[0016] Preferably, the mechanical loss function is further configured with adaptive optimization of the weight coefficients, specifically as follows: The weight coefficients in the loss function written into the volume constraint term are changed to adaptive values, and the optimized loss function is: and in: For the first The weighting coefficient of the volume constraint term in each iteration is used to dynamically adjust the influence of the volume constraint on the optimization. This is the volume deviation. ; For the first The updated weight coefficients in the next iteration; This is an adjustment factor for the weighting coefficients, used to adaptively adjust the weighting magnitude when the volume deviation exceeds the threshold; A preset threshold for volume deviation is used to determine whether the weighting coefficient needs to be adjusted. When the absolute value of the volume deviation... Weight updates are triggered when the value exceeds this threshold.
[0017] Preferably, the density value of the engineering structure is characterized based on the first predicted value and the second predicted value.
[0018] Beneficial effects: The structural optimization method based on mechanical embedding heterogeneous graph neural networks proposed in this application solves the technical problems in the prior art that it is difficult to balance computational efficiency, accuracy and physical reliability, and that it has failed to break through the two-dimensional limitation. By combining pre-trained models with neural network reparameterization, it achieves a balance between computational efficiency and accuracy. Compared with traditional graph neural networks, the pre-trained model of this heterogeneous graph neural network has a significantly shorter training time and improved prediction accuracy. The mechanical constraints and adaptive weight coefficients in the improved loss function make the iteration process more robust. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating the structural optimization method based on mechanically embedded heterogeneous graph neural networks provided in an embodiment of the present invention; Figure 2 This is an example diagram illustrating the construction of heterogeneous graph data based on finite element mesh generation, provided in an embodiment of the present invention. Figure 3 The following are the changes in the total loss, objective function loss, volume constraint loss, and penalty coefficient of the structural optimization method based on mechanically embedded heterogeneous graph neural network provided in the embodiments of the present invention; wherein, (a) is the change in the total loss corresponding to the number of iterations, (b) is the change in the objective function loss corresponding to the number of iterations, (c) is the change in the volume constraint loss corresponding to the number of iterations, and (d) is the change in the penalty coefficient corresponding to the number of iterations. Figure 4 Comparison of predicted and true values obtained by the structural optimization method based on mechanical embedding heterogeneous graph neural networks provided in this embodiment of the invention. Figure 1 Wherein, (a) is the true value of the optimization, (b) is the optimization obtained based on the traditional graph neural network (GNN), and (c) is the optimization obtained based on the structural optimization method of mechanically embedded heterogeneous graph neural network in this embodiment. Figure 5 Comparison of predicted and true values obtained by the structural optimization method based on mechanical embedding heterogeneous graph neural networks provided in this embodiment of the invention. Figure 2 Wherein, (a) is the true value of the optimization, (b) is the optimization obtained based on the traditional graph neural network (GNN), and (c) is the optimization obtained based on the structural optimization method of mechanically embedded heterogeneous graph neural network in this embodiment. Figure 6Comparison of predicted and true values obtained by the structural optimization method based on mechanical embedding heterogeneous graph neural networks provided in this embodiment of the invention. Figure 3 Wherein, (a) is the true value of the optimization, (b) is the optimization obtained based on the traditional graph neural network (GNN), and (c) is the optimization obtained based on the structural optimization method of mechanically embedded heterogeneous graph neural network in this embodiment. Figure 7 Comparison of predicted and true values obtained by the structural optimization method based on mechanical embedding heterogeneous graph neural networks provided in this embodiment of the invention. Figure 4 Wherein, (a) is the true value of the optimization, (b) is the optimization obtained based on the traditional graph neural network (GNN), and (c) is the optimization obtained based on the structural optimization method of mechanically embedded heterogeneous graph neural network in this embodiment. Figure 8 Comparison of predicted and true values obtained by the structural optimization method based on mechanical embedding heterogeneous graph neural networks provided in this embodiment of the invention. Figure 5 Wherein, (a) is the true value of the optimization, (b) is the optimization obtained based on the traditional graph neural network (GNN), and (c) is the optimization obtained based on the structural optimization method of mechanically embedded heterogeneous graph neural network in this embodiment.
[0021] The implementation, functional features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0023] Existing optimization methods for engineering structures have significant bottlenecks when dealing with complex engineering problems. These bottlenecks are manifested in the low computational efficiency caused by relying on high-frequency finite element iterations, and the prominent problem of dimensional explosion in solving three-dimensional scenes.
[0024] To address this technical bottleneck, this embodiment proposes a structural optimization method based on a mechanically embedded heterogeneous graph neural network. This method draws on the idea of reparameterization of neural networks and the powerful representational capabilities of graph neural networks. Based on the theory of non-Euclidean space data representation, a mechanically embedded heterogeneous graph neural network is constructed. The trained mechanically embedded heterogeneous graph neural network can quickly obtain the optimized results of the structure from the initial conditions through a small number of iterations, balancing the issues of computational efficiency and computational accuracy. Moreover, it can break through the two-dimensional problem and achieve the solution of three-dimensional problems.
[0025] It should be noted that the core objective of the structural optimization in this embodiment is to calculate, within a given design space, for example, a cubic region, which areas of the material should be retained and which areas should be removed using mathematical methods that satisfy natural laws, so that the final structure can not only meet mechanical performance requirements such as load-bearing capacity and deformation resistance, but also achieve specific optimization objectives such as lightest weight and greatest stiffness.
[0026] Reference Figure 1 As shown, this embodiment discloses a structural optimization method based on mechanically embedded heterogeneous graph neural networks, applied to the optimization of engineering structures, including the following steps: S1: Pre-train the heterogeneous graph neural network. The pre-training is used to train the heterogeneous graph neural network to convert the load conditions of the input engineering structure into graph structure features, and obtain the first prediction value for the engineering structure based on the graph structure features. S2: Perform transfer learning on the pre-trained heterogeneous graph neural network to obtain a pre-trained model; S3: Embed a preset mechanical loss function into the pre-trained model to obtain a mechanical embedding heterogeneous graph neural network; wherein, the mechanical loss function is used to optimize the first predicted value to output a second predicted value for the engineering structure; S4: Input the real-time load condition of the engineering structure into the mechanics-embedded heterogeneous graph neural network, and output the second predicted value, which is the result of structural optimization.
[0027] In this design project, the pre-training process of the heterogeneous graph neural network is defined as the data-driven channel, and the process of embedding the mechanical loss function into the pre-trained model is defined as the mechanical embedding channel. By constructing a mechanical embedding heterogeneous graph neural network that includes both the data-driven and mechanical embedding channels, a deep integration of data-driven and physical mechanisms is achieved. The data-driven channel can efficiently handle various load conditions, extracting multi-scale features of the structure through the heterogeneous graph neural network and quickly outputting the first predicted value reflecting the load response. The mechanical embedding channel, based on the mechanical loss function, imposes constraints in the physical mechanics dimension to optimize the density distribution, ensuring that the output second predicted value simultaneously meets the mechanical performance requirements of the structure. The combination of these two approaches leverages the adaptability of the data-driven method to complex load patterns while strengthening the physical compliance of the optimization results through mechanical embedding, avoiding the low computational efficiency or inaccurate mechanical constraints caused by traditional methods relying on a single driving mode. The mechanically embedded heterogeneous graph neural network constructed by this dual-channel architecture significantly improves the computational efficiency under complex working conditions while ensuring optimization accuracy. It provides an innovative solution for the efficient optimization of engineering structures under multi-load scenarios, and is especially suitable for structural design scenarios that require both data-driven efficiency and strict mechanical constraints. Heterogeneous graph neural networks (HNNs) are extended models designed for heterogeneous graphs containing multiple node and edge types. Unlike ordinary graph neural networks (PNNs), HNNs need to distinguish the feature aggregation methods of different types of nodes or edges. They often model heterogeneous relationships through meta-path or relation-aware convolutions, making them suitable for scenarios that require handling multimodal relationships, such as recommendation systems, knowledge graphs, and biomedical networks, significantly improving the ability to represent complex heterogeneous information. This embodiment uses the predicted structure optimization results of the HNN and combines physical mechanisms to train a deep learning network. The trained mechanically embedded HNN can achieve high-precision, high-resolution optimization results with a small number of iterations.
[0028] It should be noted that in this embodiment, existing professional numerical simulation software, such as Abaqus, or classical optimization algorithms, such as Top88, are used to optimize the structure. Through mesh generation, material property settings, boundary condition settings, and the setting of required control parameters, the obtained real-time load cases include optimization results with different types and boundary conditions.
[0029] Specifically, training a heterogeneous graph neural network converts the input load conditions into graph structure features, and obtains the first predicted value for the engineering structure based on these graph structure features. The physical features corresponding to the nodes and elements of the mesh are processed separately by a dual-branch encoder, and the stress distribution across nodes is aggregated to enhance the feature representation of the elements, thus obtaining graph structure features; wherein, the physical features corresponding to the nodes include at least displacement and coordinates, and the physical features corresponding to the elements include at least stress, strain and nodal statistics. Based on the structural features of the interaction transmission graph of the heterogeneous message passing layer, the multi-scale mechanical behavior of engineering structures is captured. The strain energy distribution based on the physical sensing prediction unit is used as a regular constraint, and the high stress sensitive region is located by combining the attention mechanism. The decoder outputs the first predicted value.
[0030] Specifically, based on a dual-branch encoder, the physical features corresponding to the nodes and elements of the mesh are processed separately, and stress distributions are aggregated across nodes to enhance the feature representation of the elements, resulting in graph structure features, including: The physical characteristics corresponding to the processed nodes are defined as node features, and the node features are as follows: The node features include their corresponding spatial coordinates. and displacement field , express It is a four-dimensional vector; The physical characteristics corresponding to the processed unit are defined as unit characteristics. Unit characteristics: Among them, the unit feature stores unit-level stress and strain data, including those represented as Mise stress, expressed as The response, express It is a two-dimensional vector; Graph structural features include node features and cell features.
[0031] It should be noted that for linear triangular elements, the shape function is in linear form, expressed as: in: It is the shape function vector of the linear triangular element, used to interpolate physical quantities at any position inside the element through physical quantities at the element nodes, such as displacement and stress. This is the first local coordinate parameter of the linear triangular element, used to locate the position of the point in the element's local coordinate system; The second local coordinate parameter of the linear triangular element, and Together, determine the local location of points within the unit; The vector components are the shape functions corresponding to the three nodes of the linear triangular element. Through this set of shape functions, the physical quantities at the nodes can be linearly interpolated to obtain the physical quantities at any point within the element, such as the displacement field and stress field.
[0032] Under linear triangular elements of linear form, the strain-displacement matrix The matrix is constant, resulting in constant stress within the element, expressed as: in, This is the material constitutive matrix. Based on the above description, storing stress as element-level data, rather than nodal interpolation, is more consistent with physical reality.
[0033] Specifically, the node statistics are as follows: in, For the first Average stress statistics at each node In order to be with the first The set of neighboring nodes of a given node that have a first-type adjacency relationship. For the set of neighboring nodes The number of nodes in For the set of neighboring nodes The Middle The stress value at each node.
[0034] Specifically, based on the structural characteristics of the heterogeneous message passing layer interaction graph, it is as follows: Four types of heterogeneous edge relationships are defined for modeling multi-granularity physical interactions; these four types of heterogeneous edge relationships include: The bidirectional membership mapping shape function interpolation theory uses positive edges to transfer displacement gradients from nodes to elements to calculate element strain, and negative edges to perform stress smoothing recovery of nodes from elements to nodes. The adjacency relationship encoding discrete equilibrium constraints includes: the element adjacency edges between elements sensing local stress compatibility and boundary abrupt changes; and the node adjacency edges between nodes strengthening the displacement compatibility conditions of spatially adjacent nodes.
[0035] Based on the construction of the heterogeneous message passing layer, refer to Figure 2 , Figure 2 This is an example diagram illustrating the construction of heterogeneous graph data based on finite element mesh generation in this embodiment. In the diagram, This represents the graph node corresponding to the grid node. This represents the graph node corresponding to the mesh cell. , and This represents three types of edges: adjacency between grid nodes, membership between a grid node and a grid cell, and adjacency between grid cells.
[0036] It should be noted that the displacement gradient in this embodiment is calculated based on the derivative of the shape function, and the specific formula is as follows: in: The displacement gradient tensor describes the spatial rate of change of the displacement field within the element, and its value is... 3D real matrix (i.e., belonging to) ), which is the core fundamental quantity for calculating the strain of a unit; The summation index takes values from 1 to 3, corresponding to the three nodes of the linear triangular element; For the first The shape functions corresponding to each node are used to characterize the relationship between physical quantities (such as displacement) within the element and physical quantities at the nodes through finite element interpolation; For the first The shape function of each node in relation to spatial coordinates The partial derivatives of the shape function reflect the spatial variation characteristics of the shape function and are key coefficients for establishing the relationship between displacement gradient and nodal displacement. For the first The element displacement vector of each node stores the displacement information of that node within the element.
[0037] In this embodiment, the heterogeneous graph achieves accurate modeling of multi-granularity physical interactions by defining four types of heterogeneous edge relationships. In specific applications, forward edges correspond to nodes to cells, reverse edges correspond to cells to nodes, cell-adjacent edges correspond to cells and cells, and node-adjacent edges correspond to nodes and nodes. It can be understood that the edge design in this embodiment is essentially a graph structure abstraction of finite element data flow. The model inherits the core assumptions of finite element methods through this structure, ensuring physical realism.
[0038] Furthermore, in this embodiment, the heterogeneous message passing layer performs physical information interaction based on the following formula.
[0039] Regarding message generation: For neighborhood aggregation: For node updates: Specifically, a pre-defined mechanical loss function is embedded into the pre-trained model to obtain a mechanically embedded heterogeneous graph neural network, as follows: The pre-trained model is initialized as a predictor, and the first predicted value is obtained through the pre-trained model. The mechanical loss function is used as the loss function in the pre-trained model. The first predicted value is constrained based on the mechanical loss function to obtain the second predicted value.
[0040] It should be noted that this embodiment uses existing transfer learning techniques to process the pre-trained model in the mechanics embedding channel. In specific applications, transfer learning is introduced, the pre-trained model is used as the initialization of the density predictor, the complete parameters of the heterogeneous graph neural network model are loaded as the initialization of the density predictor, a differentiable physics processing layer including filtering and projection operations is added, and a differentiable FEM solver module is integrated.
[0041] Based on the above, this embodiment constructs an end-to-end differentiable process from data prediction to physical verification, realizing iterative collaboration between data-driven and physical simulation. By embedding a mechanics-based heterogeneous graph neural network, we can ensure that the mechanical constraints of the optimization function are met when predicting structural optimization results, thereby improving the accuracy and reliability of the mechanics-based heterogeneous graph neural network. Based on the improved mechanics-based heterogeneous graph neural network, we can further accurately calculate which regions to retain and which regions to remove within a given design space during structural optimization, so that the final structure can both meet mechanical performance requirements and achieve specific optimization objectives.
[0042] Specifically, when constraining the first predicted value based on the mechanical loss function, the first predicted value is also optimized through a differentiable correction function, including density filtering and projection operations; Density filtering replaces the density of each cell with a weighted average of its neighboring cells based on a preset filtering matrix to force a smooth density distribution. The projection operation is based on the improved Heaviside projection method.
[0043] In this embodiment, the starting point of density filtering is to avoid the checkerboard effect. In a specific application, this embodiment uses the following calculation formula for density filtering: It should be noted that the improved Heaviside projection method in this embodiment is a progressive sharpening strategy, which sets a small initial value. The projection is relatively smooth, allowing for optimization and exploration of more structures; as the number of iterations gradually increases... This causes the projection to approximate the step function, ultimately resulting in a sharp structure. The corresponding calculation formula is: Among them, the trainable threshold parameter is allowed. Fine-tuning is performed during optimization, and it is used in conjunction with an adaptive penalty term to jointly maintain volume constraints.
[0044] Specifically, the mechanical loss function is used as the loss function in the pre-trained model, as follows: A volume constraint term is incorporated into the mechanical loss function. This dynamically increases the penalty when the volume deviates from the target value, guiding the optimization back to the feasible region. The loss function incorporating the volume constraint term is: in: This represents the overall loss function value; The compliance term consists of optimization objectives other than volume constraints. These are the weighting coefficients for the volume constraint term, used to adjust the strength of the influence of the volume constraint on the optimization process; The actual volume of the structure is calculated based on fuzzy density during the current structural optimization process; The pre-defined target volume for the structure.
[0045] In practical applications, we have found that simply combining the compliance term and the volume term to form the loss function has problems, particularly regarding the compliance term. The gradient of the loss function tends to increase material (reduce compliance), while the gradient of the volume constraint term tends to decrease material (satisfy the constraint). Their gradient directions may be opposite, leading to optimization oscillations. To address this issue, this embodiment optimizes the weighting coefficients of the loss function.
[0046] Specifically, the mechanical loss function is also configured with adaptive optimization of the weight coefficients, as follows: By changing the weight coefficients in the loss function that are written into the volume constraint term to adaptive ones, the optimized loss function is as follows: and in: For the first The weighting coefficient of the volume constraint term in each iteration is used to dynamically adjust the influence of the volume constraint on the optimization. This is the volume deviation. ; For the first The updated weight coefficients in the next iteration; This is an adjustment factor for the weighting coefficients, used to adaptively adjust the weighting magnitude when the volume deviation exceeds the threshold; A preset threshold for volume deviation is used to determine whether the weighting coefficient needs to be adjusted. When the absolute value of the volume deviation... Weight updates are triggered when the value exceeds this threshold.
[0047] Specifically, in the optimization of actual engineering structures, we characterize the density value of the engineering structure based on the first predicted value and the second predicted value.
[0048] In this embodiment, the core features of the weighting coefficient optimization include: The boundary repulsion effect means that when the volume difference approaches 1, the penalty term approaches infinity, forcing the solution to remain within the feasible region. Gradient adaptation: When approaching the constraint boundary (the volume difference approaches zero), the penalty gradient approaches zero, and the flexibility optimization is not disturbed.
[0049] Figure 3The diagram illustrates the changes in total loss, objective function loss, volume constraint loss, and penalty coefficient for the structural optimization method based on mechanically embedded heterogeneous graph neural networks in this embodiment. Specifically: (a) shows the change in total loss relative to the number of iterations, with the ordinate representing total loss (in N·m) and the abscissa representing the number of iterations; (b) shows the change in objective function loss relative to the number of iterations, with the ordinate representing objective function loss (in N·m) and the abscissa representing the number of iterations; (c) shows the change in volume constraint loss relative to the number of iterations, with the ordinate representing volume constraint loss (dimensionless) and the abscissa representing the number of iterations; and (d) shows the change in penalty coefficient relative to the number of iterations, with the ordinate representing penalty coefficient (dimensionless) and the abscissa representing the number of iterations.
[0050] In practical applications, traditional surrogate models based on convolutional neural networks (CNNs) treat optimization as an image generation task, but are fundamentally limited in the 3D domain due to the cubic increase in computational cost and the challenge of adapting to unstructured meshes. In contrast, graph neural network (GNN) methods achieve a natural isomorphism between the physical model and the data structure. They operate directly on a graph structure composed of nodes and cells, and effectively avoid the curse of dimensionality by utilizing mesh sparsity. More importantly, the heterogeneous graph neural network (HGNN) used in this method further deepens this advantage: by distinguishing different types of nodes and their interactions (edges), and learning specific physical message passing functions for these different types of interactions, the model can more finely decouple and simulate the complex mechanical interactions between geometry, materials, and boundary conditions. This capability allows the model to go beyond pure geometric pattern recognition, capturing real physical laws more profoundly. Therefore, it demonstrates fundamental potential and superiority in solving large-scale, high-fidelity 3D optimization problems, breaking through the limitations of 2D.
[0051] Figures 4 to 8 The diagrams show a comparison between the predicted and actual values obtained by the structural optimization method based on mechanically embedded heterogeneous graph neural networks in this embodiment.
[0052] like Figure 4 As shown, this is the optimization result of an L-shaped support. From left to right, the results are the actual value of the optimization result, the optimization result obtained based on the traditional graph neural network (GNN), and the optimization result obtained based on the structural optimization method of mechanical embedded heterogeneous graph neural network in this embodiment. In this example, green lines indicate fixed constraints, red arrows indicate concentrated loads, white areas are removed, and non-white areas are retained. The shades of color are used to characterize the density value of the engineering structure.
[0053] like Figure 5As shown, this is the optimization result of another L-shaped support. From left to right, the results are the actual value of the optimization result, the optimization result obtained based on the traditional graph neural network (GNN), and the optimization result obtained based on the structural optimization method of mechanical embedded heterogeneous graph neural network in this embodiment. In this example, green lines indicate fixed constraints, red arrows indicate concentrated loads, white areas are removed, and non-white areas are retained. The shade of color is used to characterize the density value of the engineering structure.
[0054] like Figure 6 As shown, this is the optimization result of a cantilever beam. From left to right, the results are the actual value of the optimization result, the optimization result obtained based on the traditional graph neural network (GNN), and the optimization result obtained based on the structural optimization method of mechanical embedded heterogeneous graph neural network in this embodiment. In this example, green lines indicate fixed constraints, red arrows indicate concentrated loads, white areas are removed, and non-white areas are retained. The shades of color are used to characterize the density value of the engineering structure.
[0055] like Figure 7 As shown, this is the optimization result of another cantilever beam. From left to right, the results are the actual value of the optimization result, the optimization result obtained based on the traditional graph neural network (GNN), and the optimization result obtained based on the structural optimization method of mechanical embedded heterogeneous graph neural network in this embodiment. In this example, green lines indicate fixed constraints, red arrows indicate concentrated loads, white areas are removed, and non-white areas are retained. The shades of color are used to characterize the density value of the engineering structure.
[0056] like Figure 8 As shown, this is the optimization result of an MBB beam. From left to right, the results are the actual value of the optimization result, the optimization result obtained based on the traditional graph neural network (GNN), and the optimization result obtained based on the structural optimization method of mechanical embedded heterogeneous graph neural network in this embodiment. In this example, the red arrow represents concentrated load, the green triangle represents hinge support, the blue circle represents sliding support, the white area is removed, and the non-white area is retained. The shade of color is used to characterize the density value of the engineering structure.
[0057] Based on the comparison between the predicted and actual values, and the comparison between the two prediction methods, we conclude that the prediction results obtained by the structural optimization method based on mechanically embedded heterogeneous graph neural networks in this embodiment are closer to the actual values, and can achieve specific optimization goals such as lightest weight and greatest stiffness.
[0058] Based on the above description, this embodiment has made at least the following optimizations to the prior art: Firstly, a structure optimization prediction method based on heterogeneous graph neural networks is proposed. By constructing grid data as heterogeneous graph data, classifying and storing the feature values of grid nodes and grid cells, and building a complete message passing mechanism, the features are better propagated and updated, which improves the model's capabilities in terms of computational efficiency and accuracy.
[0059] Secondly, by pre-training heterogeneous graph neural networks and using transfer learning, a framework for structural optimization based on neural network reparameterization was realized. The ability of graph neural networks to process non-Euclidean data is applied, extending the optimization approach based on gridded neural network reparameterization to the three-dimensional domain.
[0060] Thirdly, the energy distribution of the predicted unit is used as a physical distribution term in the network architecture and concatenated with the original features to constrain the total energy to be close to the true value, thus avoiding violation of physical laws and improving accuracy.
[0061] Fourth, the soft constraint mechanism of writing constraints into the loss function has been optimized, and robustness has been improved by using a logarithmic barrier function and adaptive weight coefficients.
[0062] Based on the above optimizations, this embodiment achieves at least the following technical effects: By constructing a dual-channel heterogeneous graph model that includes a data-driven channel and a mechanical embedding channel, an organic balance between computational efficiency and accuracy is achieved.
[0063] The data-driven channel uses a heterogeneous graph neural network model to encode the physical features of nodes and units. It captures multi-scale mechanical behavior through a heterogeneous message passing layer, and then accurately locates high-stress areas through the stress attention mechanism and energy predictor of the physical perception module. It also introduces physical regularization terms to guide optimization, which significantly shortens the training time and improves the prediction accuracy of the model when dealing with multiple load conditions compared with traditional graph neural networks.
[0064] The mechanical embedding channel uses a heterogeneous graph neural network as the initial density predictor, optimizes the density distribution through a differentiable correction function, and couples a differentiable FEM solver to verify physical compliance. Combined with a multi-objective optimization framework, the volume constraint term is written into the loss function and an adaptive weight coefficient and logarithmic barrier function are used. When the volume deviates from the target value, the penalty is dynamically enhanced, which effectively guides the optimization back to the feasible region, significantly improves the robustness of the iteration process, and ensures that the optimization results simultaneously meet mechanical constraints and performance objectives, providing an efficient, accurate and stable solution for structural optimization.
[0065] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0066] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0067] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0069] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A structural optimization method based on mechanically embedded heterogeneous graph neural networks, applied to the optimization of engineering structures, characterized in that, include: The heterogeneous graph neural network is pre-trained to convert the load conditions of the input engineering structure into graph structure features, and to obtain a first prediction value for the engineering structure based on the graph structure features. Transfer learning is performed on the pre-trained heterogeneous graph neural network to obtain a pre-trained model; A preset mechanical loss function is embedded in the pre-trained model to obtain a mechanical embedding heterogeneous graph neural network; wherein, the mechanical loss function is used to optimize the first predicted value to output a second predicted value for the engineering structure; The real-time load conditions of the engineering structure are input into the mechanical embedded heterogeneous graph neural network, and the second predicted value is output. The second predicted value is the result of structural optimization.
2. The structural optimization method based on mechanically embedded heterogeneous graph neural networks as described in claim 1, characterized in that, The trained heterogeneous graph neural network converts the input load conditions into graph structure features, and obtains a first predicted value for the engineering structure based on the graph structure features, specifically: The physical features corresponding to the nodes and elements of the mesh are processed separately by a dual-branch encoder, and the stress distribution across nodes is aggregated to enhance the feature representation of the elements, thereby obtaining the graph structure features; wherein, the physical features corresponding to the nodes include at least displacement and coordinates, and the physical features corresponding to the elements include at least stress, strain and node statistics; Based on the interaction of the heterogeneous message passing layer, the graph structure features are transmitted to capture the multi-scale mechanical behavior of the engineering structure. The strain energy distribution of the unit is predicted based on physical perception as a regularization constraint, and the high stress-sensitive region is located by combining the attention mechanism. The decoder outputs the first predicted value.
3. The structural optimization method based on mechanically embedded heterogeneous graph neural networks as described in claim 2, characterized in that, The method based on a dual-branch encoder processes the physical features corresponding to the nodes and elements of the mesh separately, and aggregates stress distribution across nodes to enhance the feature representation of the elements, thereby obtaining the graph structure features, including: The physical characteristics corresponding to the processed node are defined as node features, and the node features are: The node features include their corresponding spatial coordinates. and displacement field , express It is a four-dimensional vector; The physical characteristics corresponding to the processed unit are defined as the unit characteristics, wherein the unit characteristics are: The unit feature storage unit-level stress-strain data includes data represented as follows: Mise stress, expressed as The response, express It is a two-dimensional vector; The graph structure features include the node features and the cell features.
4. The structural optimization method based on mechanically embedded heterogeneous graph neural networks according to claim 2, characterized in that, The node statistics are as follows: in, For the first Average stress statistics of each node In order to be with the first The set of neighboring nodes of a given node that have a first-type adjacency relationship. For the set of neighbor nodes The number of nodes in For the set of neighbor nodes The Middle The stress value of each node.
5. The structural optimization method based on mechanically embedded heterogeneous graph neural networks according to claim 2, characterized in that, The graph structure features are transmitted interactively based on the heterogeneous message passing layer, specifically as follows: Four types of heterogeneous edge relationships are defined for modeling multi-granularity physical interactions; wherein, the four types of heterogeneous edge relationships include: The bidirectional membership mapping shape function interpolation theory uses positive edges to transfer displacement gradients from the node to the element to calculate element strain, and negative edges to perform stress smoothing recovery of the node from the element to the node. The adjacency relationship encoding discrete equilibrium constraints includes: the unit adjacency edges between the units sensing local stress compatibility and boundary abrupt change phenomena; and the node adjacency edges between the nodes strengthening the displacement compatibility conditions of spatially adjacent nodes.
6. The structural optimization method based on mechanically embedded heterogeneous graph neural networks as described in claim 1, characterized in that, The process of embedding a preset mechanical loss function into the pre-trained model to obtain a mechanically embedded heterogeneous graph neural network is as follows: The pre-trained model is initialized as a predictor, and the first predicted value is obtained through the pre-trained model. The mechanical loss function is used as the loss function in the pre-trained model, and the first predicted value is constrained based on the mechanical loss function to obtain the second predicted value.
7. The structural optimization method based on mechanically embedded heterogeneous graph neural networks according to claim 6, characterized in that, When constraining the first predicted value based on the mechanical loss function, the first predicted value is also optimized by a differentiable correction function, including density filtering and projection operations; The density filtering is based on a preset filtering matrix, which replaces the density of each cell with the weighted average of its neighboring cells to force a smooth density distribution. The projection operation is based on the improved Heaviside projection method.
8. The structural optimization method based on mechanically embedded heterogeneous graph neural networks according to claim 6, characterized in that, The specific steps of using the mechanical loss function as the loss function in the pre-trained model are as follows: The volume constraint term is incorporated into the mechanical loss function, and the penalty is dynamically increased when the volume deviates from the target value, guiding the optimization back to the feasible region; wherein, the loss function incorporated into the volume constraint term is: in: This represents the overall loss function value; The compliance term consists of optimization objectives other than volume constraints. These are the weighting coefficients for the volume constraint term, used to adjust the strength of the influence of the volume constraint on the optimization process; The actual volume of the structure is calculated based on fuzzy density during the current structural optimization process; The pre-defined target volume for the structure.
9. The structural optimization method based on mechanically embedded heterogeneous graph neural networks according to claim 8, characterized in that, The mechanical loss function is also configured with adaptive optimization of the weight coefficients, specifically as follows: The weight coefficients in the loss function written into the volume constraint term are changed to adaptive values, and the optimized loss function is: and in: For the first The weighting coefficient of the volume constraint term in each iteration is used to dynamically adjust the influence of the volume constraint on the optimization. This is the volume deviation. ; For the first The updated weight coefficients in the next iteration; This is an adjustment factor for the weighting coefficients, used to adaptively adjust the weighting magnitude when the volume deviation exceeds the threshold; A preset threshold for volume deviation is used to determine whether the weighting coefficient needs to be adjusted. When the absolute value of the volume deviation... Weight updates are triggered when the value exceeds this threshold.
10. The structural optimization method based on mechanically embedded heterogeneous graph neural networks according to claim 1, characterized in that, The density value of the engineering structure is characterized based on the first predicted value and the second predicted value.
Citation Information
Patent Citations
Variable design domain three-dimensional structure topology optimization design method based on Mobile-U-Net
CN113204907A
Topological optimal structure prediction method based on embedded physical constraint deep learning technology
CN113505929A
Seismic isolation support design method based on data-mechanics coupling driving graph neural network
CN116186826A
Structural modal calculation method based on embedded physical information graph neural network
CN118504151A
Cited By
Two-stage electrothermal coupling system energy flow calculation method and system based on hybrid drive
CN121743632A
Hybrid drive-based two-stage electro-thermal coupling system energy flow calculation method and system
CN121743632B