Bridge risk identification method and system fusing ensemble learning and attention mechanism
By integrating ensemble learning and attention mechanisms to identify bridge risks, this method utilizes XGBoost and RF-MLP models for feature extraction and combines them with a multi-task perceptual decoder. This solves the problem of insufficient information coupling in a single deep learning model and enables accurate identification of bridge risk types, locations, and damage levels.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI INST FOR PUBLIC SAFETY RES TSINGHUA UNIV
- Filing Date
- 2026-05-11
- Publication Date
- 2026-06-09
Smart Images

Figure CN122174691A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bridge risk identification, and more specifically to a bridge risk identification method and system that integrates ensemble learning and attention mechanisms. Background Technology
[0002] As the core of transportation infrastructure, bridges' structural safety directly impacts public safety and social operational efficiency. With increasing service life, bridges are susceptible to various potential damages such as cracks and corrosion under the combined effects of environmental factors and traffic loads, leading to a gradual decline in structural performance and placing higher demands on structural safety monitoring. In this context, traditional identification methods based on mechanical mechanisms or single physical parameters primarily focus on the location and quantitative analysis of fixed risk scenarios, such as stiffness degradation, material damage, or single load effects. However, the actual operating environment of bridges is complex, facing not only structural risks but also the coupled influence of environmental and operational risks such as vehicle loads, temperature and humidity variations, and wind vibration. Different risk scenarios differ in their characteristics, response mechanisms, and identification targets, encompassing both risk type and location classification tasks and quantitative damage identification tasks, exhibiting high dimensionality, strong nonlinearity, and multi-source coupling characteristics. Traditional identification methods are no longer sufficient to meet the bridge safety monitoring needs under complex and multi-risk scenarios.
[0003] In recent years, with the development of artificial intelligence technology, machine learning methods have been gradually introduced to solve the identification problem under complex and multidimensional risk scenarios. Data-driven bridge structural risk identification methods have received widespread attention from scholars at home and abroad. Among them, Random Forest (RF) has outstanding performance in feature selection and anti-overfitting, and has been widely used in bridge risk classification and structural damage state identification tasks. The literature "Lu Guanya, Wang Kehai, Qiu Wenhua. Seismic vulnerability model of double-column pier of small and medium span highway beam bridge based on random forest [J]. Earthquake Engineering and Engineering Vibration, 2022, 42(1):94-103." proposes to use RF to construct a seismic vulnerability study of piers of small and medium span beam bridges. However, the above single algorithm still has limitations when dealing with multi-source complex data and multi-risk scenarios. Especially in the scenario of multi-risk coupling and multi-dimensional response data, the single deep learning model is prone to problems such as insufficient information coupling and insufficient feature learning in feature extraction and risk identification, and it is difficult to fully reflect the structural response law under the action of multiple risks. Summary of the Invention
[0004] The technical problem to be solved by this invention is that existing bridge risk identification methods use a single deep learning model, which is prone to problems such as insufficient information coupling and insufficient feature learning in feature extraction and risk identification, making it difficult to fully reflect the structural response law under multiple risks, thus resulting in inaccurate identification results.
[0005] This invention solves the above-mentioned technical problems through the following technical means: a bridge risk identification method integrating ensemble learning and attention mechanisms, comprising:
[0006] S1. Simulate risk scenarios for the bridge to obtain the corresponding risk locations and damage levels. Number different working conditions according to risk type-risk location-damage level. Simulate the structural response under each working condition, using these as input features. The input dataset consists of multiple input features. Process the i-th input feature in the input dataset to obtain the reconstructed feature vector. ; S2. Construct XGBoost and RF-MLP models for deep feature extraction, and use the attention mechanism to obtain fused features; S3. Input the fused features into the multi-task perception decoder at the back end, and use parallel decoding branches to decouple and discriminate the fused features. Specifically, the first fully connected layer and the first Softmax activation function are used as the risk type decoding branch to output the risk type probability distribution; the second fully connected layer and the second Softmax activation function are used as the location decoding branch to output the location probability distribution; and the third fully connected layer with the Sigmoid activation function and the linear mapping are used as the damage degree decoding branch to output the damage degree quantification index.
[0007] Furthermore, the i-th input feature in the input dataset is processed to obtain the reconstructed feature vector. ,include: The i-th input feature uses a one-dimensional convolutional layer to capture the spatial coupling relationship between adjacent beam elements. Then, the convolutional feature output by the one-dimensional convolutional layer is fused with the i-th input feature through residual connections to generate a reconstructed feature vector. .
[0008] Furthermore, the formula for deep feature extraction by the XGBoost model is expressed as follows:
[0009] in, For the t-th regression decision tree of the XGBoost model, reconstruct the feature vector. The output value; The learning rate; The gradient-guided feature vector output by the XGBoost model; This refers to the iteration rounds of the XGBoost model.
[0010] Furthermore, the formula for deep feature extraction using the RF-MLP model is expressed as follows:
[0011] in: The topological nonlinear eigenvectors output by the RF-MLP model; For the mapping function of the multilayer perceptron; Indicates feature splicing; This is the output of the RF model.
[0012] Furthermore, the process of acquiring fused features using the attention mechanism is as follows:
[0013]
[0014]
[0015]
[0016]
[0017] Where Q is the query vector, K is the key vector, and V is the value vector; and The weights and biases are the learnable weights and biases of the first mapping layer. and The weights and biases are learnable by the second mapping layer. and Here, A represents the learnable weights and biases of the third mapping layer; A is the adaptive weight coefficient, and Softmax is the third Softmax activation function. Scaling factor For layer normalization processing, This indicates transpose.
[0018] Furthermore, after S3, it also includes: S4. Construct a joint loss function for overall model training; S5. Use the trained overall model to identify the risk type, risk location, and damage level of the bridge.
[0019] Furthermore, the overall model refers to the overall network architecture consisting of the XGBoost model, the RF-MLP model, the attention mechanism, and the multi-task perceptual decoder. The XGBoost model and the RF-MLP model respectively receive input features. The outputs of the XGBoost model and the RF-MLP model are processed by the attention mechanism to obtain fused features. The fused features are then used by the multi-task perceptual decoder to predict the output risk type, risk location, and damage level, respectively.
[0020] Furthermore, S4 includes: The input dataset was randomly divided into a training set and a test set, with a ratio of 70% and 30%, respectively. All input features were normalized using the standard deviation standardization method before training. The divided training set was then input into the overall model. During training, the overall model iteratively applied global parameters based on the joint loss function using the error backpropagation algorithm until the value of the joint loss function was minimized or the preset number of iterations was reached, at which point the iteration stopped, resulting in the trained overall model. Finally, the trained overall model was validated using test set samples. Cross-entropy accuracy, root mean square error, mean absolute error, and coefficient of determination were used to evaluate the overall performance of the overall model in classification and regression tasks.
[0021] Furthermore, the process of constructing the joint loss function includes: Risk type classification loss is , where n is the number of samples; The total number of risk categories. for The first category; The true label for the type to which sample i belongs; The probability prediction value output by the decoding branch for the risk type of the overall model; Risk location classification loss is ,in, This represents the total number of units at the damaged location. For the first One damaged location; The actual location label of the damaged unit; The classification probability output by the location decoding branch; Damage degree regression loss is ,in, This is a quantitative value representing the true extent of damage to sample i. The continuous predicted value of sample i is the output of the damage degree decoding branch after Sigmoid mapping; The joint loss function is ,in, All are weighting coefficients.
[0022] This invention also provides a system for implementing the bridge risk identification method that integrates ensemble learning and attention mechanisms, comprising: The data preprocessing module is used to simulate risk scenarios for bridges, obtain the corresponding risk locations and damage levels, and number different working conditions according to risk type-risk location-damage level. The structural response under each working condition is simulated and used as input features. The input dataset consists of multiple input features. The i-th input feature in the input dataset is processed to obtain the reconstructed feature vector. ; The model building module is used to build XGBoost and RF-MLP models for deep feature extraction and to obtain fused features using an attention mechanism. The decoupled output module is used to input the fused features into the multi-task perceptual decoder at the back end, and to decouple and discriminate the fused features using parallel decoding branches. Specifically, a first fully connected layer and a first Softmax activation function are used as the risk type decoding branch to output the risk type probability distribution; a second fully connected layer and a second Softmax activation function are used as the location decoding branch to output the location probability distribution; and a third fully connected layer with a sigmoid activation function and a linear mapping are used as the damage degree decoding branch to output the damage degree quantification index.
[0023] The advantages of this invention are: (1) This invention combines the advantages of RF in feature selection and expression capabilities with the performance of MLP network in nonlinear modeling, and improves the overall recognition accuracy and generalization ability by fusing the XGBoost model. At the same time, it uses the attention mechanism to dynamically fuse information, and finally outputs the discrimination index synchronously through the multi-task perception decoder. Compared with the existing single deep learning model, the fusion model of this invention has sufficient information coupling and strong feature learning ability, and can fully reflect the structural response law under multiple risk effects, and the recognition result is more accurate.
[0024] (2) This invention proposes a multi-task identification model that integrates gradient guidance, topological coding and adaptive attention, realizing the deep expression of bridge risk features and the simultaneous identification of multi-dimensional indicators. The model architecture captures the residual distribution and nonlinear topological correlation in the structural response through parallel coding branches, providing a more expressive feature framework for risk identification under complex working conditions, and realizing accurate identification of bridge risk type, location and damage degree under multiple risk coupling conditions.
[0025] (3) This invention combines the decision-making path of ensemble learning with the nonlinear modeling capability of deep learning, and achieves collaborative modeling through the gradient guidance mechanism of XGBoost and the topological encoding mechanism of RF-MLP. Specifically, the XGBoost branch uses the idea of boosting trees to capture the residual distribution pattern in the structural response, and is good at capturing sensitive features caused by weak damage; while the RF-MLP branch solves the coupling modeling problem between the local response anomaly of the bridge and the global stress characteristics of the whole bridge under multiple risk actions by using the feature selection of random forest and the mapping capability of multilayer perceptron.
[0026] (4) The residual linear attention module of the present invention has the active filtering capability of gating mechanism, realizing dynamic deep fusion and guided feature enhancement in heterogeneous feature domains. Specifically, the module converts the gradient guided feature vector extracted by the XGBoost branch into a query vector (Q), and uses the residual information captured by it that is highly sensitive to recognition error as a search instruction to actively guide the model to detect the signal with the most correction value in the feature space; at the same time, the topological nonlinear feature vector extracted by the RF-MLP branch is converted into a key vector (K) and a value vector (V) respectively, and the steady-state topological background containing the physical association of the whole bridge is used as a candidate information base. In complex service environments, the input data contains a lot of environmental noise or low contribution features. The module generates an adaptive weight coefficient by calculating the dot product similarity between Q and K, and constructs a physical saliency filter. This asymmetric mapping mechanism, which uses error-sensitive features to drive topological feature search, can dynamically adjust the fusion ratio of heterogeneous feature streams, automatically suppress interference caused by numerical simulation noise or minor physical quantities, and use residual connections to ensure that the model can accurately lock the core feature dimension that contributes the most to the risk under multi-risk coupling conditions, thereby significantly improving the accuracy and convergence stability of recognition.
[0027] (5) This invention has significant spatial topology awareness and semantic alignment capabilities. Specifically, the model captures the spatial coupling relationship between adjacent beam elements through a one-dimensional convolutional layer, and uses residual connections and layer normalization mechanisms to compensate for the lack of spatial geometric relationship awareness in traditional data-driven models. This enables the model to learn the relative position logic of bridge nodes in physical space, thereby effectively avoiding risky position misjudgments caused by the loss of coordinate information.
[0028] (6) The multi-task perception decoder of the present invention achieves decoupled output and gradient balance optimization of risk discrimination results. After fusing the feature input back-end decoder, the classification probability and quantification index are output synchronously using the parallel decoding branch. Combined with the joint loss function, the dimensional differences between the three tasks of risk type identification, location localization and damage degree quantification are balanced by the weight coefficients, ensuring that the model improves the localization accuracy without affecting the classification performance, and realizing the complete mapping process from simulated response data to multi-dimensional risk labels. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of bridge risk conditions in the bridge risk identification method that integrates learning and attention mechanisms disclosed in the embodiments of the present invention. Figure 2 This is a schematic diagram of the risk location in the bridge risk identification method that integrates learning and attention mechanisms disclosed in the embodiments of the present invention; Figure 3(a) shows the beam element division diagram of the finite element model of the three-span continuous beam bridge, and Figure 3(b) shows the cross-sectional view of the bridge body of the finite element model of the three-span continuous beam bridge. Figure 4 The XGBoost model framework is disclosed in the bridge risk identification method that integrates ensemble learning and attention mechanisms in the embodiments of the present invention. Figure 5 This is the RF-MLP model framework in the bridge risk identification method that integrates ensemble learning and attention mechanisms disclosed in the embodiments of the present invention; Figure 6 This is the XGBoost and RF-MLP fusion model framework in the bridge risk identification method that integrates ensemble learning and attention mechanisms disclosed in the embodiments of the present invention; Figure 7(a) is a line graph of the comparative experimental results, and Figure 7(b) is a line graph of the ablation experimental results. Figure 8(a) is a confusion matrix comparing the real scenario and the predicted scenario, and Figure 8(b) is a bar chart comparing the real scenario and the predicted scenario. Figure 9(a) is a confusion matrix comparing the actual location and the predicted location, and Figure 9(b) is a bar chart comparing the actual location and the predicted location. Figure 10 A bar chart comparing the actual and predicted levels of bridge damage. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] Example 1 To overcome the technical pain point of severe feature coupling interference in bridge damage identification, Embodiment 1 of this invention proposes a bridge risk identification method that integrates ensemble learning and attention mechanisms. This corresponds to a deep learning network architecture that integrates ensemble learning and attention mechanisms. This architecture extracts heterogeneous features through parallel encoding branches, dynamically fuses information using an attention mechanism, and finally outputs discrimination indicators synchronously through a multi-task perceptual decoder. Specifically, it includes the following steps: S1. First, construct an input dataset consisting of a large number of input features, and then process the input features to obtain the reconstructed feature vector. Specifically, to address the issues of multidimensional feature coupling and environmental noise interference in bridge structural damage identification, the input features are first preprocessed, and a one-dimensional convolutional layer is used to capture the spatial coupling correlation between adjacent beam elements. Subsequently, the convolutional features are fused with the original features through residual connections to achieve spatiotemporal reconstruction of the structural response data, generating a reconstructed feature vector. The reconstructed feature vector was then subjected to deep feature extraction using the S2 XGBoost model and the RF-MLP model, respectively.
[0032] The detailed construction process of the input dataset is as follows: S11. During long-term service, bridge structures are subject to the coupled effects of multiple factors, including environmental influences, vehicle loads, and material aging, often leading to various types, locations, and degrees of structural safety risks. For example, the main girder may experience stiffness degradation due to fatigue, while the supports may suffer stiffness degradation or settlement deformation due to prolonged compression or uneven foundation conditions. Furthermore, the uncertainty of traffic loads (such as vehicle overloading and eccentric loading) can induce abrupt changes in local structural responses. These common real-world risk conditions exhibit significant nonlinearity, time-varying characteristics, and multi-factor coupling, posing a considerable challenge to traditional identification models based on single-risk-condition assumptions. To address these issues, a study was conducted on a steel box girder bridge, constructing a bridge risk condition system integrating multiple conditions. For example... Figure 1 As shown.
[0033] The risk scenarios revolve around the main girder and bearings, key structural components of the bridge, and establish five common risk conditions: main girder stiffness reduction, vehicle overload, vehicle eccentric loading, bearing stiffness degradation, and bearing settlement. Under these risk scenarios, refined modeling and mesh generation are performed on the key bridge components to clarify the location and impact range of different conditions. Based on the location and functional differences of the damaged areas, different levels of degradation are set to quantify the degree of structural performance degradation. Structural response characteristics are mainly extracted and analyzed through key physical quantities such as deflection, stress, and bearing reactions.
[0034] S12. Based on the established risk scenarios, it is necessary to further transform the abstract scenario conditions into operable working condition solutions. Therefore, this step will explain the classification and construction of risk working conditions. Taking a three-span continuous beam bridge as the research object, five types of bridge risk are defined, and different risk locations are identified for the main beam and its components. The degree of damage is then progressively increased (10%, 20%, 30%, 40%, 50%) to simulate the changes in the mechanical response of the structure to different degrees of damage under different scenarios. The specific process is as follows: Regarding risk types: Considering the diversity of loads in engineering applications, this invention designs five load conditions, including main beam stiffness degradation, vehicle overload, eccentric load, support stiffness degradation, and support settlement, which are numbered 1# to 5#.
[0035] For the risk locations: The finite element model of the experimental bridge consists of 68 beam elements and 8 supports. Considering the actual sensor placement locations on the experimental bridge, 13 points on the beam elements corresponding to the sensors and 2 points on the supports were selected, totaling 15 risk component samples. These are numbered sequentially as 1#~13# and 14#~15#. Figure 2 As shown. Here, additional information on support settlement is provided, considering the simultaneous settlement of multiple supports (i.e., settlement of both supports at points A and B, and simultaneous settlement), numbered 16# and 17#.
[0036] Regarding the degree of damage: In the risk quantification simulation, five samples were divided into 10% to 50% and numbered 1# to 5#.
[0037] Three risk scenarios were combined to form a total of 215 typical risk scenario samples. The structural response was characterized by key parameters such as main beam deflection, stress distribution, and support reaction force to comprehensively reflect the damage state of the bridge under various conditions. To facilitate the differentiation of different conditions, this invention uses numbering (XXX, type-location-degree) to distinguish each risk scenario. For example, scenario 2-7-5 indicates that the risk type is 2#, the risk location is 7#, and the damage degree is 50%, meaning that the 7th beam unit experienced 50% vehicle overload instability. The risk scenario conditions are shown in Table 1.
[0038] Table 1 Risk Scenario Operating Conditions
[0039] After completing the design for risk conditions, the structural response under different conditions is simulated using a finite element model to obtain characteristic data, i.e., input features, that can be used for risk identification. This invention selects a typical three-span continuous steel box girder structure and establishes a high-precision finite element bridge model based on general finite element analysis software. The span arrangement of the studied bridge is 22.5 m (9.0 m + 15 m + 9.0 m). The structural parameters of the three-span continuous beam bridge are shown in Figure 3(a) and Figure 3(b). Figure 3(a) is the beam element division diagram of the finite element model of the three-span continuous beam bridge, where A, B, C, and D are the four supports. Figure 3(b) is the cross-sectional view of the bridge body of the finite element model of the three-span continuous beam bridge.
[0040] S2. Construct XGBoost and RF-MLP models for deep feature extraction, and use the attention mechanism to obtain fused features; The principles and working process of S21 and XGBoost models XGBoost is an ensemble learning method based on the concept of boosting trees. This invention employs the XGBoost model as the gradient-guided feature encoding branch. This branch utilizes the boosting tree concept to capture the residual distribution patterns in the bridge structure response, aiming to extract feature vectors highly sensitive to recognition errors. Its goal is to minimize the regularization objective function through an additive model to improve the model's predictive power and generalization performance. The basic framework of the model is as follows: Figure 4 As shown. The regularization objective function of XGBoost can be expressed as:
[0041] In the formula: The overall loss function for the XGBoost model; This is the loss function term, used to measure the error between the predicted and actual values. For the sample The true label, For the first Samples in round iteration The predicted value; It is a regularization term used to control model complexity. For the first A decision tree.
[0042] In each iteration, the XGBoost model approximates and optimizes the objective function using a second-order Taylor expansion:
[0043] In the formula: n is the number of samples; For the first The objective function of the wheel; This is the first-order gradient, which is the derivative of the loss function with respect to the previous round of predictions; For the first Tree samples The predicted output; It is a second-order gradient. For the current new trees The regularization term.
[0044] Through the second-order Taylor expansion, the XGBoost model branch can accurately capture the prediction residual of the current model in each iteration. After T1 rounds of additive model iterations are completed, the weighted sum of the outputs of all weak learners in this branch is extracted as the gradient-guided feature vector. The calculation process can be expressed as follows:
[0045] In the formula: For the t-th regression decision tree of the XGBoost model, reconstruct the feature vector. The output value; This is the learning rate (reduction factor), used to improve the model's generalization ability; This refers to the feature vector containing information about the structural response residuals, which is the gradient-guided feature vector output by the XGBoost model. This refers to the number of iterations in the XGBoost model. This serves as the source of the query vector mapping for the residual linear attention layer. By transforming the residual information accumulated during gradient descent into a query signal, the subsequent attention mechanism is guided to actively search for damage-sensitive regions in the bridge structure.
[0046] S22, RF-MLP Model: Principles and Working Process This invention employs the RF-MLP model as the topological nonlinear coding branch, aiming to capture the complex topological response of bridge structures by combining the feature selection capabilities of Random Forest (RF) and the nonlinear mapping capabilities of Multilayer Perceptron (MLP). The output of RF is concatenated with the original features to form an enhanced feature vector, which is then input into the Multilayer Perceptron for further modeling. Figure 5 As shown, the prediction process of the RF-MLP model can be expressed by the following formula:
[0047] In the formula: The topological nonlinear eigenvectors output by the RF-MLP model; For the mapping function of the multilayer perceptron; Indicates feature splicing; This is the output of the RF model.
[0048] The RF model employs differentiated aggregation strategies based on the specific identification task: for regression tasks such as damage quantification, the RF model performs probability mean calculation.
[0049] In the formula: T2 is the number of decision trees in the RF model; For the RF model, the first The output of each decision tree.
[0050] For the classification task of risk type and location identification, the RF model performs majority voting logic, that is, it uses the category with the highest frequency in all decision tree outputs as the discriminative feature of the module.
[0051] The above process has generated gradient-guided feature vectors via the XGBoost branch. Topological nonlinear eigenvectors are generated by the RF-MLP branch. ,like Figure 6As shown, to achieve semantic alignment of heterogeneous features, a mapping layer (fully connected layer) is introduced to project both features onto a latent feature space of uniform dimension, producing the key components required for attention computation:
[0052]
[0053]
[0054] Where Q is the query vector, K is the key vector, and V is the value vector; and The weights and biases are the learnable weights and biases of the first mapping layer. and The weights and biases are learnable by the second mapping layer. and The weights and biases are learnable by the third mapping layer.
[0055] The model calculates the similarity score using the dot product of Q and K, and generates adaptive weight coefficients A via the Softmax function.
[0056]
[0057] in, is the scaling factor, and Softmax is the Softmax activation function; Subsequently, the weight is applied to the value vector V for weighted summation to actively amplify the damage-sensitive feature channels. Attention-enhancing information is then superimposed on the original encoded features via residual connections. Finally, layer normalization is applied to ensure numerical stability during training, resulting in the fused features. :
[0058] in, This is for layer normalization processing.
[0059] S3. Input the fused features into the multi-task perceptual decoder for risk localization and type identification, and quantify the degree of damage. This step involves fusing the features... The input is processed by a multi-task perceptual decoder. A parallel decoder head structure (fully connected layer + differential activation function) is used to decouple and discriminate features. For risk localization and type recognition tasks, a Softmax activation function is used for multi-class mapping to obtain classification results for risk type and risk location. For damage quantification tasks, a Sigmoid activation function is used to perform regression mapping, outputting continuous predicted values within the damage severity range.
[0060] S4. Construct a joint loss function for overall model training. Risk type identification task: A fully connected layer and a softmax activation function are used as the risk type decoding branch to output the risk type probability distribution. Supervised learning is performed using the cross-entropy loss function. The risk type classification loss is:
[0061] in, The total number of risk categories; The true label for the type to which sample i belongs. for The first category; The probability prediction value output by the risk type decoding branch of the overall model.
[0062] Risk location identification task: For risk locations, an independent fully connected layer and a Softmax activation function are constructed as the location decoding branch to output the location probability distribution. Supervised learning is performed using the cross-entropy loss function. The risk location classification loss is:
[0063] in, This represents the total number of units at the damaged location. For the first One damaged location; The actual location label of the damaged unit; This represents the classification probability output by the location decoding branch.
[0064] The damage severity identification task involves predicting continuous damage severity values. An independent fully connected layer with a sigmoid activation function and a linear mapping is used as the damage severity decoding branch to output a quantitative index. The mean squared error loss function is then used for fitting and optimization. The damage severity regression loss is:
[0065] in, This is a quantitative value representing the true extent of damage to sample i. The continuous predicted value of sample i is the output of the damage degree decoding branch after Sigmoid mapping.
[0066] To achieve collaborative convergence across multiple tasks, all parameters are updated synchronously using a joint loss function:
[0067] in, These are all weighting coefficients, used to balance the differences in dimensions and convergence speed between different task branches, ensuring that the overall model improves positioning accuracy without affecting classification performance.
[0068] This invention utilizes finite element simulation to train an overall model using displacement, stress, and support reaction forces as input features, ultimately obtaining 215 risk scenario samples (corresponding to the 215 working conditions in Table 1) with damage degree and location information. Based on this, the samples are randomly divided into training and test sets, with proportions of approximately 70% and 30%, respectively. These samples are then imported into the overall model network for training. To improve the stability and convergence speed of the overall model training, all input features are normalized using the Standard Scaler method before training. Simultaneously, to ensure a balanced distribution of samples of each class in the training and test sets and to improve the overall model's stable recognition ability under minority class samples, a stratified sampling strategy based on risk location is introduced during the classification task partitioning process, ensuring sufficient representativeness of all risk scenarios during training. Subsequently, the partitioned training samples are input into the overall model, and heterogeneous features are extracted in parallel using the XGBoost gradient-guided branch and the RF-MLP topological coding branch. During training, the overall model no longer undergoes step-by-step optimization. Instead, it iterates the global parameters synchronously using the error backpropagation algorithm based on the joint loss function until the joint loss function reaches its minimum or a preset number of iterations is reached, at which point iteration stops, resulting in the trained overall model. Finally, the trained overall model is validated using test set samples. The overall performance of the overall model in classification and regression tasks is evaluated using metrics such as cross-entropy accuracy, root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination. The overall model refers to the overall network architecture consisting of the XGBoost model, the RF-MLP model, the attention mechanism, and the multi-task perceptual decoder. The XGBoost model and the RF-MLP model receive input features respectively. The outputs of the XGBoost model and the RF-MLP model are processed by the attention mechanism to obtain fused features. These fused features are then used by the multi-task perceptual decoder to predict the output risk type, risk location, and damage level.
[0069] S5. Use the trained overall model to identify the risk type, risk location, and damage level of the bridge.
[0070] To further verify the effectiveness of the proposed fusion model combining ensemble learning branches and attention mechanisms in bridge risk identification tasks, this invention designed comparative and ablation experiments. For the comparative experiments, common benchmark models including unregularized convolutional neural networks (CNN), support vector machines (SVM), single RF, and MLP were selected as references, and their performance was evaluated in risk type classification, risk location localization, and damage severity tasks, respectively. The results of the comparative experiments are shown in Table 2.
[0071] Table 2 Comparison of experimental results
[0072] As shown in Table 2, the method of this invention exhibits significant advantages over CNN and SVM models in risk classification, risk localization, and risk quantification; compared to single MLP and RF models, the prediction accuracy is improved by nearly 10%. Furthermore, to explore the impact of the overall model's internal structure on overall performance, this invention also conducted ablation experiments on the XGBoost and RF-MLP fusion network configuration (where the ablation experiment without an attention mechanism replaced the attention mechanism with a splicing operation). The relevant comparative results and performance indicators are summarized in Table 3.
[0073] Table 3 Ablation Experiment Results
[0074] Based on the combined results of the comparative and ablation experiments, the method of this invention demonstrates superior performance in risk type classification, location localization, and severity prediction. This verifies the synergistic gain effect of the ensemble learning branch and attention mechanism in feature extraction and dynamic fusion, significantly improving the model's generalization ability and effectively solving the overfitting problem. Detailed line graphs of the comparative and ablation experiments are shown in Figures 7(a) and 7(b), where Figure 7(a) is the line graph of the comparative experiment results and Figure 7(b) is the line graph of the ablation experiment results.
[0075] To further verify the effectiveness of this invention, experimental data was input into the overall model to verify its ability to classify risk types, locate risk positions, and predict damage levels under different working conditions. Different risk scenarios were simulated: by setting different load conditions, the bridge's response under overload and eccentric loading conditions was simulated to test the overall model's performance under various complex conditions. The accuracy and stability of risk identification were evaluated: by comparing the identification results under different working conditions, the accuracy and stability of the overall model in practical applications were evaluated.
[0076] Specific operating condition settings (PZ indicates off-center load; CZ indicates overload): Test 1: Meets the requirements of working conditions CZ-3 and CZ-1. The forklift travels in a straight line in the middle of the bridge, with an additional 0.2 t counterweight (1 concrete test block), and travels at a constant speed from right to left once.
[0077] Test 2: Meet the requirements of working conditions PZ-3 and PZ-1. The forklift travels in a straight line at a position 0.5 m off-center from the bridge, with an additional 0.2 t counterweight (1 concrete test block), and travels at a constant speed from right to left once.
[0078] Test 3: Meets the requirements of working conditions CZ-4 and CZ-2. The forklift travels in a straight line in the middle of the bridge, with an additional 0.4 t counterweight (2 concrete test blocks), and travels at a constant speed from right to left once.
[0079] Test 4: Meet the requirements of working conditions PZ-4 and PZ-2. The forklift travels in a straight line 0.5 m off-center from the bridge, with an additional 0.4 t counterweight (2 concrete test blocks), and travels at a constant speed from right to left once.
[0080] In all the above experiments, the test was conducted with the test site located at the midpoint of spans K1, K2, K3, and K4 for 30 seconds. To reflect the structural response characteristics under different risk levels, eight representative composite risk scenarios were constructed, and risk characteristics were characterized by stress, displacement, and support reactions. The risk scenario conditions are shown in Table 4. CZ represents overload; PZ represents eccentric load. For example, CZ-1 represents the first overload condition.
[0081] Table 4 Risk Scenario Settings
[0082] The displacement changes under different working conditions were used to construct the input dataset, which was then imported into the XGBoost and RF-MLP models to further verify the model's ability to identify risks in two typical risk scenarios in the experiment. First, a classification verification analysis of the risk scenarios was performed, and the output results are shown in Table 5.
[0083] Table 5 Risk Scenario Classification Results
[0084] Overload risk scenario corresponds to number 2; off-center load risk scenario corresponds to number 3; Figure 8(a) is the confusion matrix comparing the actual scenario and the predicted scenario, and Figure 8(b) is the bar chart comparing the actual scenario and the predicted scenario. As shown in Table 5, Figure 8(a) and Figure 8(b), the risk type classification of the above 8 working conditions, after feature extraction and output prediction by the fusion model, shows a high accuracy rate of 100%, and all 8 working conditions have achieved the expected prediction effect. The output results of the location verification analysis of the risk location are shown in Table 6.
[0085] Table 6 Risk Location Detection Results
[0086] The left mid-span location corresponds to number 3; the mid-span location of the entire bridge corresponds to number 9. Figure 9(a) is the confusion matrix comparing the actual and predicted locations, and Figure 9(b) is a bar chart comparing the actual and predicted locations. As shown in Table 6, Figure 9(a), and Figure 9(b), the above eight working conditions, through feature extraction and output prediction using the XGB and RF-MLP models, performed well in risk location positioning, with an accuracy rate of 100%, and the prediction effect for each working condition was good. Further verification analysis of the damage degree prediction yielded the output results shown in Table 7.
[0087] Table 7. Damage Prediction Results
[0088] Overload risk and off-center load risk were simulated at 10% and 30% respectively during the test. Table 7 and Figure 10 For feature extraction and output prediction of the above 8 working conditions, the coefficient of determination (accuracy) of the damage degree is 82.5%. Each working condition reached the ideal state in the experiment, with small data differences, and achieved the expected prediction effect.
[0089] Through the above technical solutions, this invention provides a multi-task recognition model that integrates XGBoost and RF-MLP. This model combines the advantages of RF in feature selection and representation capabilities with the performance of MLP networks in nonlinear modeling, and improves overall recognition accuracy and generalization ability by incorporating an XGBoost model. During training, the introduction of a hierarchical sampling strategy and feature standardization method further enhances the model's robustness to imbalanced samples and scale-sensitive issues.
[0090] Example 2 Embodiment 2 of the present invention also provides a system for implementing the bridge risk identification method integrating ensemble learning and attention mechanisms of Embodiment 1, comprising: The data preprocessing module is used to simulate risk scenarios for bridges, obtain the corresponding risk locations and damage levels, and number different working conditions according to risk type-risk location-damage level. The structural response under each working condition is simulated and used as input features. The input dataset consists of multiple input features. The i-th input feature in the input dataset is processed to obtain the reconstructed feature vector. ; The model building module is used to build XGBoost and RF-MLP models for deep feature extraction and to obtain fused features using an attention mechanism. The decoupled output module is used to input the fused features into the multi-task perceptual decoder at the back end, and to decouple and discriminate the fused features using parallel decoding branches. Specifically, a first fully connected layer and a first Softmax activation function are used as the risk type decoding branch to output the risk type probability distribution; a second fully connected layer and a second Softmax activation function are used as the location decoding branch to output the location probability distribution; and a third fully connected layer with a sigmoid activation function and a linear mapping are used as the damage degree decoding branch to output the damage degree quantification index.
[0091] Specifically, the i-th input feature in the input dataset is processed to obtain the reconstructed feature vector. ,include: The i-th input feature uses a one-dimensional convolutional layer to capture the spatial coupling relationship between adjacent beam elements. Then, the convolutional feature output by the one-dimensional convolutional layer is fused with the i-th input feature through residual connections to generate a reconstructed feature vector. .
[0092] Specifically, the formula for deep feature extraction using the XGBoost model is expressed as follows:
[0093] in, For the t-th regression decision tree of the XGBoost model, reconstruct the feature vector. The output value; The learning rate; The gradient-guided feature vector output by the XGBoost model; This refers to the iteration rounds of the XGBoost model.
[0094] More specifically, the formula for deep feature extraction using the RF-MLP model is expressed as follows:
[0095] in: The topological nonlinear eigenvectors output by the RF-MLP model; For the mapping function of the multilayer perceptron; Indicates feature splicing; This is the output of the RF model; More specifically, the process of obtaining fused features using the attention mechanism is as follows:
[0096]
[0097]
[0098]
[0099]
[0100] Where Q is the query vector, K is the key vector, and V is the value vector; and The weights and biases are the learnable weights and biases of the first mapping layer. and The weights and biases are learnable by the second mapping layer. and Here, A represents the learnable weights and biases of the third mapping layer; A is the adaptive weight coefficient, and Softmax is the third Softmax activation function. Scaling factor For layer normalization processing, This indicates transpose.
[0101] Specifically, the decoupling output module is followed by: The training module is used to construct a joint loss function for overall model training. The results prediction module is used to identify the risk type, risk location, and damage level of a bridge using the trained overall model.
[0102] More specifically, the overall model refers to the overall network architecture consisting of the XGBoost model, the RF-MLP model, the attention mechanism, and the multi-task perception decoder. The XGBoost model and the RF-MLP model receive input features respectively. The outputs of the XGBoost model and the RF-MLP model are processed by the attention mechanism to obtain fused features. The fused features are then used by the multi-task perception decoder to predict the output risk type, risk location, and damage level respectively.
[0103] More specifically, the training module is also used for: The input dataset was randomly divided into a training set and a test set, with a ratio of 70% and 30%, respectively. All input features were normalized using the standard deviation standardization method before training. The divided training set was then input into the overall model. During training, the overall model iteratively applied global parameters based on the joint loss function using the error backpropagation algorithm until the value of the joint loss function was minimized or the preset number of iterations was reached, at which point the iteration stopped, resulting in the trained overall model. Finally, the trained overall model was validated using test set samples. Cross-entropy accuracy, root mean square error, mean absolute error, and coefficient of determination were used to evaluate the overall performance of the overall model in classification and regression tasks.
[0104] More specifically, the construction process of the joint loss function includes: Risk type classification loss is , where n is the number of samples; The total number of risk categories. for The first category; The true label for the type to which sample i belongs; The probability prediction value output by the decoding branch for the risk type of the overall model; Risk location classification loss is ,in, This represents the total number of units at the damaged location. For the first One damaged location; The actual location label of the damaged unit; The classification probability output by the location decoding branch; Damage degree regression loss is ,in, This is a quantitative value representing the true extent of damage to sample i. The continuous predicted value of sample i is the output of the damage degree decoding branch after Sigmoid mapping; The joint loss function is ,in, All are weighting coefficients.
[0105] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A bridge risk identification method fusing ensemble learning and attention mechanism, characterized in that, include: S1, simulate the risk scenario of the bridge, obtain the corresponding risk position and damage degree, number different working conditions according to the risk type-risk position-damage degree, simulate the structural response under each working condition as an input feature, and form an input data set by multiple input features; process the ith input feature in the input data set to obtain a reconstructed feature vector ; S2. Construct XGBoost and RF-MLP models for deep feature extraction, and use the attention mechanism to obtain fused features; S3. Input the fused features into the multi-task perception decoder at the back end, and use parallel decoding branches to decouple and discriminate the fused features. Specifically, the first fully connected layer and the first Softmax activation function are used as the risk type decoding branch to output the risk type probability distribution; the second fully connected layer and the second Softmax activation function are used as the location decoding branch to output the location probability distribution; and the third fully connected layer with the Sigmoid activation function and the linear mapping are used as the damage degree decoding branch to output the damage degree quantification index.
2. The bridge risk identification method integrating ensemble learning and attention mechanisms according to claim 1, characterized in that, The processing of the i-th input feature in the input data set obtains a reconstructed feature vector , comprising: The i-th input feature utilizes a one-dimensional convolutional layer to capture the spatial coupling relationship between adjacent beam units, and then the convolutional features output by the one-dimensional convolutional layer are fused with the i-th input feature through a residual connection to generate a reconstructed feature vector . 3.The bridge risk identification method of fusing ensemble learning and attention mechanism according to claim 1, characterized in that, The formula for deep feature extraction in the XGBoost model is expressed as follows: wherein, is an output value of the tth regression decision tree of the XGBoost model for the reconstructed feature vector ; is a learning rate; is a gradient-guided feature vector output by the XGBoost model; is an iteration round of the XGBoost model.
4. The bridge risk identification method of fusing ensemble learning and attention mechanism according to claim 3, characterized in that, The formula for deep feature extraction in the RF-MLP model is expressed as follows: in: The topological nonlinear eigenvectors output by the RF-MLP model; For the mapping function of the multilayer perceptron; Indicates feature splicing; This is the output of the RF model.
5. The bridge risk identification method integrating ensemble learning and attention mechanisms according to claim 4, characterized in that, The process of obtaining fused features using the attention mechanism is as follows: Where Q is the query vector, K is the key vector, and V is the value vector; and The weights and biases are the learnable weights and biases of the first mapping layer. and The weights and biases are learnable by the second mapping layer. and Here, A represents the learnable weights and biases of the third mapping layer; A is the adaptive weight coefficient, and Softmax is the third Softmax activation function. Scaling factor For layer normalization processing, This indicates transpose.
6. The bridge risk identification method integrating ensemble learning and attention mechanisms according to claim 1, characterized in that, Following S3, the following also includes: S4. Construct a joint loss function for overall model training; S5. Use the trained overall model to identify the risk type, risk location, and damage level of the bridge.
7. The bridge risk identification method integrating ensemble learning and attention mechanisms according to claim 6, characterized in that, The overall model refers to the overall network architecture consisting of the XGBoost model, the RF-MLP model, the attention mechanism, and the multi-task perception decoder. The XGBoost model and the RF-MLP model receive input features respectively. The outputs of the XGBoost model and the RF-MLP model are processed by the attention mechanism to obtain fused features. The fused features are then used by the multi-task perception decoder to predict the output risk type, risk location, and damage level respectively.
8. The bridge risk identification method integrating ensemble learning and attention mechanisms according to claim 6, characterized in that, S4 includes: The input dataset was randomly divided into a training set and a test set, with a ratio of 70% and 30%, respectively. All input features were normalized using the standard deviation standardization method before training. The divided training set was then input into the overall model. During training, the overall model iteratively applied global parameters based on the joint loss function using the error backpropagation algorithm until the value of the joint loss function was minimized or the preset number of iterations was reached, at which point the iteration stopped, resulting in the trained overall model. Finally, the trained overall model was validated using test set samples. Cross-entropy accuracy, root mean square error, mean absolute error, and coefficient of determination were used to evaluate the overall performance of the overall model in classification and regression tasks.
9. The bridge risk identification method integrating ensemble learning and attention mechanisms according to claim 6, characterized in that, The process of constructing the joint loss function includes: Risk type classification loss is , where n is the number of samples; The total number of risk categories. for The first category; The true label for the type to which sample i belongs; The probability prediction value output by the decoding branch for the risk type of the overall model; Risk location classification loss is ,in, This represents the total number of units at the damaged location. For the first One damaged location; The actual location label of the damaged unit; The classification probability output by the location decoding branch; Damage degree regression loss is ,in, This is a quantitative value representing the true extent of damage to sample i. The continuous predicted value of sample i is the output of the damage degree decoding branch after Sigmoid mapping; The joint loss function is ,in, All are weighting coefficients.
10. A system for implementing the bridge risk identification method integrating ensemble learning and attention mechanisms as described in any one of claims 1-9, characterized in that, include: The data preprocessing module is used to simulate risk scenarios for bridges, obtain the corresponding risk locations and damage levels, and number different working conditions according to risk type-risk location-damage level. The structural response under each working condition is simulated and used as input features. The input dataset consists of multiple input features. The i-th input feature in the input dataset is processed to obtain the reconstructed feature vector. ; The model building module is used to build XGBoost and RF-MLP models for deep feature extraction and to obtain fused features using an attention mechanism. The decoupled output module is used to input the fused features into the multi-task perceptual decoder at the back end, and to decouple and discriminate the fused features using parallel decoding branches. Specifically, a first fully connected layer and a first Softmax activation function are used as the risk type decoding branch to output the risk type probability distribution; a second fully connected layer and a second Softmax activation function are used as the location decoding branch to output the location probability distribution; and a third fully connected layer with a sigmoid activation function and a linear mapping are used as the damage degree decoding branch to output the damage degree quantification index.