Truss node displacement prediction methods, equipment and storage media
By using a global multi-head self-attention layer to weight and fuse graph data in truss node displacement prediction, the problem of information interaction difficulties in long-span trusses by traditional graph neural networks is solved, thus improving the accuracy of truss displacement prediction.
Patent Information
- Application Number
- CN202611545719.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-08
- Publication Date
- 2026-11-10
AI Technical Summary
Traditional graph neural networks in long-span trusses suffer from difficulties in information exchange due to the message passing mechanism of neighbor aggregation at each layer, which affects the accuracy of truss displacement prediction. Furthermore, the node features in deep networks tend to be consistent, resulting in a loss of distinguishability.
A global multi-head self-attention layer is used to weight and fuse node information in graph data. By replacing the layer-by-layer neighbor aggregation of traditional graph neural networks with a global multi-head self-attention mechanism, each node can directly interact with all other nodes in the graph, capturing long-range dependencies between any distant nodes in the truss structure.
It improves the accuracy of truss displacement prediction, avoids the problem of node features becoming too similar and losing distinguishability in deep networks, and improves the accuracy of prediction results.
Smart Images

Figure CN123069290A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of structural engineering and artificial intelligence technology, and in particular to methods, devices and storage media for predicting truss node displacements. Background Technology
[0002] Truss structures, due to their advantages such as light weight, high load-bearing capacity, and large span capacity, are widely used in large-scale infrastructure projects such as long-span bridges, stadiums, convention centers, and airport terminals. In the design and optimization of truss structures, nodal displacement calculation is a crucial step in assessing structural stiffness and verifying the rationality of the design, requiring a method for predicting nodal displacements. Therefore, graph neural networks, due to their unique graph structure data which naturally preserves the topological connections in building structures, have been gradually introduced into the field of structural engineering for the analysis of truss nodal displacements.
[0003] Currently, truss node displacement prediction based on image neural networks typically represents the truss structure as graph data, using graph convolutional networks or graph attention networks for message passing to predict the structural response. However, because traditional graph neural networks employ a layer-by-layer neighbor aggregation message passing mechanism, information propagates along the edges layer by layer. In large-span trusses, a large number of network layers need to be stacked to establish information interaction between nodes that are far apart. This causes the node features in deep networks to become consistent, losing their distinctiveness and thus affecting the accuracy of truss displacement prediction. Summary of the Invention
[0004] The main objective of this application is to provide a method, device, and storage medium for predicting truss node displacement, aiming to solve the technical problem that affects the accuracy of truss displacement prediction in current methods.
[0005] To achieve the above objectives, this application proposes a method for predicting truss node displacements, the method comprising: Obtain structural information of the truss to be predicted; Based on the structural information, the truss to be predicted is converted into graph data with nodes and components as basic units; The graph data is input into a preset displacement prediction model to obtain the node displacement of the truss to be predicted. The displacement prediction model includes a global multi-head self-attention layer, which is used to directly perform weighted fusion of node information in the graph data based on the attention weights between nodes.
[0006] In one embodiment, before the step of inputting the graph data into a preset displacement prediction model to obtain the nodal displacements of the truss to be predicted, the method further includes: Parametric modeling and finite element analysis were performed on the truss structure to obtain the modeled truss sample and the corresponding nodal displacement labels. Based on the truss structure, the truss sample is converted into graph data with nodes and components as basic units; The graph data is input into a preset training model to obtain the predicted node displacement values. Based on the predicted node displacement values and the corresponding node displacement labels, the model to be trained is trained to obtain the displacement prediction model.
[0007] In one embodiment, the step of performing parametric modeling and finite element analysis on the truss structure to obtain the modeled truss sample and the corresponding nodal displacement labels of the sample includes: Based on the preset range of structural parameter values, the initial parameter combination of the truss is generated; Based on preset engineering constraints, the initial parameter combinations are filtered to obtain filtered parameter combinations; The filtering parameter combination and the initial parameter combination are sampled to obtain the sampled parameter combination; Finite element modeling is performed on the combination of sampling parameters to obtain the modeled truss sample; Finite element analysis was performed on the truss sample to obtain the nodal displacement labels.
[0008] In one embodiment, the parameters in the screening parameter combination include the total span of the truss and the cross-sectional type of the truss members, and the engineering constraints include the total span constraint of the truss. The step of sampling the screening parameter combination and the initial parameter combination to obtain the sampled parameter combination includes: From the filtering parameter combinations, a first number of parameter combinations are sampled layer by layer for each of the cross-section types to obtain the first parameter combination; From the initial parameter combination, outside the total span constraint of the truss, a second number of parameter combinations are sampled in layers to obtain a second parameter combination, wherein the second parameter combination meets the constraints outside the total span constraint of the truss in the engineering constraints. The sampling parameter combination is obtained by combining the first parameter combination and the second parameter combination.
[0009] In one embodiment, the predicted node displacement values include longitudinal displacement prediction values and vertical displacement prediction values. The step of inputting the graph data into a preset training model to obtain the predicted node displacement values includes: Based on the feature fusion module in the model to be trained, the feature vectors of the nodes and the components are fused to obtain the fused feature vectors of each node; Based on the global multi-head self-attention layer and the fused feature vector, the feature vectors of each node are directly weighted and fused to obtain the weighted feature vector of each node; Based on the longitudinal displacement decoder and the vertical displacement decoder in the model to be trained, the weighted feature vector is decoded into the longitudinal displacement prediction value corresponding to the longitudinal displacement decoder and the vertical displacement prediction value corresponding to the vertical displacement decoder.
[0010] In one embodiment, the step of fusing the feature vectors of the nodes and the components based on the feature fusion module in the model to be trained to obtain the fused feature vectors of each node further includes: For each node to be fused in the graph data, based on the feature fusion module, the feature vector of the node to be fused is concatenated and fused with the feature vector of the component connected to the node to be fused to obtain the initial fusion vector of each node. Determine whether the dimension of the initial fusion vector is less than the preset maximum feature dimension; If the dimension is less than the maximum feature dimension, the corresponding initial fusion vector is padded with a preset padding value until the dimension of the initial fusion vector reaches the maximum feature dimension, thus obtaining the fusion feature vector.
[0011] In one embodiment, the step of directly weighting and fusing the feature vectors of each node based on the global multi-head self-attention layer and the fused feature vector to obtain the weighted feature vector of each node includes: Based on the global multi-head self-attention layer, the fused feature vector is mapped to the query vector, key vector and value vector of each node; Based on the query vector, the key vector, and the value vector, determine the attention weights between each node; For each node to be updated in the graph data, based on the attention weights between the nodes, the value vector of the node to be updated is directly weighted and fused with the value vectors of the nodes other than the node to be updated to obtain the weighted feature vector of each node.
[0012] In one embodiment, the step of converting the truss sample into graph data with nodes and components as basic units based on the truss structure includes: Based on the truss structure, determine the connection points, components, and topological connections of the truss sample; The connection points are used as nodes in the graph data. Based on the connection point parameters, the node feature vector of the node is determined. The connection point parameters include the number of intersegments, mid-span depth, upper chord slope, span, node coordinates, node equivalent mass, boundary conditions, and triaxial loads. The component is used as an edge of the graph data. Based on the component parameters of the component, the edge feature vector of the edge is determined. The component parameters include component length, horizontal plane angle, Z-axis moment of inertia, cross-sectional area, and end constraint conditions. Convert the topological connectivity into a corresponding adjacency matrix; The graph data is determined based on the nodes, the node feature vectors, the edges, the edge feature vectors, and the adjacency matrix.
[0013] In addition, to achieve the above objectives, this application also proposes a truss node displacement prediction device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the truss node displacement prediction method as described above.
[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the truss node displacement prediction method described above.
[0015] One or more technical solutions proposed in this application have at least the following technical effects: Traditional graph neural networks employ a message-passing mechanism of layer-by-layer neighbor aggregation, where information propagates along the edges. In large-span trusses, numerous network layers are needed to establish information interaction between nodes that are far apart, leading to a uniformity of node features in deep networks and a loss of distinguishability, thus affecting the accuracy of truss displacement prediction. Therefore, this application obtains the structural information of the truss to be predicted, and based on this information, converts the truss into graph data with nodes and components as basic units. The graph data is then input into a preset displacement prediction model to obtain the node displacements of the truss to be predicted.
[0016] Since the displacement prediction model of this application includes a global multi-head self-attention layer, the node information in the graph data can be directly weighted and fused through the global multi-head self-attention layer. That is, this application replaces the layer-by-layer neighbor aggregation of traditional graph neural networks with a global multi-head self-attention mechanism, enabling each node to directly interact with all other nodes in the graph. Thus, only a small number of network layers are needed to capture the long-range dependencies between any distant nodes in the truss structure, avoiding the tendency of node features to become consistent and lose distinguishability in deep networks, thereby improving the accuracy of truss displacement prediction. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] 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.
[0019] Figure 1 This is a flowchart illustrating an embodiment of the truss node displacement prediction method of this application. Figure 2 This is a schematic diagram of the truss connection method provided in Embodiment 1 of the truss node displacement prediction method of this application; Figure 3 This is a schematic diagram of the target truss model structure provided in Embodiment 1 of the truss node displacement prediction method of this application; Figure 4 A schematic diagram of the vertical displacement of the lower chord provided in Embodiment 1 of the truss node displacement prediction method of this application; Figure 5 A schematic diagram of the vertical displacement of the upper chord provided in Embodiment 1 of the truss node displacement prediction method of this application; Figure 6 This is a schematic diagram of the longitudinal displacement of the lower chord provided in Embodiment 1 of the truss node displacement prediction method of this application; Figure 7 This is a schematic diagram of the longitudinal displacement of the upper chord provided in Embodiment 1 of the truss node displacement prediction method of this application; Figure 8 This is a flowchart illustrating Embodiment 2 of the truss node displacement prediction method of this application. Figure 9 A schematic diagram of the deep learning model training process provided in Embodiment 2 of the truss node displacement prediction method of this application; Figure 10 A schematic diagram of the deep learning model structure provided in Embodiment 2 of the truss node displacement prediction method of this application; Figure 11 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the truss node displacement prediction method in the embodiments of this application.
[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0023] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or truss node displacement prediction device capable of performing the above functions. The following description uses a truss node displacement prediction device as an example to illustrate this embodiment and the subsequent embodiments.
[0024] Truss structures, due to their advantages such as light weight, high load-bearing capacity, and large span capacity, are widely used in large-scale infrastructure projects such as long-span bridges, stadiums, convention centers, and airport terminals. In the design and optimization of truss structures, nodal displacement calculation is a crucial step in evaluating structural stiffness and verifying the rationality of the design. Currently, finite element analysis is mainly used in engineering practice for truss structure analysis. This involves establishing a complete finite element model, solving large-scale stiffness matrix equations, and finally calculating the displacement response of each node under external loads.
[0025] The finite element method (FEM) is computationally time-consuming. Large-span truss structures have numerous nodes and components, and FEM analysis involves multiple steps, including modeling, stiffness matrix assembly, and solution. A single analysis can take several minutes to tens of minutes, making it difficult to meet the needs of numerous repetitive analyses in iterative optimization of engineering design. The FEM also consumes significant computational resources; high-precision FEM analysis of large structures requires high-performance computing resources, especially when nonlinear analysis is involved, further increasing computational costs.
[0026] Existing data-driven surrogate models, such as the Kriging model (a data-driven surrogate model) and neural networks, often treat the relationship between structural parameters and response as a black box mapping, ignoring the decisive influence of structural topological connections and component physical properties on mechanical response. This results in insufficient model generalization ability and difficulty in extending to structural configurations beyond the training samples.
[0027] In recent years, graph neural networks have been gradually introduced into the field of structural engineering due to their unique graph structure, which naturally preserves the topological connections in building structures. Current methods represent truss structures as graph data and use graph convolutional networks or graph attention networks for message passing to predict structural responses.
[0028] However, traditional graph neural networks employ a message-passing mechanism that aggregates neighbor relationships layer by layer, with information propagating along the edges. In large-span trusses, nodes that are far apart need to have a large number of network layers stacked to establish information interaction, which leads to the oversmoothing problem, where the features of nodes in deep networks tend to be consistent and lose their distinguishability.
[0029] Furthermore, current methods, which stack deep graph neural networks to capture long-range dependencies, bring a large number of trainable parameters, significantly increasing the training difficulty and the risk of overfitting, resulting in parameter inflation and training difficulties. Current methods mostly use node features as the main message passing mechanism, with the physical properties of components only serving as auxiliary information. This fails to fully involve the message passing mechanism, limiting the model's ability to perceive structural stiffness and leading to insufficient utilization of component features.
[0030] Based on this, embodiments of this application provide a method for predicting truss node displacement, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the truss node displacement prediction method of this application.
[0031] In this embodiment, the truss node displacement prediction method includes steps S10~S30: Step S10: Obtain the structural information of the truss to be predicted; It should be noted that a truss is a planar or spatial structural system mainly subjected to axial forces, consisting of several straight members connected at both ends in a certain manner. It is lightweight, has high load-bearing capacity, and large span capacity, and is widely used in large-scale infrastructure such as long-span bridges, stadiums, convention centers, and airport terminals. The truss to be predicted is the specific truss object whose node displacements are to be predicted in this embodiment; that is, the target truss whose displacements at each node need to be predicted, which is different from the large number of trusses used when constructing the sample dataset. Structural information describes the structural condition of a truss object, including parameters and attributes such as the truss's geometric configuration, member arrangement, and stress conditions, such as truss type, number of bays, span, end depth, mid-span depth, load magnitude, and member cross-sectional type.
[0032] Step S20: Based on the structural information, the truss to be predicted is converted into graph data with nodes and components as basic units; It should be noted that a node is the point where various members in a truss intersect and connect. In structural analysis, it is both the connection point for transmitting internal forces and loads between members and the point where displacement values need to be calculated or predicted. A member is a single member in a truss that connects two nodes and bears the load transmission function, such as the top chord, bottom chord, and various web members. Its length, cross-sectional area, moment of inertia, and end constraints jointly determine its contribution to the structural stiffness. Graphical data is data formed by representing an object in graphical form, where the object is represented by several nodes and several edges connecting these nodes. Therefore, graphical data records both which basic units constitute the object and how these basic units are interconnected.
[0033] It is understood that the object of the conversion in this embodiment is the truss to be predicted, and the result of the conversion is graph data with nodes and components as basic units. This allows the structural composition and connection relationship in the truss to be predicted, which originally existed in geometric and physical form, to be expressed as graph data with nodes and components as basic units, so that subsequent processing can directly use the nodes and components of the truss to be predicted as the processing objects.
[0034] Step S30: Input the graph data into a preset displacement prediction model to obtain the node displacement of the truss to be predicted. The displacement prediction model includes a global multi-head self-attention layer, which is used to directly perform weighted fusion of node information in the graph data based on the attention weights between nodes.
[0035] It should be noted that the displacement prediction model is a pre-built and trained model that can directly provide the displacement of each node of the truss to be predicted based on the input graph data. Internally, it consists of several network layers connected sequentially according to a predetermined structure. The graph data is processed layer by layer and finally mapped into node displacements. Node displacement is the amount of spatial change of a node in the truss relative to its original position under the action of external loads. It is usually expressed as the amount of movement of the node in a certain direction, such as longitudinal displacement and vertical displacement.
[0036] A global multi-head self-attention layer is a network layer in displacement prediction models. Its computational scope covers all nodes in the graph data, regardless of whether the nodes are directly connected. It simultaneously employs multiple attention heads to characterize the relationships between nodes from multiple different perspectives. Attention weights are numerical values used to measure the strength of the relationship between two nodes in the graph data; a larger value indicates that the previous node accounts for a larger proportion of the information represented by the subsequent node. Node information refers to the data content associated with a node in the graph data, including the node's own characteristics and the structural attributes and stress conditions it bears.
[0037] It is understood that the global multi-head self-attention layer included in the displacement prediction model of this embodiment is based on the attention weight between nodes, and directly performs weighted fusion on the node information in the graph data. The fusion range covers all nodes in the graph data, and the fusion method is direct weighting. Therefore, the node information required by any node in the graph data can be obtained directly from other nodes, without having to be relayed through intermediate nodes one by one, thereby making the node displacement of the truss to be predicted contain more complete inter-node relationships.
[0038] Furthermore, since the attention weight reflects the strength of the relationship between nodes, and the weighted fusion is based on this attention weight, the fusion result can be tilted towards nodes with stronger relationships, making the node displacement of the truss to be predicted more consistent with its actual stress state.
[0039] In one feasible implementation, the specific implementation prior to the step of inputting the graph data into a preset displacement prediction model to obtain the nodal displacements of the truss to be predicted can also be: Parametric modeling and finite element analysis were performed on the truss structure to obtain the modeled truss sample and the corresponding nodal displacement labels. Based on the truss structure, the truss sample is converted into graph data with nodes and components as basic units; The graph data is input into a preset training model to obtain the predicted node displacement values. Based on the predicted node displacement values and the corresponding node displacement labels, the model to be trained is trained to obtain the displacement prediction model.
[0040] It should be noted that parametric modeling is a modeling method that describes trusses in the form of parameters and generates truss models accordingly. This involves first setting a set of structural parameters such as truss type, number of bays, span, end depth, mid-span depth, load magnitude, and member cross-section types. These parameters then automatically generate corresponding truss models, allowing for batch generation of truss models depending on the values of the structural parameters. Finite element analysis, on the other hand, is an analytical method that discretizes a structure into a finite number of elements and nodes, and obtains the structural response under external loads by establishing and solving the corresponding equations.
[0041] A truss sample is a single truss model obtained through parametric modeling and can be used as training material. One truss sample corresponds to a truss generated under a set of structural parameter values. Nodal displacement labels are the actual values of the displacements of each node in the truss sample, used as a reference for model training, and are usually extracted after finite element analysis. The model to be trained is a model that has not yet completed training, and its internal parameters are still in their initial state. During training, its parameters need to be continuously adjusted based on the input graphical data and the corresponding nodal displacement labels. The predicted nodal displacement values are the values of each node displacement calculated by the model to be trained based on the input graphical data. These are the output results of the model to be trained and need to be compared with the nodal displacement labels.
[0042] It is understood that this implementation method trains the model based on the predicted node displacement values output by the model to be trained and the node displacement labels obtained from finite element analysis, so that the parameter adjustment of the model to be trained has corresponding reference values, and the training is carried out in the direction of reducing the difference between the predicted node displacement values and the node displacement labels.
[0043] In one feasible implementation, the specific implementation of parametric modeling and finite element analysis of the truss structure to obtain the modeled truss sample and the corresponding nodal displacement labels of the sample can also be: Based on the preset range of structural parameter values, the initial parameter combination of the truss is generated; Based on preset engineering constraints, the initial parameter combinations are filtered to obtain filtered parameter combinations; The filtering parameter combination and the initial parameter combination are sampled to obtain the sampled parameter combination; Finite element modeling is performed on the combination of sampling parameters to obtain the modeled truss sample; Finite element analysis was performed on the truss sample to obtain the nodal displacement labels.
[0044] It should be noted that the range of structural parameter values is a pre-defined interval or set used to limit the allowable values of various structural parameters of the truss. For example, the number of bays can be 4 to 6, the total span can be 16m to 48m, the end depth can be 1.6m to 4.8m, and the load can be 30kN to 50kN. It defines the boundaries of the structural parameter values during parametric modeling. A parameter combination is a set of structural parameters that are simultaneously assigned a fixed value. That is, it is a set of values formed by taking one value for each of the structural parameters such as truss type, number of bays, span, end depth, mid-span depth, load magnitude, and member section type.
[0045] The initial parameter combination is generated based on the range of structural parameter values and has not yet been screened by engineering constraints. Engineering constraints are pre-set conditions to ensure the generated truss conforms to actual engineering construction and stress rationality. Examples include a difference of less than two spans between the left and right sides, a height-to-span ratio controlled between 1 / 12 and 1 / 8, a bracing angle controlled between 30° and 55°, and a chord length not exceeding one-tenth of the total span. The screened parameter combination is the portion of the initial parameter combination that satisfies all engineering constraints and is therefore retained.
[0046] Sampling parameter combinations are parameter combinations obtained by sampling the selected parameter combinations and initial parameter combinations. In other words, they are a subset of parameter combinations chosen from these for use in subsequent finite element modeling. Finite element modeling is the process of establishing a corresponding finite element model based on a given parameter combination. This involves converting structural parameters into model information such as elements, nodes, materials, sections, and boundary conditions required for finite element analysis, thereby forming a model that can be solved by finite element analysis.
[0047] In its specific implementation, this embodiment covers seven different web member arrangements and member end constraints, including various connection methods such as rigid chord connections, hinged web member connections, and fully rigid connections. For details, please refer to [reference needed]. Figure 2 .
[0048] For the training and validation sets, the specific parameters of the parameterized generative model are as follows: the number of intersegments ranges from 4 to 6; the total span ranges from 16m to 48m; the end depth ranges from 1.6m to 4.8m with a step size of 1.6m; the mid-span depth ranges from 1.6m to 4.8m with a step size of 1.6m; the difference in the number of intersegments between the left and right sides does not exceed 2; the load ranges from 30 kN to 50 kN with a step size of 1 kN; and the component cross-section types include 8 types of component cross-sections.
[0049] The structural parameters were further screened based on preset engineering constraints. These constraints included: a difference of less than two spans between the left and right sides, a height-to-span ratio controlled between 1 / 12 and 1 / 8, a bracing angle controlled between 30° and 55°, and a chord length not exceeding one-tenth of the total span. After screening, over 100,000 parameter combinations were obtained. A stratified sampling method based on the K-Means (K-Means Clustering Algorithm) clustering algorithm was used to sample these parameter combinations, selecting 500 training samples for each truss type, generating a total of 3,500 training samples. In addition, 700 models with total spans ranging from 49m to 64m were generated as an extrapolation dataset.
[0050] Generate finite element model (DAT) files for each truss model as input files for finite element software (such as NIDA). Simultaneously, generate JSON (JavaScript Object Notation) files containing structural information for subsequent conversion into graphical structural data. Perform structural analysis on the finite element model DAT files using finite element software (such as NIDA), extracting the longitudinal and vertical displacements of each node in each model under static loads, and exporting the displacement results in CSV (Comma-Separated Values) format.
[0051] Understandably, this implementation method sequentially generates initial parameter combinations, filters to obtain filtered parameter combinations, samples to obtain sampled parameter combinations, performs finite element modeling to obtain truss samples, and performs finite element analysis to obtain nodal displacement labels. This allows truss samples and nodal displacement labels to be generated in batches, eliminating the need for manual truss assembly and calculation. Since the filtered parameter combinations are obtained after screening the initial parameter combinations based on engineering constraints, the parameter combinations entering the finite element modeling stage are constrained by these constraints in terms of engineering structure and stress rationality, preventing parameter combinations that are clearly inconsistent with engineering reality from being used to generate truss samples.
[0052] In one feasible implementation, the parameters in the screening parameter combination include the total span of the truss and the cross-sectional type of the truss members, and the engineering constraints include the total span constraint of the truss. A further implementation of sampling the screening parameter combination and the initial parameter combination to obtain the sampled parameter combination may be: From the filtering parameter combinations, a first number of parameter combinations are sampled layer by layer for each of the cross-section types to obtain the first parameter combination; From the initial parameter combination, outside the total span constraint of the truss, a second number of parameter combinations are sampled in layers to obtain a second parameter combination, wherein the second parameter combination meets the constraints outside the total span constraint of the truss in the engineering constraints. The sampling parameter combination is obtained by combining the first parameter combination and the second parameter combination.
[0053] It should be noted that the total span of a truss is the length of the truss along the spanning direction, that is, the horizontal distance between the two supports at the ends of the truss. Section type refers to the shape and specification category of the cross-section of the truss member, such as different shapes and sizes like I-beams, box-shaped sections, and circular tube sections. The total span constraint restricts the range of values for the total truss span, limiting the allowed interval within which the total truss span can fall.
[0054] Stratified sampling is a sampling method that first divides the object to be sampled into several layers according to a certain characteristic, and then extracts samples from each layer. Its purpose is to ensure that the sampling results are evenly distributed between layers. The first quantity is a preset number of parameter combinations to be extracted for each cross-section type. The first parameter combination is the parameter combination obtained after stratifying and sampling the first quantity of parameters by cross-section type from the selected parameter combinations. The second quantity is a preset number of parameter combinations to be extracted outside the total span constraint of the truss. The second parameter combination is the parameter combination obtained after stratifying and sampling the second quantity of parameters outside the total span constraint of the truss from the initial parameter combinations. This parameter combination meets the other constraints in the engineering constraints besides the total span constraint of the truss.
[0055] It is understood that the first parameter combination in this embodiment is obtained by sampling the first quantity of each section type in the screening parameter combination in a hierarchical manner. The sampling is carried out separately for each section type, so that the proportion of each section type in the first parameter combination does not decrease due to the small quantity of a certain section type in the screening parameter combination, thereby making the first parameter combination evenly distributed across the section types.
[0056] The second parameter combination is obtained by sampling in layers outside the total span constraint of the truss from the initial parameter combination. Its total span of the truss exceeds the range limited by the total span constraint of the truss, while also meeting other constraints outside of that constraint. This allows the range of the total span of the truss covered by the sampling parameter combination to exceed the range limited by the total span constraint of the truss, so that the truss samples obtained by finite element modeling of the sampling parameter combination have a larger distribution range in the total span of the truss.
[0057] In one feasible implementation, the specific implementation of converting the truss sample into graph data with nodes and components as basic units based on the truss structure can also be: Based on the truss structure, determine the connection points, components, and topological connections of the truss sample; The connection points are used as nodes in the graph data. Based on the connection point parameters, the node feature vector of the node is determined. The connection point parameters include the number of intersegments, mid-span depth, upper chord slope, span, node coordinates, node equivalent mass, boundary conditions, and triaxial loads. The component is used as an edge of the graph data. Based on the component parameters of the component, the edge feature vector of the edge is determined. The component parameters include component length, horizontal plane angle, Z-axis moment of inertia, cross-sectional area, and end constraint conditions. Convert the topological connectivity into a corresponding adjacency matrix; The graph data is determined based on the nodes, the node feature vectors, the edges, the edge feature vectors, and the adjacency matrix.
[0058] It should be noted that a connection point is the location where various components in a truss intersect and connect, that is, the point where the ends of the components converge. In the structure, it plays a role in transferring internal forces between the components. Topological connections refer to the correspondence between the various connection points in a truss through the connections between components; that is, which connection point is directly connected to which other connection point by a component, and the relative positional relationship of each connection point within the entire truss. Connection point parameters are various parameters used to describe the condition of the connection point itself; their values collectively characterize the location of the connection point within the truss, the constraints it is subject to, and the loads it bears.
[0059] A node feature vector is an ordered numerical sequence formed by connection point parameters, where each element corresponds to a parameter in the connection point parameters, used to numerically represent the characteristics of a node. The number of spans is the number of segments into which the truss is divided along the span direction; that is, how many spans the truss is divided into in the span direction. The mid-span depth is the height of the truss at the mid-span position, that is, the vertical distance between the top and bottom chords at the center of the span. The top chord slope is the degree of inclination of the top chord relative to the horizontal direction, where the top chord is the chord member arranged along the span direction in the upper part of the truss.
[0060] Node coordinates are the spatial coordinates of a connection point, used to indicate its spatial location within the truss. Node equivalent mass is the mass reduced and concentrated at a single node; that is, the mass obtained by attributing the mass of all associated components to that node according to the principle of equivalence. Boundary conditions describe whether a node is constrained in each direction and what kind of constraints it is subject to. Triaxial loads are loads acting on a node in three directions; that is, the magnitude of the external loads borne by that node in the three directions.
[0061] An edge is a line connecting two nodes in graph data, indicating a direct connection between them. Component parameters are various parameters describing the condition of a component; their values collectively characterize the component's geometric dimensions and cross-sectional mechanical properties. An edge eigenvector is an ordered numerical sequence formed by the component parameters, where each element corresponds to a parameter in the component parameter set, used to numerically represent the characteristics of an edge. Component length is the distance between the two ends of the component along its axial direction, and the horizontal angle is the angle of inclination of the component's axis relative to the horizontal plane. The Z-axis moment of inertia is the moment of inertia of the component's cross-section about its centroidal axis in the vertical direction, reflecting the cross-section's resistance to bending deformation.
[0062] Cross-sectional area is the area covered by the cross-section of a component. End constraints are the connection methods between the two ends of a component and adjacent components or supports, such as hinged or rigid connections. An adjacency matrix is a square matrix used to represent the connection relationships between nodes in graph data. Its rows and columns correspond to the nodes in the graph data, and the values of the matrix elements indicate whether there is a connection between the corresponding two nodes.
[0063] In this specific implementation, each connection node of the truss structure is treated as a node of the graph, and each structural component is treated as an edge of the graph, thus constructing a graph data structure with components as edges.
[0064] For each node, a 16-dimensional node feature vector is constructed. As shown in Table 1, it includes: the number of internodes on the left and right sides (2-dimensional), mid-span depth (1-dimensional), top chord slope (2-dimensional), total span (1-dimensional), three-dimensional spatial coordinates of the node (3-dimensional), node equivalent mass (1-dimensional), boundary constraints in three directions (3-dimensional), and external loads in three directions (3-dimensional).
[0065] Table 1: Node Feature Vectors
[0066] For each edge, a 6-dimensional edge feature vector is constructed. As shown in Table 2, it includes: component length (1D), angle between the component and the horizontal plane (1D), moment of inertia about the Z-axis (1D), cross-sectional area of the component (1D), and constraints at both ends (2D). The topological connections between nodes are stored using an adjacency matrix. The imported JSON file containing structural information is converted into a PT file suitable for training deep learning models using the graph data construction module.
[0067] Table 2: Component Feature Vectors
[0068] It is understood that this implementation determines the node feature vector based on the connection point parameters of the connection points and the edge feature vector based on the component parameters of the components. Both nodes and edges are assigned numerical features formed by the actual structural parameters. Thus, when the graph data represents the truss sample, it not only records which connection points and which components exist, but also records the attribute values of these connection points and components. Furthermore, this implementation converts the topological connection relationship into a corresponding adjacency matrix. This allows the connection relationship between connection points in the truss sample formed by components to be expressed as the element values in the adjacency matrix. This enables the connection relationship to be stored in the same graph data as the nodes and edges, thereby ensuring that the content expressed by the graph data is consistent with the actual structure of the truss sample.
[0069] In one embodiment, comparative experiments were also conducted, comparing this embodiment with existing graph convolutional networks, graph attention networks, graph isomorphic networks, and StructGNN (Structural Graph Neural Network) under the same conditions; all baseline models employed 13 information transfer layers to ensure equivalent receptive fields. This embodiment also compared the performance of TrussGGA (Truss Global Graph Attention) models with different numbers of layers. The experiments were conducted on a workstation equipped with an Intel Core i7-5800H CPU and an NVIDIA RTX 3050 Ti GPU.
[0070] After training, two evaluation metrics were used: Corrected Mean Relative Accuracy (MMRA) and overall pass rate. The Corrected Mean Relative Accuracy (MMRA) refers to the relative error used for label data larger than 1 mm and the absolute error used for label data smaller than 1 mm. Specifically... The calculation formula is:
[0071] Where n is the total number of nodes, i.e., the number of all connection nodes in the truss structure. m is the number of displacement directions; in this embodiment, both longitudinal and vertical displacements are predicted. i is the node index, and j is the displacement direction index. This represents the error term of the i-th node in the j-th displacement direction.
[0072] Error terms in this embodiment The calculation formula is:
[0073] in, The value of the actual displacement of the i-th node in the j-th displacement direction is obtained by finite element analysis. The predicted displacement value of the i-th node in the j-th displacement direction is output by the model. This is the absolute value of the actual displacement. This refers to the absolute error between the predicted displacement and the actual displacement.
[0074] In this embodiment, the overall pass rate refers to the following: for label data smaller than 1mm, if the absolute error is less than 1mm, the predicted data is considered passable; otherwise, it is considered failable. For label data larger than 1mm, if the relative error is less than 5%, the predicted data is considered passable; otherwise, it is considered failable. The formula for calculating the overall pass rate in this embodiment is:
[0075] Wherein, OPR (Overall Pass Rate) represents the proportion of prediction results that pass in all displacement directions for all nodes, with a value ranging from 0 to 1, the closer to 1, the higher the prediction pass rate. n is the total number of nodes, that is, the number of all connecting nodes in the truss structure. m is the number of displacement directions, in this embodiment, the longitudinal and vertical displacement directions are predicted. i is the node index, and j is the displacement direction index. Let be the passage indicator variable for the i-th node in the j-th displacement direction. The specific calculation formula is as follows:
[0076] in, The predicted displacement value of the i-th node in the j-th displacement direction is output by the model. This is the absolute value of the actual displacement. This is the absolute value of the relative error.
[0077] The specific comparison results on the validation set in this embodiment can be found in Table 3.
[0078] Table 3: Performance Comparison of Models on the Validation Set
[0079] In Table 3, TrussGGA (Truss Global Graph Attention) is the model used in this embodiment, GCN (Graph Convolutional Network) is a graph convolutional network, GAT (Graph Attention Network) is a graph attention network, GIN (Graph Isomorphism Network) is a graph isomorphism network, and StructGNN (Structural Graph Neural Network) is a structural graph neural network. The coefficient of determination is RMSE (Root Mean Square Error). For longitudinal displacement, This represents vertical displacement.
[0080] As shown in Table 3, the corrected mean relative accuracy (MMRA) reaches 97.93% for longitudinal displacement and 98.31% for vertical displacement; the mean absolute error is 0.2 mm; 95% of the absolute errors are less than 0.8 mm; the overall pass rate is 89.45% for longitudinal displacement and 92.91% for vertical displacement. All indicators outperform baseline methods such as graph convolutional networks, graph attention networks, graph isomorphic networks, and StructGNN. Furthermore, this embodiment also evaluates the model's extrapolation generalization ability. In extrapolation tests on ultra-large span trusses (49m to 64m) not previously seen, the predicted corrected mean relative accuracy still remains above 77%, demonstrating that the present invention possesses good cross-distribution generalization ability.
[0081] Furthermore, this embodiment compares models with different numbers of layers, as shown in Table 4.
[0082] Table 4: Performance Comparison of TrussGGA Models with Different Layer Numbers
[0083] As shown in Table 4, the overall performance of the model on the validation set and extrapolation set is optimal in this embodiment when the number of information transmission layers is 2.
[0084] In one embodiment, the structural parameters of a 48m target span truss are constructed using graphical data and feature extraction according to the process described in this embodiment. The data is then input into a trained model, which outputs predicted longitudinal and vertical displacements for all nodes within 0.5 seconds. The target span truss in this embodiment can be referenced... Figure 3 The analysis of the prediction results can be referred to Figures 4 to 7 ,in, Figure 4 This represents the vertical displacement result of the lower chord. Figure 5 This represents the vertical displacement result of the upper chord. Figure 6 This represents the longitudinal displacement result of the lower chord. Figure 7 This represents the longitudinal displacement result of the upper chord. Based on... Figures 4 to 7 As can be seen, the model still performs well in predicting unknown models and can predict the overall trend. Outputting this data as a standard CSV file can be used for subsequent calculations of structural internal forces, applicable to projects requiring rapid structural analysis results, such as structural optimization processes and structural health monitoring.
[0085] In summary, traditional graph neural networks employ a layer-by-layer neighbor aggregation message passing mechanism, where information propagates along the edges layer by layer. In large-span trusses, a large number of network layers need to be stacked to establish information interaction between nodes that are far apart. This causes the node features in deep networks to become consistent, losing their distinctiveness and affecting the accuracy of truss displacement prediction. Therefore, this embodiment obtains the structural information of the truss to be predicted, and based on this structural information, converts the truss to be predicted into graph data with nodes and components as basic units. The graph data is then input into a preset displacement prediction model to obtain the node displacements of the truss to be predicted.
[0086] Since the displacement prediction model in this embodiment includes a global multi-head self-attention layer, the node information in the graph data can be directly weighted and fused through this layer. That is, this embodiment replaces the layer-by-layer neighbor aggregation of traditional graph neural networks with a global multi-head self-attention mechanism, allowing each node to directly interact with all other nodes in the graph. This requires only a small number of network layers to capture the long-range dependencies between any distant nodes in the truss structure, avoiding the uniformity of node features and loss of distinguishability in deep networks, thereby improving the accuracy of truss displacement prediction.
[0087] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 8 The predicted node displacement values include longitudinal displacement prediction values and vertical displacement prediction values. The step of inputting the graph data into a preset training model to obtain the predicted node displacement values further includes steps S100~S300: Step S100: Based on the feature fusion module in the model to be trained, the feature vectors of the nodes and the components are fused to obtain the fused feature vectors of each node; It should be noted that the longitudinal displacement prediction value is the displacement prediction value output by the model to be trained for each node along the truss span direction, that is, the prediction result of the positional change of the node along the longitudinal direction of the truss. The vertical displacement prediction value is the displacement prediction value output by the model to be trained for each node along the vertical direction, that is, the prediction result of the positional change of the node along the vertical direction. The feature fusion module is a component within the model to be trained, used to aggregate the feature vectors of the components associated with the node onto the node. Its processing objects are the node's own feature vector and the feature vectors of the components associated with the node, and its output is the aggregated feature vector of the node. The fused feature vector is the feature vector formed by aggregating the node's own node feature vector and the edge feature vectors of the components associated with the node through the feature fusion module, which contains information about the node itself and the components associated with the node.
[0088] It is understood that in this embodiment, the feature vectors of nodes and components are fused by the feature fusion module in the model to be trained. The objects involved in the fusion include both the node itself and the components associated with the node, so that the fused feature vectors of each node contain information about the node itself and information about the components associated with the node.
[0089] In one feasible implementation, the specific implementation of fusing the feature vectors of the nodes and the components based on the feature fusion module in the model to be trained to obtain the fused feature vectors of each node can also be: For each node to be fused in the graph data, based on the feature fusion module, the feature vector of the node to be fused is concatenated and fused with the feature vector of the component connected to the node to be fused to obtain the initial fusion vector of each node. Determine whether the dimension of the initial fusion vector is less than the preset maximum feature dimension; If the dimension is less than the maximum feature dimension, the corresponding initial fusion vector is padded with a preset padding value until the dimension of the initial fusion vector reaches the maximum feature dimension, thus obtaining the fusion feature vector.
[0090] It should be noted that the node to be fused is the node in the graph data currently being processed by the feature fusion module, where its own feature vector is to be fused with the feature vectors of its connected components. Each node in the graph data is processed sequentially as a node to be fused. The initial fusion vector is the feature vector obtained by concatenating and fusing the feature vectors of the node to be fused with the feature vectors of the components connected to it. It has not yet undergone dimensional unification processing, and its dimension varies with the number of connected components. The maximum feature dimension is a pre-set upper limit used to unify the dimension of the feature vectors of all nodes; the feature vectors of each node will ultimately reach this dimension. The preset padding value is a pre-set value used to fill in any missing dimensions in the initial fusion vector to ensure that its dimension reaches the maximum feature dimension.
[0091] In this implementation, the dataset, already converted into a graph structure, is aggregated using a node-component feature fusion module. For each node, its 16-dimensional feature vector is concatenated and fused with the 6-dimensional edge feature vectors of all components connected to that node. In this embodiment, a single node can be set to connect to a maximum of 5 components, therefore the fused node feature vector has a dimension of 16 + 6 × 5 = 46. For nodes connected to fewer than 5 components, zero-padding is used to bring them to a uniform dimension.
[0092] It is understood that in this implementation, the feature vector of the node to be fused is spliced and fused with the feature vector of the component connected to the node to be fused to obtain an initial fused vector. The objects involved in splicing are limited to the components connected to the node to be fused, so that the obtained initial fused vector corresponds to the actual connection situation of the node to be fused in the graph data, and the information of its connected components is included in the feature vector of the node.
[0093] Since the number of connected components among nodes in the graph data is not the same, this implementation method, after obtaining the initial fusion vector, also determines whether its dimension is less than the preset maximum feature dimension. If it is less than the maximum feature dimension, it is padded with a preset padding value until the maximum feature dimension is reached. This allows the initial fusion vectors corresponding to nodes with fewer connected components to be filled in, and the fusion feature vectors of each node are unified to the maximum feature dimension. By unifying the fusion feature vectors of each node to the same maximum feature dimension, the fusion feature vectors of each node in the graph data can participate in the processing of the model to be trained in the same form, avoiding the inability to process the fusion feature vectors of each node together due to their varying dimensions.
[0094] Step S200: Based on the global multi-head self-attention layer and the fused feature vector, the feature vectors of each node are directly weighted and fused to obtain the weighted feature vector of each node; It should be noted that the weighted feature vector is the feature vector obtained by weighted fusion of nodes in the global multi-head self-attention layer. That is, the feature vector of a node is formed by weighting and summing the feature vectors of other nodes in the graph according to the attention weights between nodes, and is used to replace the original feature vector of the node and continue to participate in subsequent processing.
[0095] It is understood that this implementation method performs weighted fusion based on both the global multi-head self-attention layer and the fusion feature vector. The fusion feature vector that participates in the weighted fusion already contains information about the node itself and the components is used. The global multi-head self-attention layer that performs the weighted fusion covers all nodes in the graph data. As a result, the weighted feature vector contains information about the node itself and its associated components, as well as information about other nodes in the graph data. This allows information from different sources to be aggregated in the same feature vector.
[0096] Furthermore, since weighted fusion directly processes the feature vectors of each node, the feature vector of any node in the graph data can directly enter the weighted feature vectors of other nodes. This eliminates the need for intermediate nodes to relay information, allowing information from distant nodes to directly enter the same weighted feature vector. Moreover, weighted fusion is based on attention weights between nodes, which reflect the strength of the connections between nodes. This ensures that the resulting weighted feature vectors are biased towards nodes with stronger connections, making the node connections reflected in the weighted feature vectors more closely reflect reality.
[0097] In one feasible implementation, the specific implementation of directly weighting and fusing the feature vectors of each node based on the global multi-head self-attention layer and the fused feature vector to obtain the weighted feature vector of each node can also be: Based on the global multi-head self-attention layer, the fused feature vector is mapped to the query vector, key vector and value vector of each node; Based on the query vector, the key vector, and the value vector, determine the attention weights between each node; For each node to be updated in the graph data, based on the attention weights between the nodes, the value vector of the node to be updated is directly weighted and fused with the value vectors of the nodes other than the node to be updated to obtain the weighted feature vector of each node.
[0098] It should be noted that the query vector, obtained by mapping the fused feature vector of a node to the global multi-head self-attention layer, represents the degree to which a node explores connections with other nodes. It is used for comparison with the key vectors of nodes other than that node. The key vector, obtained by mapping the fused feature vector of a node to the global multi-head self-attention layer, represents the attributes of that node that can be compared with other nodes. It is used for comparison with the query vectors of each node. The value vector, obtained by mapping the fused feature vector of a node to the global multi-head self-attention layer, represents the information content that the node actually contributes to other nodes. It is the object that is weighted and summarized after the attention weights are determined. The node to be updated is the node in the graph data whose value vector is currently being weighted and fused according to the attention weights between nodes to update its feature vector. Each node in the graph data is processed as a node to be updated in turn.
[0099] In this implementation, after aggregation, the fused 46-dimensional node feature vector is input into the encoder. The encoder is a single-layer perceptron that maps the 46-dimensional features into a 128-dimensional unified-dimensional node latent vector. The node latent vector is then input into a global multi-head self-attention layer. In this embodiment, the global multi-head self-attention layer has two layers and eight attention heads. Each layer adopts a pre-layer normalization structure, sequentially performing layer normalization, multi-head self-attention calculation, Dropout (random deactivation) layer, residual connection, and ReLU (Rectified Linear Unit) activation. In the multi-head self-attention mechanism, each head calculates the attention weight between any two nodes by scaling the dot product attention, with the specific formula as follows:
[0100] in, These are the calculated attention weights. and Let i be the query vector and key vector for node i and node j, respectively. In this embodiment, the feature dimension for each attention head is set to 16 dimensions. Based on the calculated attention weights, the value vectors of all nodes in the graph are weighted and summed to update the feature representation of each node.
[0101] It is understood that in this embodiment, for each node to be updated in the graph data, the weighted fusion involves the value vector of the node to be updated and the value vectors of all other nodes in the graph data. This weighted fusion is performed directly, allowing the value vector of the node to be updated to be directly aggregated with the value vector of any other node in the graph data, without needing to be relayed through intermediate nodes. Furthermore, since the weighted fusion is based on the attention weights between nodes, and these attention weights reflect the strength of the correlation between nodes, the value vectors of all other nodes are incorporated into the weighted feature vector of the node to be updated according to their corresponding attention weights, thus tilting the weighted feature vector towards nodes with stronger correlations.
[0102] Step S300: Based on the longitudinal displacement decoder and the vertical displacement decoder in the model to be trained, the weighted feature vector is decoded into the longitudinal displacement prediction value corresponding to the longitudinal displacement decoder and the vertical displacement prediction value corresponding to the vertical displacement decoder.
[0103] It should be noted that the longitudinal displacement decoder is a separate component from the vertical displacement decoder in the model to be trained, used to output the predicted longitudinal displacement values. It takes a weighted feature vector as input and transforms the weighted feature vector into the predicted displacement values of each node along the longitudinal direction of the truss. Similarly, the vertical displacement decoder is a separate component from the longitudinal displacement decoder in the model to be trained, used to output the predicted vertical displacement values. It takes a weighted feature vector as input and transforms the weighted feature vector into the predicted displacement values of each node along the vertical direction.
[0104] In this implementation, the updated node features are input into the decoder. The decoder includes two independent multilayer perceptrons, used to predict longitudinal and vertical displacements respectively. Each decoder contains a single hidden layer perceptron, where the hidden layer uses the ReLU activation function to introduce a nonlinear transformation, and the output layer is a linear mapping, outputting the predicted displacement values of each node in the longitudinal and vertical directions. The specific model training process is as follows: Figure 9 As shown, the specific model structure is as follows: Figure 10 As shown.
[0105] During model training, the entire dataset is randomly divided into training and validation sets in a 9:1 ratio. Mean squared error is used as the loss function, and the specific formula for the loss function is as follows:
[0106] Where N is the total number of nodes. This is the reference value for the i-th node in the j-th displacement direction. This corresponds to the predicted value. The training process uses the AdamW optimizer with an initial learning rate of 10. -3 The weight decays to 5. 10 -4 The learning rate is dynamically adjusted using the ReduceLROnPlateau strategy; the training loss function is the mean square error between the predicted displacement and the reference displacement; the training is conducted for 500 epochs, during which the average accuracy and average loss metrics are monitored on the validation set, and the weights of the best-performing model are saved; an early stopping mechanism is used to achieve convergence in about 150 epochs.
[0107] It is understood that this implementation decodes the weighted feature vector into longitudinal and vertical displacement prediction values based on the longitudinal and vertical displacement decoders, respectively. Each decoder deals with the same weighted feature vector and provides the displacement prediction value in its respective direction, thus ensuring that the displacement prediction values of a node in the longitudinal and vertical directions are output by their corresponding decoders. Furthermore, since both the longitudinal and vertical displacement decoders decode weighted feature vectors formed based on information interaction between nodes, the resulting longitudinal and vertical displacement prediction values are built upon information directly aggregated from the nodes in the graph data, ensuring that the displacement prediction values in both directions carry the correlation between nodes.
[0108] In one embodiment, the step of directly weighting and fusing the feature vectors of each node based on the global multi-head self-attention layer and the fused feature vector to obtain the weighted feature vector of each node further includes: Based on the global multi-head self-attention layer and the fused feature vector, the attention weights between each node are determined, and the feature vectors of each node are weighted and fused based on the attention weights to obtain the intermediate weighted feature vector of each node. For each edge in the graph data, the sharing ratio of the edge to the nodes at both ends of the edge is determined based on the end constraint conditions of the edge, and the edge feature vector of the edge is updated based on the sharing ratio and the intermediate weighted feature vector of each node at both ends of the edge, so as to obtain the updated edge feature vector. For each node in the graph data, based on the sharing ratio, the updated edge feature vectors of each edge connected to the node are weighted and merged, and then concatenated with the intermediate weighted feature vector of the node to obtain the weighted feature vector of each node.
[0109] It should be noted that the intermediate weighted feature vector is the feature vector obtained by weighting and fusing the feature vectors of each node through a global multi-head self-attention layer according to attention weights. It already contains information about other nodes in the graph data, but has not yet been combined with the updated edge feature vector. The sharing ratio is a numerical value used to measure how much information a given edge shares between the nodes at its two ends. It is determined based on the end constraints of the edge, which can be directly given by the value corresponding to the end constraints, or determined by the ratio of the line stiffness of the edge to the sum of the line stiffnesses of the edges connected to its two ends. The updated edge feature vector is the edge feature vector obtained by writing back the intermediate weighted feature vectors of the nodes at both ends of the edge. In addition to the original component information, it also contains the global information carried by the intermediate weighted feature vectors of the nodes at both ends of the edge.
[0110] It is understandable that this implementation, after obtaining the intermediate weighted feature vectors of each node, further determines the sharing ratio for each edge in the graph data based on its end constraints, and updates the edge feature vector based on the sharing ratio and the intermediate weighted feature vectors of the nodes at both ends of the edge. This ensures that the information at the edge level includes not only the original component information but also the global information carried by the intermediate weighted feature vectors of its two end nodes, thus allowing the information interaction results between nodes to be preserved through the components. Since the updated edge feature vectors are ultimately weighted and merged based on the sharing ratio and concatenated with the intermediate weighted feature vector of the node to form the weighted feature vectors of each node, and the sharing ratio is determined based on the end constraints, the influence of each edge connected to the same node on the node's weighted feature vector is differentiated by the different end constraints, thereby enabling the weighted feature vectors to accurately reflect the connection method of the components at that node.
[0111] In one embodiment, the step of determining the weight-sharing ratio of each edge in the graph data based on the edge's end constraints, and updating the edge feature vector based on the weight-sharing ratio and the respective intermediate weighted feature vectors of the edge's two ends, to obtain the updated edge feature vector, further includes: For each edge in the graph data, based on the end constraints at both ends of the edge, the acceptance weights at each end of the edge are determined respectively. For each end of the edge, based on the acceptance weight of that end, the intermediate weighted feature vector of the node at that end is compared with the intermediate weighted feature vector of the node at the other end of the edge to obtain the difference features of that end, and the sharing ratio of that end to the edge is determined based on the acceptance weight of that end. The difference features at both ends of the edge are concatenated with the original edge feature vector to obtain the updated edge feature vector.
[0112] It should be noted that the acceptance weight is a numerical value used to measure the degree to which the information carried by a node at one end of an edge is accepted when determining the information of that edge. It is determined based on the end constraint conditions at that end; for example, a larger value is used for the side with a rigid connection, and a smaller value is used for the side with a hinged connection. It can also be determined based on the sum of the linear stiffness of all edges connected to that end, or based on the number of components connected to that end. The difference feature is obtained by comparing the weighted feature vector of the middle node at one end of an edge with the weighted feature vector of the middle node at the other end of the edge according to the acceptance weight of that end. It characterizes the difference between the two nodes of the edge, and the value of this difference varies with the relative magnitude of the acceptance weights at the two ends.
[0113] It is understandable that in this embodiment, the feature vector concatenated to the original edge is the difference feature. This difference feature is obtained by weighted comparison of the intermediate weighted feature vectors of the nodes at both ends of the edge. Therefore, the information entering the edge is no longer the intermediate weighted feature vectors of the nodes at both ends themselves, but the difference between the two ends after comparison. Thus, the edge carries the difference between the nodes at both ends. Furthermore, since the acceptance weight of the edge is determined based on the end constraints of the two ends of the edge, and the difference features of each end are derived according to their respective acceptance weights, the difference observed from the two ends of the same component has different emphases due to the different end constraints. This allows the updated edge feature vector to reflect the difference in constraint methods at the two ends of the component.
[0114] In this embodiment, each end of an edge generates a difference feature, which is then concatenated with the original edge feature vector to form an updated edge feature vector. The responsibility for merging back to the node is also determined by the acceptance weight of that end. This allows the information of the component itself and the differences between the nodes at both ends of the edge to be transmitted back to the node, ensuring that the weighted feature vector obtained by the node contains the differences between the two ends of its surrounding components. Furthermore, since the differences in the truss directly correspond to the deformation produced by the component, the difference features at both ends of the edge are derived and retained separately. This allows the influence exerted by the component on its two end nodes to be reflected separately when the constraint methods at both ends of the component are different, thereby improving the accuracy of truss displacement prediction.
[0115] In summary, this embodiment first uses a feature fusion module to concatenate and fuse the feature vector of the node to be fused with the feature vector of the component connected to the node. When the dimension of the initial fused vector is less than the preset maximum feature dimension, it is filled to the maximum feature dimension based on a preset filling value. This allows the information of the component connected to the node to be incorporated into the node in the form of a fused feature vector, and the fused feature vectors of each node are unified in dimension. This allows the information of the component to continue to participate in the processing along with the node.
[0116] Furthermore, in this embodiment, a global multi-head self-attention layer maps the fused feature vector into a query vector, a key vector, and a value vector, and determines the attention weight between each node based on the three. Then, for each node to be updated, its value vector is directly weighted and fused with the value vectors of nodes other than the node to be updated based on the attention weight. This allows the weighted feature vector of each node to directly collect information from other nodes in the graph data, and the collected components are distributed according to the strength of the association between nodes. As a result, the information interaction between nodes does not need to be relayed through intermediate nodes one by one.
[0117] Furthermore, since this embodiment decodes the weighted feature vector based on the longitudinal displacement decoder and the vertical displacement decoder respectively, each decoder faces the same weighted feature vector and gives the longitudinal displacement prediction value and the vertical displacement prediction value respectively. Thus, the displacement prediction values of the node in the two directions are output by the corresponding decoder respectively, so that the model to be trained can obtain the node displacement prediction values in both directions at once by processing the graph data.
[0118] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the truss node displacement prediction method of this application. Any simple transformations based on this technical concept are within the protection scope of this application.
[0119] This application provides a truss node displacement prediction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the truss node displacement prediction method in Embodiment 1 above.
[0120] The following is for reference. Figure 11 The diagram illustrates a structural schematic suitable for implementing the truss node displacement prediction device in the embodiments of this application. The truss node displacement prediction device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, tablets, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 11 The truss node displacement prediction device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0121] like Figure 11As shown, the truss node displacement prediction device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the truss node displacement prediction device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the truss node displacement prediction device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows truss node displacement prediction devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0122] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0123] The truss node displacement prediction device provided in this application, employing the truss node displacement prediction method in the above embodiments, can solve the technical problem that affects the accuracy of truss displacement prediction in current methods. Compared with the prior art, the beneficial effects of the truss node displacement prediction device provided in this application are the same as those of the truss node displacement prediction method provided in the above embodiments, and other technical features in this truss node displacement prediction device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0124] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0125] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0126] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the truss node displacement prediction method in the above embodiments.
[0127] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0128] The aforementioned computer-readable storage medium may be included in the truss node displacement prediction device; or it may exist independently and not assembled into the truss node displacement prediction device.
[0129] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the truss node displacement prediction device, cause the truss node displacement prediction device to perform the aforementioned truss node displacement prediction method.
[0130] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0132] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0133] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described truss node displacement prediction method, which can solve the technical problem that affects the accuracy of truss displacement prediction in current methods. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the truss node displacement prediction method provided in the above embodiments, and will not be repeated here.
[0134] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the truss node displacement prediction method described above.
[0135] The computer program product provided in this application can solve the technical problem that affects the accuracy of truss displacement prediction in current methods. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the truss node displacement prediction method provided in the above embodiments, and will not be repeated here.
[0136] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for predicting truss node displacement, characterized in that, The method includes: Obtain structural information of the truss to be predicted; Based on the structural information, the truss to be predicted is converted into graph data with nodes and components as basic units; The graph data is input into a preset displacement prediction model to obtain the node displacement of the truss to be predicted. The displacement prediction model includes a global multi-head self-attention layer, which is used to directly perform weighted fusion of node information in the graph data based on the attention weights between nodes.
2. The method as described in claim 1, characterized in that, Before the step of inputting the graph data into a preset displacement prediction model to obtain the nodal displacements of the truss to be predicted, the method further includes: Parametric modeling and finite element analysis were performed on the truss structure to obtain the modeled truss sample and the corresponding nodal displacement labels. Based on the truss structure, the truss sample is converted into graph data with nodes and components as basic units; The graph data is input into a preset training model to obtain the predicted node displacement values. Based on the predicted node displacement values and the corresponding node displacement labels, the model to be trained is trained to obtain the displacement prediction model.
3. The method as described in claim 2, characterized in that, The steps of parametrically modeling and performing finite element analysis on the truss structure to obtain the modeled truss samples and corresponding nodal displacement labels for the samples include: Based on the preset range of structural parameter values, the initial parameter combination of the truss is generated; Based on preset engineering constraints, the initial parameter combinations are filtered to obtain filtered parameter combinations; The filtering parameter combination and the initial parameter combination are sampled to obtain the sampled parameter combination; Finite element modeling is performed on the combination of sampling parameters to obtain the modeled truss sample; Finite element analysis was performed on the truss sample to obtain the nodal displacement labels.
4. The method as described in claim 3, characterized in that, The parameters in the screening parameter combination include the total span of the truss and the cross-sectional type of the truss members. The engineering constraints include the total span constraint of the truss. The step of sampling the screening parameter combination and the initial parameter combination to obtain the sampled parameter combination includes: From the filtering parameter combinations, a first number of parameter combinations are sampled layer by layer for each of the cross-section types to obtain the first parameter combination; From the initial parameter combination, outside the total span constraint of the truss, a second number of parameter combinations are sampled in layers to obtain a second parameter combination, wherein the second parameter combination meets the constraints outside the total span constraint of the truss in the engineering constraints. The sampling parameter combination is obtained by combining the first parameter combination and the second parameter combination.
5. The method as described in claim 2, characterized in that, The predicted node displacement values include longitudinal displacement prediction values and vertical displacement prediction values. The step of inputting the graph data into a preset training model to obtain the predicted node displacement values includes: Based on the feature fusion module in the model to be trained, the feature vectors of the nodes and the components are fused to obtain the fused feature vectors of each node; Based on the global multi-head self-attention layer and the fused feature vector, the feature vectors of each node are directly weighted and fused to obtain the weighted feature vector of each node; Based on the longitudinal displacement decoder and the vertical displacement decoder in the model to be trained, the weighted feature vector is decoded into the longitudinal displacement prediction value corresponding to the longitudinal displacement decoder and the vertical displacement prediction value corresponding to the vertical displacement decoder.
6. The method as described in claim 5, characterized in that, The step of fusing the feature vectors of the nodes and the components based on the feature fusion module in the model to be trained to obtain the fused feature vectors of each node further includes: For each node to be fused in the graph data, based on the feature fusion module, the feature vector of the node to be fused is concatenated and fused with the feature vector of the component connected to the node to be fused to obtain the initial fusion vector of each node. Determine whether the dimension of the initial fusion vector is less than the preset maximum feature dimension; If the dimension is less than the maximum feature dimension, the corresponding initial fusion vector is padded with a preset padding value until the dimension of the initial fusion vector reaches the maximum feature dimension, thus obtaining the fusion feature vector.
7. The method as described in claim 5, characterized in that, The step of directly weighting and fusing the feature vectors of each node based on the global multi-head self-attention layer and the fused feature vector to obtain the weighted feature vector of each node includes: Based on the global multi-head self-attention layer, the fused feature vector is mapped to the query vector, key vector and value vector of each node; Based on the query vector, the key vector, and the value vector, determine the attention weights between each node; For each node to be updated in the graph data, based on the attention weights between the nodes, the value vector of the node to be updated is directly weighted and fused with the value vectors of the nodes other than the node to be updated to obtain the weighted feature vector of each node.
8. The method as described in claim 2, characterized in that, The step of converting the truss sample into graph data with nodes and components as basic units based on the truss structure includes: Based on the truss structure, determine the connection points, components, and topological connections of the truss sample; The connection points are used as nodes in the graph data. Based on the connection point parameters, the node feature vector of the node is determined. The connection point parameters include the number of internodes, mid-span depth, upper chord slope, span, node coordinates, node equivalent mass, boundary conditions, and triaxial loads. The component is used as an edge of the graph data. Based on the component parameters of the component, the edge feature vector of the edge is determined. The component parameters include component length, horizontal plane angle, Z-axis moment of inertia, cross-sectional area, and end constraint conditions. Convert the topological connectivity into a corresponding adjacency matrix; The graph data is determined based on the nodes, the node feature vectors, the edges, the edge feature vectors, and the adjacency matrix.
9. A truss node displacement prediction device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the truss node displacement prediction method as described in any one of claims 1 to 8.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the truss node displacement prediction method as described in any one of claims 1 to 8.
