A method for creating a bolt finite element connection
By employing target detection and clustering optimization methods, combined with YOLO and GCN models, the automation of bolt finite element connections was achieved, solving the problem of high manpower and time consumption in existing technologies and improving the accuracy and efficiency of the connections.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-16
- Publication Date
- 2026-07-10
AI Technical Summary
In the existing technology, bolt finite element connection requires a lot of manpower and time in the finite element preprocessing of machinery and vehicles, and the manual method has quality problems, making it difficult to connect efficiently and accurately.
We employ object detection and clustering optimization methods, utilize the YOLO model to identify bolt hole and washer parameters, combine the GCN model to extract spatial embedding features, perform node clustering through the SpatialGCN model, and automatically interact with HyperMesh software to achieve automated finite element connection creation.
It improves the accuracy of bolt finite element node classification, shortens preprocessing time, reduces manual intervention, and achieves efficient and accurate bolt connection creation.
Smart Images

Figure CN122365760A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of machinery and automobiles, specifically to a method for creating bolt finite element connections. Background Technology
[0002] Bolted finite element connections are prevalent in the preprocessing of finite element models for machinery and vehicles. In the past, CAE engineers handled bolted finite element connections manually. The problems with this approach are twofold: firstly, it may take several engineers several days to process the bolted finite element connections of a single vehicle or machine model, wasting time and manpower; secondly, manually processed bolted finite element connections may have numerous quality issues, requiring repeated modifications.
[0003] Therefore, how to solve the technical problem urgently needed in this field by using a bolt finite element connection method that can shorten the construction period, reduce manpower, and ensure quality. Summary of the Invention
[0004] To enable multi-module collaborative work and shorten the construction period and reduce labor costs, this application discloses a method for creating bolt finite element connections, specifically:
[0005] A method for creating a bolted finite element connection, the method comprising:
[0006] Bolt target detection is performed, and source data of the bolt finite element node set of the finite element model is obtained based on the target detection results;
[0007] Cluster optimization is performed on the source data of the finite element node set to obtain finite element node groups belonging to the same bolt;
[0008] Automated finite element connection creation is performed on the finite element node group of the same bolt.
[0009] Optionally, the step of performing bolt target detection and obtaining source data for the bolt finite element node set of the finite element model based on the target detection results includes:
[0010] Based on the target recognition and detection method, the parameters of the bolt hole and the surrounding washer in the normalized image coordinate system are obtained.
[0011] Based on the normalized mapping relationship between the image coordinate system and the software graphical display interface coordinate system, the parameters of the bolt holes and the washers around the bolt holes in the software graphical display interface are obtained.
[0012] The finite element nodes within the preset radius range of the parameters of the washers around the bolt holes are obtained, and the relative positions of the bolt holes and the washers around the bolt holes are verified to obtain the source data of the finite element node set.
[0013] Optionally, the method for obtaining bolt hole and bolt hole perimeter washer parameters in the normalized image coordinate system based on the target recognition and detection method includes:
[0014] Set up an image dataset labeled with bolt hole images for YOLO model training;
[0015] The normalized coordinates and dimensions of the bounding box for each bolt hole are output based on the YOLO training model. The normalized coordinates and dimensions of the bolt hole are represented as follows:
[0016] ,
[0017] Among them, x i The normalized x-coordinate of the top-left corner of the bounding box of the bolt hole; y i The normalized ordinate of the top-left corner of the bounding box of the bolt hole; w i h represents the normalized width of the bounding box. i The height represents the normalized bounding box height; i represents the normalized bounding box coordinates and dimension data number of the bolt hole.
[0018] Based on the YOLO training model, the normalized coordinates of the nodes on the washers around each bolt hole are output. The normalized coordinates of the nodes on the washers around the bolt holes are represented as follows:
[0019] ,
[0020] Among them, y j The x-coordinate represents the normalized coordinate of the nodes on the washer surrounding the bolt hole; y j represents the ordinate of the normalized coordinates of the nodes on the washer around the bolt hole; j represents the node number on the washer around the bolt hole.
[0021] Optionally, the step of obtaining the bolt hole and bolt hole perimeter washer parameters within the software graphical display interface based on the mapping relationship between the normalized image coordinate system and the software graphical display interface coordinate system includes:
[0022] Establish the software graphical display interface coordinate system ouv with the top left corner vertex as the origin o, the rightward u-axis as the positive direction, and the downward v-axis as the positive direction.
[0023] Establish a mapping relationship between the normalized image coordinate system and the software graphical display interface coordinate system. The mapping relationship model is represented as follows:
[0024] ,
[0025] Where u and v represent the u-axis and v-axis coordinates on the software's graphical display interface, respectively; H and C represent the transformation matrix; and x and y represent the x-axis and y-axis coordinates of the normalized image coordinate system, respectively.
[0026] Obtain the coordinates of the lower right corner, upper right corner, lower left corner, and the midpoint between the upper left and lower right corners of the normalized image, and correspond them to the coordinates of the lower right corner, upper right corner, lower left corner, and the midpoint between the upper left and lower right corners of the software's graphical display interface, respectively. Then set them into the mapping relationship model to obtain the transformation matrices H and C.
[0027] Based on the mapping relationship model and the normalized processing of bolt hole and bolt hole surrounding washer parameters in the image coordinate system, the bolt hole and bolt hole surrounding washer parameters in the software graphical display interface are obtained.
[0028] The bolt hole parameters displayed in the software's graphical interface are as follows:
[0029] ,
[0030] Among them, u k This represents the x-coordinate of the top-left vertex of the bolt hole bounding box within the software's graphical display interface; v k W represents the ordinate of the top-left vertex of the bolt hole bounding box within the software's graphical display interface. k H represents the width of the bolt hole bounding box displayed in the software image. k This indicates the height of the bolt hole bounding box displayed in the software image; k represents the bolt hole number within the graphical display interface.
[0031] Optionally, the step of obtaining finite element nodes within a preset radius range of the parameters of the washer surrounding the bolt hole, and verifying the relative position of the bolt hole and the washer surrounding the bolt hole to obtain the source data of the finite element node set, includes:
[0032] Obtain the coverage area of the gasket around the bolt hole to obtain the radius threshold;
[0033] Using the center of the bolt hole as the center, search for finite element nodes within a radius threshold range, and identify the nodes that fall within the bolt hole parameter range in the software's graphical display interface as the source data for the finite element node group.
[0034] Optionally, the clustering optimization of the source data of the finite element node set to obtain finite element node groups belonging to the same bolt includes:
[0035] Obtain the original coordinates and corresponding relative coordinate offsets of all nodes in the source data of the finite element node set, and perform StandardScaler processing for feature enhancement to obtain the feature-enhanced data.
[0036] A spatial neighborhood graph is constructed based on the feature-enhanced data and input into the improved GCN model with added attention mechanism—SpatialGCN—to obtain intermediate data for cluster optimization.
[0037] The intermediate clustering data is optimized based on reconstruction loss and topological constraints to preserve the key features of the original nodes;
[0038] Based on the elbow method and contour method dual index processing scheme, the optimal number of clusters is automatically determined, and K-means and DBSCAN are applied to realize multi-strategy clustering to obtain finite element node groups belonging to the same bolt.
[0039] Optionally, the construction of a spatial neighborhood graph based on the feature-enhanced data, and its input into the improved GCN—SpatialGCN model with added attention mechanism—to obtain intermediate clustering optimization data includes:
[0040] The improved GCN model with added attention mechanism—SpatialGCN model—includes:
[0041] The input layer consists of 6-dimensional data, including the original coordinates of the nodes and their corresponding relative coordinate offsets, represented as follows:
[0042] ,
[0043] Where x, y, and z represent the x-axis, y-axis, and z-axis coordinate values of the original node coordinates, respectively, and X, Y, and Z represent the coordinate deviation ranges relative to x, y, and z, respectively.
[0044] The first convolutional layer performs convolution operations on the feature-enhanced data to obtain high-level spatial features and the relationship between each node and its spatial neighbors, transforming the feature-enhanced data into 64-dimensional data.
[0045] The activation layer, based on small negative nonlinear propagation LeakyReLU (negative_slope=0.01), enhances the representation of 64-dimensional data;
[0046] The attention layer feeds the enhanced 64-dimensional data into the fully connected layer, generates attention weights, obtains the importance weights of each node, and scales the node features based on Linear(64)... The Sigmoid algorithm learns node weights to highlight key nodes.
[0047] The second convolutional layer performs a second convolution operation on key nodes to obtain and propagate attention-weighted node information to obtain 32-dimensional data;
[0048] The output layer performs 32-dimensional data processing based on the LeakyReLU output and outputs the data to obtain intermediate data for cluster optimization.
[0049] Optionally, the dual-index processing scheme based on the elbow method and contour method automatically determines the optimal number of clusters and applies K-means and DBSCAN to achieve multi-strategy clustering, obtaining finite element node groups belonging to the same bolt, including:
[0050] The dual-index processing scheme using the elbow method and contour method includes:
[0051] Inertial calculations are performed on intermediate data from cluster optimization, and inertial detection is performed based on the elbow method to obtain the descent inflection point, and a suggested value K1 is output.
[0052] Calculate the silhouette coefficient on the intermediate data of cluster optimization and obtain the maximum silhouette coefficient value K2;
[0053] Establish a fusion decision based on the elbow method and the contour method. The fusion decision is expressed as:
[0054] ,
[0055] Where K represents the output fusion decision, which is generated when the deviation between K1 and K2 is not higher than the threshold.
[0056] Optionally, the automated finite element connection creation of the bolts in the finite element node group of the same bolt includes:
[0057] Based on HyperMesh, the detected objects are traversed to obtain objects containing bolt holes and bolt nodes, and key-value pairs are constructed.
[0058] To obtain key-value pairs that meet the criteria, input a set of bolt hole node objects and the spatial range of the bolt holes, and obtain key-value pairs in which each node is located within the spatial range of the bolt holes.
[0059] For each node that meets the criteria, a node selection box is set as the center. All nodes corresponding to the key-value pairs that meet the criteria are obtained and connected to create finite element connection relationships.
[0060] The beneficial effects of this application are mainly reflected in:
[0061] 1. High-precision analysis and classification of finite element nodes belonging to the same bolt. The GCN model is used to extract spatial embedding features. In the feature enhancement stage, relative coordinates and node weights are introduced to preserve the topological relationships between nodes, further improving the model's sensitivity to local structures. The elbow method and contour coefficient method are introduced to automatically determine the optimal number of clusters K, avoiding biases caused by manual settings. After initial clustering, DBSCAN is used for sub-cluster refinement, effectively removing noise and separating dense substructures. The SpatialGCN model enhances node features, and the fusion of K-means and DBSCAN enables multi-strategy clustering decisions. Multi-level optimization and clustering of 3D node coordinates significantly improves the classification accuracy of finite element nodes belonging to the same bolt connection.
[0062] 2. Algorithm and HyperMesh Software Automated Interaction. In HyperMesh, algorithm commands are monitored, the ID of the selected node is dynamically obtained, and its geometric center coordinates are calculated and written to a file. At the algorithm level, GUI control is implemented, using pyautogui to simulate mouse selection and button clicks. It supports automatically drawing a 10mm × 10mm selection box centered on a specified point, triggering an Enter key confirmation operation, achieving an end-to-end closed-loop process. Seamless communication with HyperMesh software is achieved through script-driven methods, automating the entire process from "selecting a node → calculating the center → creating a new node → selection operation," reducing manual intervention and shortening preprocessing time.
[0063] 3. Cross-module collaboration, visualized monitoring, and real-time feedback. A floating image window that is always on top is implemented, using tkinter + PIL display algorithms to output images. On Windows platforms, the window can be kept on top by setting HWND_TOPMOST via win32gui. A timed refresh mechanism ensures synchronized screen updates. Data sharing between modules is achieved through object attribute passing, forming a closed-loop "perception-decision-execution" chain. The integration of image display, data communication, and backend computing modules forms a floating window that displays detection results in real time, supporting dynamic updates and human-computer interaction, enhancing the system's transparency and usability. Attached Figure Description
[0064] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the embodiments of this application or the prior art will be briefly introduced below. Obviously, the following description is only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. The drawings are used to provide a further understanding of this disclosure and constitute a part of the specification. They are used together with the following detailed description to explain this disclosure, but do not constitute a limitation of this disclosure. In the drawings:
[0065] Figure 1 A flowchart illustrating a bolt finite element connection creation method provided in this application embodiment;
[0066] Figure 2 A flowchart of the improved GCN—SpatialGCN model, which adds an attention mechanism in a bolt finite element connection creation method provided in this application embodiment;
[0067] Figure 3 A SpatialGCN model network structure diagram provided in the embodiment of this application for a bolt finite element connection creation method;
[0068] Figure 4 This document presents a flowchart illustrating the HyperMesh process for automatically creating bolt finite element connections, as part of an embodiment of this application. Detailed Implementation
[0069] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Furthermore, in the embodiments of this application, "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0070] In the process of creating bolt finite element connections, a large number of nodes need to be created, and the relationships and connections between these nodes need to be analyzed. Only then can nodes with accurate connection relationships be connected to obtain the final result. This process is time-consuming and prone to omissions, leading to a decrease in accuracy. Therefore, this application discloses a method for creating bolt finite element connections, such as... Figure 1 The diagram shown is a flowchart of a bolt finite element connection creation method provided in an embodiment of this application. Specifically:
[0071] S1. Perform bolt target detection and obtain the source data of the bolt finite element node set of the finite element model based on the target detection results.
[0072] S2. Perform cluster optimization on the source data of the finite element node set to obtain the finite element node group belonging to the same bolt.
[0073] S3. Create automated finite element connections for the finite element node group of the same bolt.
[0074] The purpose of the above steps is to achieve accurate and efficient connection of bolts using finite element analysis.
[0075] The following will provide a detailed explanation of the above steps:
[0076] As described in step S1, the purpose of this step is to analyze and obtain the data source for subsequent processing of the finite element node set, so that subsequent data analysis can be performed based on the obtained results. Specifically:
[0077] Based on the target recognition and detection method, the parameters of the bolt hole and the surrounding washer in the normalized image coordinate system are obtained.
[0078] The purpose of this step is to conduct subsequent bolt hole structure verification based on the fact that bolts are usually used together with washers, and that a portion of the washer structure overlaps with the bolt hole structure. Specifically:
[0079] Set up an image dataset labeled with bolt hole images for YOLO model training;
[0080] The normalized coordinates and dimensions of the bounding box for each bolt hole are output based on the YOLO training model. The normalized coordinates and dimensions of the bolt hole are represented as follows:
[0081] ,
[0082] Where, x i The normalized x-coordinate of the top-left corner of the bounding box of the bolt hole; y i The normalized ordinate of the top-left corner of the bounding box of the bolt hole; w i h represents the normalized width of the bounding box. i The height represents the normalized bounding box height; i represents the normalized bounding box coordinates and dimension data number of the bolt hole.
[0083] Based on the YOLO training model, the normalized coordinates of the nodes on the washers around each bolt hole are output. The normalized coordinates of the nodes on the washers around the bolt holes are represented as follows:
[0084] ,
[0085] Among them, y j The x-coordinate represents the normalized coordinate of the nodes on the washer surrounding the bolt hole; y j represents the ordinate of the normalized coordinates of the nodes on the washer around the bolt hole; j represents the node number on the washer around the bolt hole.
[0086] Based on the normalized mapping relationship between the image coordinate system and the software graphical display interface coordinate system, the parameters of the bolt holes and the washers around the bolt holes in the software graphical display interface are obtained.
[0087] The purpose of this step is to establish a mapping relationship so that the coordinate system of the normalized image generated in subsequent processing can be synchronously mapped within the coordinate system of the software's graphical display interface. Based on this mapping relationship, the obtained image information can then be mapped within the software. Specifically:
[0088] Establish the software graphical display interface coordinate system ouv with the top left corner vertex as the origin o, the rightward u-axis as the positive direction, and the downward v-axis as the positive direction.
[0089] Establish a mapping relationship between the normalized image coordinate system and the software graphical display interface coordinate system. The mapping relationship model is represented as follows:
[0090] ,
[0091] Where u and v represent the u-axis and v-axis coordinates on the software's graphical display interface, respectively; H and C represent the transformation matrix; and x and y represent the x-axis and y-axis coordinates of the normalized image coordinate system, respectively.
[0092] Obtain the coordinates of the lower right corner, upper right corner, lower left corner, and the midpoint between the upper left and lower right corners of the normalized image, and correspond them to the coordinates of the lower right corner, upper right corner, lower left corner, and the midpoint between the upper left and lower right corners of the software's graphical display interface, respectively. Then set them into the mapping relationship model to obtain the transformation matrices H and C.
[0093] Based on the mapping relationship model and the normalized processing of bolt hole and bolt hole surrounding washer parameters in the image coordinate system, the bolt hole and bolt hole surrounding washer parameters in the software graphical display interface are obtained.
[0094] The bolt hole parameters displayed in the software's graphical interface are as follows:
[0095] ,
[0096] Among them, u k This represents the x-coordinate of the top-left vertex of the bolt hole bounding box within the software's graphical display interface; v k W represents the ordinate of the top-left vertex of the bolt hole bounding box within the software's graphical display interface. k H represents the width of the bolt hole bounding box displayed in the software image. k This indicates the height of the bolt hole bounding box displayed in the software image; k represents the bolt hole number within the graphical display interface.
[0097] The finite element nodes within the preset radius range of the parameters of the washers around the bolt holes are obtained, and the relative positions of the bolt holes and the washers around the bolt holes are verified to obtain the source data of the finite element node set.
[0098] The purpose of this step is to obtain the source data for the finite element node set, which can then be used for subsequent node set analysis. Specifically:
[0099] Obtain the coverage area of the gasket around the bolt hole to obtain the radius threshold;
[0100] Using the center of the bolt hole as the center, search for finite element nodes within a radius threshold range, and identify the nodes that fall within the bolt hole parameter range in the software's graphical display interface as the source data for the finite element node group.
[0101] The target detection module is established as follows: The software's graphical interface is captured as input image, scaled, and normalized for preprocessing. Based on the YOLO model, it performs efficient target detection and recognition specifically for two types of objects: bolt holes and nodes on bolt washers. Non-maximum suppression and coordinate transformation are applied as post-processing before outputting the detection results. A CUDA device is selected to support half-precision computation, improving efficiency. The letterbox method is used to maintain a consistent aspect ratio for the input size.
[0102] The structure of the efficient target detection and recognition algorithm for two types of objects—bolt holes and nodes on bolt washers—is as follows:
[0103] A YOLO model is trained using a pre-annotated dataset of bolt hole images. The input is a rendered image, and the output is the normalized coordinates and dimensions (x, y, y) of the bounding box for each bolt hole. i y i w i h i ), the normalized coordinates (x) of the nodes on the gaskets around each bolt hole j y j ).
[0104] Establish a normalized image coordinate system oxy The mapping relationship of the software's graphical display interface coordinate system ouv, based on (x i y i w i h i ) deducing the corresponding bolt hole coordinates and dimensions (u) from the software's graphical display interface. i v i W i H i According to (x) j y j ) Calculate the node coordinates (u) on the surrounding gasket of the bolt hole in the corresponding software graphical display interface. j v j ).
[0105] in (u i vi Within a specified radius (e.g.) Search for nearby finite element nodes (10mm) and verify whether they are in (u k v k W k H k Within the cluster, there are finite element nodes that serve as input data for subsequent clustering.
[0106] Among them, a normalized image coordinate system oxy is established. The mapping relationship of the Ouv coordinate system in the software's graphical display interface is as follows:
[0107] Construct a coordinate system for the software's graphical display interface, with the top left corner of the screen as the origin o, the positive u-axis pointing to the right, and the positive v-axis pointing downwards, with units of pixels.
[0108] Establish a mapping model: = H + C.
[0109] Obtain 4 sets of points and determine the transformation matrices H and C: extract the coordinates of the lower right, upper right, and lower left vertices of the normalized image and their corresponding coordinates of the lower right, upper right, and lower left vertices of the software's graphical display interface, respectively. Extract the coordinates of the midpoint between the upper left and lower right vertices of the normalized image and their corresponding coordinates of the midpoint between the upper left and lower right vertices of the software's graphical display interface, and substitute them into the mapping model.
[0110] As described in step S2, the purpose of this step is to confirm the finite element nodes belonging to the same bolt. Based on this identification result, nodes requiring merging or other processing methods can then be identified. Specifically:
[0111] Obtain the original coordinates and corresponding relative coordinate offsets of all nodes in the source data of the finite element node set, and perform feature enhancement using StandardScaler to obtain the feature-enhanced data.
[0112] A spatial neighborhood graph is constructed based on the feature-enhanced data and input into the improved GCN model—SpatialGCN—which incorporates an attention mechanism, to obtain intermediate data for cluster optimization. Specifically:
[0113] The improved GCN model with added attention mechanism—SpatialGCN model—includes:
[0114] The input layer consists of 6-dimensional data, including the original coordinates of the nodes and their corresponding relative coordinate offsets, represented as follows:
[0115] ,
[0116] Where x, y, and z represent the x-axis, y-axis, and z-axis coordinate values of the original node coordinates, respectively, and X, Y, and Z represent the coordinate deviation ranges relative to x, y, and z, respectively.
[0117] The first convolutional layer performs convolution operations on the feature-enhanced data to obtain high-level spatial features and the relationship between each node and its spatial neighbors, transforming the feature-enhanced data into 64-dimensional data.
[0118] The activation layer, based on small negative nonlinear propagation LeakyReLU (negative_slope=0.01), enhances the representation of 64-dimensional data;
[0119] The attention layer feeds the enhanced 64-dimensional data into the fully connected layer, generates attention weights, obtains the importance weights of each node, and scales the node features based on Linear(64)... The Sigmoid algorithm learns node weights to highlight key nodes.
[0120] The second convolutional layer performs a second convolution operation on key nodes to obtain and propagate attention-weighted node information to obtain 32-dimensional data;
[0121] The output layer performs 32-dimensional data processing based on the LeakyReLU output and outputs the data to obtain intermediate data for cluster optimization.
[0122] The intermediate clustering data is optimized based on reconstruction loss and topological constraints to preserve the key features of the original nodes. This step ensures that the intermediate data accurately retains the key features of the original nodes, avoiding feature loss. This ensures that the spatial topological relationships between nodes are not destroyed after model processing, always closely conforming to the actual spatial distribution of the bolt finite element nodes.
[0123] Based on a dual-index processing scheme using the elbow method and the contour method, the optimal number of clusters is automatically determined, and K-means and DBSCAN are applied to implement multi-strategy clustering to obtain finite element node groups belonging to the same bolt. Specifically:
[0124] The dual-index processing scheme using the elbow method and contour method includes:
[0125] Inertial calculations are performed on intermediate data from cluster optimization, and inertial detection is performed based on the elbow method to obtain the descent inflection point, and a suggested value K1 is output.
[0126] Calculate the silhouette coefficient on the intermediate data of cluster optimization and obtain the maximum silhouette coefficient value K2;
[0127] Establish a fusion decision based on the elbow method and the contour method. The fusion decision is expressed as:
[0128] ,
[0129] Where K represents the output fusion decision, which is generated when the deviation between K1 and K2 is not higher than the threshold.
[0130] In the data clustering analysis, the entire process is as follows: Figure 2 The diagram shows the flowchart of the improved GCN model with added attention mechanism—SpatialGCN—in a bolt finite element connection creation method provided in this application embodiment. It includes: establishing a data clustering analysis module: original coordinates + relative coordinate offsets, using StandardScaler for normalization and feature enhancement; constructing a spatial neighborhood graph (GCNConv), the improved GCN model structure with added attention mechanism—SpatialGCN model structure, the loss function integrating "MSE reconstruction loss" and "topological uniformity constraint," completing the acquisition of intermediate data for cluster optimization; constructing a dual-index system using elbow method and contour method to determine the optimal number of clusters, applying K-means and DBSCAN to achieve multi-strategy clustering, and obtaining finite element node groups belonging to the same bolt.
[0131] Among them, the improved GCN model with added attention mechanism—the SpatialGCN model—has the following network structure:
[0132] Input layer: Input node features, coordinates + relative position (6 dimensions);
[0133] First layer (convolutional layer): Graph convolutional coding operation, extracts high-level spatial features, aggregates neighbor information, captures the relationship between each node and its spatial nearest neighbors, and transforms the data into in_dim (64 dimensions) for easy subsequent processing;
[0134] The second layer (activation layer): allows small negative values to propagate nonlinearly using LeakyReLU (negative_slope=0.01), enhancing expression;
[0135] The third layer (attention layer): The in_dim (64-dimensional) embedding is fed into the fully connected layer to generate attention weights, obtaining the importance weights of each node. Then, the node features are scaled using these weights. (Linear(64-dimensional)...) The Sigmoid algorithm learns node weights, highlighting key nodes.
[0136] The fourth layer (convolutional layer): Convolution operation is performed again to further propagate and refine the attention-weighted node information. The data is transformed into in_dim (32-dimensional) to preserve the key topological structure.
[0137] Fifth layer (output layer): LeakyReLU output, resulting in a compact embedding representation in_dim (32-dimensional), used for subsequent clustering.
[0138] The optimal cluster number evaluation structure, which combines the elbow method and the contour method as dual indicators, is as follows:
[0139] First layer: Traverse the input embedding vector in_dim (32-dimensional);
[0140] Second layer: Calculate inertia, automatically detect using the elbow method, observe the descent inflection point, and output a suggested value K1;
[0141] Third layer: Calculate the profile coefficient and select K2 that maximizes the profile number.
[0142] The fourth layer: fusion decision construction, K=max(K1,K2), K1>K2, the elbow method detected a clear inflection point, the contour method did not reach the peak, and the elbow method is still the main one; K1<K2, the elbow method believes that fewer clusters should be formed, but the contour method finds that more subdivision can improve the quality and accepts finer-grained division; until the two are close, a consensus is formed, and the result is highly reliable.
[0143] like Figure 3 The diagram shown is a SpatialGCN model network structure diagram in a bolt finite element connection creation method provided in this application embodiment.
[0144] As described in step S3, the purpose of this step is to perform finite element connections after the analysis of the finite element nodes, thereby obtaining the results. Specifically:
[0145] Based on HyperMesh, the detected objects are traversed to obtain objects containing bolt holes and bolt nodes, and key-value pairs are constructed.
[0146] To obtain key-value pairs that meet the criteria, input a set of bolt hole node objects and the spatial range of the bolt holes, and obtain key-value pairs in which each node is located within the spatial range of the bolt holes.
[0147] For each node that meets the criteria, a node selection box is set as the center. All nodes corresponding to the key-value pairs that meet the criteria are obtained and connected to create finite element connection relationships.
[0148] The automated control module includes: HyperMesh operation design, extraction of detection objects by category, traversal of the target detection result data dictionary, searching for objects containing bolt holes and bolt nodes, constructing key-value pairs with the key being "class name + sequence number" and the value being the image size and coordinate detection information; extraction of nodes within holes, inputting a set of bolt hole node objects and the spatial range of a bolt hole, determining whether each node is within the range, and identifying all nodes whose range meets the condition; GUI automated operation, using HyperMesh script commands. The `createmarkpanel nodes 1 "please select nodes"` and `set nodesId[hm_getvalue nodes mark = 1 dataname = id]` commands bring up the bolt finite element connection panel. A 20mm x 20mm rectangular selection box is drawn centered on a given node coordinate to select nodes. The selection iterates through all nodes within the specified key range that meet the conditions. The `click_at_coordinates` parameter automatically clicks the "OK" button on the panel to complete the connection. For human-computer interaction performance and stability design, the `is_running` flag prevents repeated execution, and events and multithreading are used to ensure stability.
[0149] like Figure 4 The diagram shown is a flowchart of the HyperMesh automated creation of bolt finite element connections in a bolt finite element connection creation method provided in an embodiment of this application.
[0150] The beneficial effects of this application are mainly reflected in:
[0151] 1. High-precision analysis and classification of finite element nodes belonging to the same bolt. The GCN model is used to extract spatial embedding features. In the feature enhancement stage, relative coordinates and node weights are introduced to preserve the topological relationships between nodes, further improving the model's sensitivity to local structures. The elbow method and contour coefficient method are introduced to automatically determine the optimal number of clusters K, avoiding biases caused by manual settings. After initial clustering, DBSCAN is used for sub-cluster refinement, effectively removing noise and separating dense substructures. The SpatialGCN model enhances node features, and the fusion of K-means and DBSCAN enables multi-strategy clustering decisions. Multi-level optimization and clustering of 3D node coordinates significantly improves the classification accuracy of finite element nodes belonging to the same bolt connection.
[0152] 2. Algorithm and HyperMesh Software Automated Interaction. In HyperMesh, algorithm commands are monitored, the ID of the selected node is dynamically obtained, and its geometric center coordinates are calculated and written to a file. At the algorithm level, GUI control is implemented, using pyautogui to simulate mouse selection and button clicks. It supports automatically drawing a 10mm × 10mm selection box centered on a specified point, triggering an Enter key confirmation operation, achieving an end-to-end closed-loop process. Seamless communication with HyperMesh software is achieved through script-driven methods, automating the entire process from "selecting a node → calculating the center → creating a new node → selection operation," reducing manual intervention and shortening preprocessing time.
[0153] 3. Cross-module collaboration, visualized monitoring, and real-time feedback. A floating image window that is always on top is implemented, using tkinter + PIL display algorithms to output images. On Windows platforms, the window can be kept on top by setting HWND_TOPMOST via win32gui. A timed refresh mechanism ensures synchronized screen updates. Data sharing between modules is achieved through object attribute passing, forming a closed-loop "perception-decision-execution" chain. The integration of image display, data communication, and backend computing modules forms a floating window that displays detection results in real time, supporting dynamic updates and human-computer interaction, enhancing the system's transparency and usability.
[0154] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to computer program instructions. The aforementioned computer program can be stored in a non-volatile storage medium, and when executed, it performs the steps of the above method embodiments. Alternatively, if the integrated unit of the present invention is implemented as a software functional module and sold or used as an independent product, it can also be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the embodiments 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 non-volatile storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention.
[0155] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for creating a bolt finite element connection, characterized in that, The method includes: Bolt target detection is performed, and source data of the bolt finite element node set of the finite element model is obtained based on the target detection results; Cluster optimization is performed on the source data of the finite element node set to obtain finite element node groups belonging to the same bolt; Automated finite element connection creation is performed on the finite element node group of the same bolt.
2. The bolt finite element connection creation method according to claim 1, characterized in that, The process involves bolt target detection, and based on the detection results, obtaining the source data for the bolt finite element node set of the finite element model. This includes: Based on the target recognition and detection method, the parameters of the bolt hole and the surrounding washer in the normalized image coordinate system are obtained. Based on the normalized mapping relationship between the image coordinate system and the software graphical display interface coordinate system, the parameters of the bolt holes and the washers around the bolt holes in the software graphical display interface are obtained. The finite element nodes within the preset radius range of the parameters of the washers around the bolt holes are obtained, and the relative positions of the bolt holes and the washers around the bolt holes are verified to obtain the source data of the finite element node set.
3. The bolt finite element connection creation method according to claim 2, characterized in that, The target recognition and detection method obtains the parameters of the bolt hole and the surrounding washer in the normalized image coordinate system, including: Set up an image dataset labeled with bolt hole images for YOLO model training; The normalized coordinates and dimensions of the bounding box for each bolt hole are output based on the YOLO training model. The normalized coordinates and dimensions of the bolt hole are represented as follows: , Where, x i The normalized x-coordinate of the top-left corner of the bounding box of the bolt hole; y i The normalized ordinate of the top-left corner of the bounding box of the bolt hole; w i h represents the normalized width of the bounding box. i The height represents the normalized bounding box height; i represents the normalized bounding box coordinates and dimension data number of the bolt hole. Based on the YOLO training model, the normalized coordinates of the nodes on the washers around each bolt hole are output. The normalized coordinates of the nodes on the washers around the bolt holes are represented as follows: , Among them, y j The x-coordinate represents the normalized coordinate of the nodes on the washer surrounding the bolt hole; y j represents the ordinate of the normalized coordinates of the nodes on the washer around the bolt hole; j represents the node number on the washer around the bolt hole.
4. The bolt finite element connection creation method according to claim 2, characterized in that, The mapping relationship between the normalized image coordinate system and the software graphical display interface coordinate system is used to obtain the parameters of the bolt holes and the washers around the bolt holes within the software graphical display interface, including: Establish the software graphical display interface coordinate system ouv with the top left corner vertex as the origin o, the rightward u-axis as the positive direction, and the downward v-axis as the positive direction. Establish a mapping relationship between the normalized image coordinate system and the software graphical display interface coordinate system. The mapping relationship model is represented as follows: , Where u and v represent the u-axis and v-axis coordinates on the software's graphical display interface, respectively; H and C represent the transformation matrix; and x and y represent the x-axis and y-axis coordinates of the normalized image coordinate system, respectively. Obtain the coordinates of the lower right corner, upper right corner, lower left corner, and the midpoint between the upper left and lower right corners of the normalized image, and correspond them to the coordinates of the lower right corner, upper right corner, lower left corner, and the midpoint between the upper left and lower right corners of the software's graphical display interface, respectively. Then set them into the mapping relationship model to obtain the transformation matrices H and C. Based on the mapping relationship model and the normalized processing of bolt hole and bolt hole surrounding washer parameters in the image coordinate system, the bolt hole and bolt hole surrounding washer parameters in the software graphical display interface are obtained. The bolt hole parameters displayed in the software's graphical interface are as follows: , Among them, u k This represents the x-coordinate of the top-left vertex of the bolt hole bounding box within the software's graphical display interface; v k W represents the ordinate of the top-left vertex of the bolt hole bounding box within the software's graphical display interface. k H represents the width of the bolt hole bounding box displayed in the software image. k This indicates the height of the bolt hole bounding box displayed in the software image; k represents the bolt hole number within the graphical display interface.
5. The bolt finite element connection creation method according to claim 2, characterized in that, The process of acquiring finite element nodes within a preset radius range of the parameters of the washer surrounding the bolt hole, verifying the relative positions of the bolt hole and the washer surrounding the bolt hole, and obtaining source data for the finite element node set includes: Obtain the coverage area of the gasket around the bolt hole to obtain the radius threshold; Using the center of the bolt hole as the center, search for finite element nodes within a radius threshold range, and identify the nodes that fall within the bolt hole parameter range in the software's graphical display interface as the source data for the finite element node group.
6. The method for creating a bolt finite element connection according to claim 1, characterized in that, The clustering optimization of the source data of the finite element node set to obtain finite element node groups belonging to the same bolt includes: Obtain the original coordinates and corresponding relative coordinate offsets of all nodes in the source data of the finite element node set, and perform StandardScaler processing for feature enhancement to obtain the feature-enhanced data. A spatial neighborhood graph is constructed based on the feature-enhanced data and input into the improved GCN model with added attention mechanism—SpatialGCN—to obtain intermediate data for cluster optimization. The intermediate clustering data is optimized based on reconstruction loss and topological constraints to preserve the key features of the original nodes; Based on the elbow method and contour method dual index processing scheme, the optimal number of clusters is automatically determined, and K-means and DBSCAN are applied to realize multi-strategy clustering to obtain finite element node groups belonging to the same bolt.
7. The bolt finite element connection creation method according to claim 6, characterized in that, The spatial neighborhood graph constructed based on the feature-enhanced data is then input into the improved GCN—SpatialGCN model with an added attention mechanism—to obtain intermediate clustering optimization data, including: The improved GCN model with added attention mechanism—SpatialGCN model—includes: The input layer consists of 6-dimensional data, including the original coordinates of the nodes and their corresponding relative coordinate offsets, represented as follows: , Where x, y, and z represent the x-axis, y-axis, and z-axis coordinate values of the original node coordinates, respectively, and X, Y, and Z represent the coordinate deviation ranges relative to x, y, and z, respectively. The first convolutional layer performs convolution operations on the feature-enhanced data to obtain high-level spatial features and the relationship between each node and its spatial neighbors, transforming the feature-enhanced data into 64-dimensional data. The activation layer, based on small negative nonlinear propagation LeakyReLU (negative_slope=0.01), enhances the representation of 64-dimensional data; The attention layer feeds the enhanced 64-dimensional data into the fully connected layer, generates attention weights, obtains the importance weights of each node, and scales the node features based on Linear(64)... The Sigmoid algorithm learns node weights to highlight key nodes. The second convolutional layer performs a second convolution operation on key nodes to obtain and propagate attention-weighted node information to obtain 32-dimensional data; The output layer performs 32-dimensional data processing based on the LeakyReLU output and outputs the data to obtain intermediate data for cluster optimization.
8. The method for creating a bolt finite element connection according to claim 1, characterized in that, The dual-index processing scheme based on the elbow method and contour method automatically determines the optimal number of clusters and applies K-means and DBSCAN to achieve multi-strategy clustering, obtaining finite element node groups belonging to the same bolt, including: The dual-index processing scheme using the elbow method and contour method includes: Inertial calculations are performed on intermediate data from cluster optimization, and inertial detection is performed based on the elbow method to obtain the descent inflection point, and a suggested value K1 is output. Calculate the silhouette coefficient on the intermediate data of cluster optimization and obtain the maximum silhouette coefficient value K2; Establish a fusion decision based on the elbow method and the contour method. The fusion decision is expressed as: , Where K represents the output fusion decision, which is generated when the deviation between K1 and K2 is not higher than the threshold.
9. The method for creating a bolt finite element connection according to claim 1, characterized in that, The automated finite element connection creation of the bolts in the finite element node group of the same bolt includes: Based on HyperMesh, the detected objects are traversed to obtain objects containing bolt holes and bolt nodes, and key-value pairs are constructed. Get the nodes inside the hole, and input a set of bolt hole node objects and the spatial range of the bolt holes, and get key-value pairs where each node is located within the range of nodes inside the hole, so as to obtain key-value pairs that meet the conditions; For each node that meets the criteria, a node selection box is set as the center. All nodes corresponding to the key-value pairs that meet the criteria are obtained and connected to create finite element connection relationships.