Bridge performance degradation prediction method and device based on ensemble learning
By constructing random forest and gradient boosting regression tree models and optimizing hyperparameters based on ensemble learning methods, the uncertainty problem in bridge performance degradation prediction in the existing technology is solved, achieving more accurate and robust bridge performance prediction, ensuring improve the reliability of preventive maintenance programs.
Patent Information
- Application Number
- CN202411255858.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technology cannot accurately predict the future service status of bridges, resulting in a lack of effective preventive maintenance programs and reasonable maintenance funding planning, and there is great uncertainty based on degradation prediction models.
An ensemble learning-based method is used to preprocess data sets related to bridge performance to build an integrated learning model of random forest algorithm and gradient boosting regression tree algorithm, and optimize hyperparameters to predict bridge performance degradation results and avoid the performance of a single algorithm. Insufficiency, overfitting, and underfitting problems.
It achieves more accurate bridge performance degradation prediction, selects the optimal model, enhances the robustness of prediction, avoids the insufficient performance of a single algorithm, and reduces the risk of over-fitting and under-fitting.
Smart Images

Figure CN118760902A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bridges, and in particular to a method and device for predicting bridge performance degradation based on ensemble learning. Background Art
[0002] In the past 30 years, my country's infrastructure construction, with highway bridges as the typical example, has developed rapidly, and the resulting structural damage and degradation are increasingly attracting the attention of the engineering community. As a crucial node in the transportation network, bridges have long been subjected to complex external forces, such as overloads, extreme event loads, and complex environmental loads. Regular inspection of bridges is one of the most effective means to evaluate the service status of bridges, but the current management and maintenance units only formulate maintenance plans based on the results of regular inspections, and lack control over the future service of bridges. Accurately predicting the future service status of bridges plays an extremely important role in predicting the service life of bridges, formulating preventive maintenance plans, and reasonably planning maintenance funds, and other key issues in later safety management.
[0003] Traditional prediction methods include linear degradation models, nonlinear degradation models, Markov state prediction models, etc. These models are used to express the hidden relationship between observable attributes (such as bridge age) and bridge technical conditions or performance status indicators. However, for bridge structures, there is actually no clear mathematical model to describe their degradation patterns, and the current structural state can only be determined manually. Therefore, there is a large uncertainty in the degradation prediction model and it cannot be used in actual engineering.
[0004] In order to solve the above technical problems, the present invention proposes a bridge performance degradation prediction method and device based on ensemble learning. Summary of the invention
[0005] The purpose of the present invention is to provide a bridge performance degradation prediction method and device based on ensemble learning in view of the defects of the prior art.
[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions: A bridge performance degradation prediction method based on ensemble learning, comprising: S1. Obtain a data set related to bridge performance, preprocess the acquired data set, and divide the processed data set into a training set and a test set; S2. Construct an ensemble learning model, and use the training set to perform spatial selection and optimization on the hyperparameters in the ensemble learning model to obtain a prediction model; wherein the ensemble learning model includes a random forest algorithm and a gradient boosting regression tree algorithm; S3. Input the test set into the prediction model to evaluate the model prediction performance and determine whether the evaluation result meets the requirements. If not, re-execute step S2; if yes, execute step S4; S4. The data to be tested is input into the prediction model for processing, and the prediction model outputs the bridge performance degradation result.
[0007] Furthermore, the characteristics of the data set in step S1 include the daily traffic volume, the daily number of heavy vehicles, the type of bridge structure, the length of the bridge, the age of the bridge, and the number of times the bridge has been repaired.
[0008] Furthermore, the preprocessing of the acquired data set in step S1 specifically includes: cleaning, encoding, and normalizing the data in the data set.
[0009] Furthermore, the spatial selection of the hyperparameter in step S2 specifically includes: presetting a value range of the hyperparameter.
[0010] Furthermore, the hyperparameter optimization is achieved through grid search and cross validation.
[0011] Furthermore, the hyperparameters include hyperparameters of the random forest algorithm and hyperparameters of the gradient boosting regression tree algorithm; wherein the hyperparameters of the random forest algorithm include the first number of weak learners, the first maximum depth, and the maximum number of features, and the hyperparameters of the gradient boosting regression tree algorithm include the learning rate, the second number of weak learners, and the second maximum depth.
[0012] Furthermore, the evaluation indicators for evaluating the model prediction performance in step S3 include root mean square error, mean absolute percentage error, and determination coefficient.
[0013] Furthermore, the root mean square error, mean absolute percentage error, and determination coefficient are calculated as follows: ; ; ; Among them, RMSE stands for root mean square error; MAPE stands for mean absolute percentage error; R 2 represents the coefficient of determination; m represents the number of samples in the test set; i represents the subscript of the test set data; y i represents the true value; represents the predicted value; Represents the average value of the true value of the test set; SS res Represents the sum of squares of the difference between the true value and the predicted value; SS tot Represents the sum of squares of the differences between the true value and the mean of the true values.
[0014] Furthermore, the evaluation result in step S3 meets the requirement that the root mean square error and the mean absolute percentage error have low values and the determination coefficient has a high value.
[0015] Accordingly, a bridge performance degradation prediction device based on ensemble learning is also provided, which is used to execute the bridge performance degradation prediction method based on ensemble learning. The prediction device includes a processor, and the processor is provided with: An acquisition module is used to acquire a data set related to bridge performance, preprocess the acquired data set, and divide the processed data set into a training set and a test set; The training module is used to construct an integrated learning model, and use the training set to perform spatial selection and optimization on the hyperparameters in the integrated learning model to obtain a prediction model; the integrated learning model includes a random forest algorithm and a gradient boosting regression tree algorithm; The test module is used to input the test set into the prediction model to evaluate the model prediction performance; The detection module is used to input the data to be detected into the prediction model for processing, and the prediction model outputs the bridge performance prediction result.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. The proposed ensemble learning method includes bagging and boosting methods, specifically two algorithms (RF and GBRT), which can compare the advantages and disadvantages of prediction models and select the optimal model for bridge performance degradation prediction, avoiding the problem of insufficient performance of a single algorithm (such as BP neural network model).
[0017] 2. The method proposed in the present invention is a data-driven method with strong robustness and will not have the overfitting and underfitting problems of other commonly used machine learning models. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flow chart of a bridge performance degradation prediction method based on ensemble learning provided in Example 1; Figure 2 Schematic diagram of the bridge performance degradation prediction method of integrated learning provided in Example 1; Figure 3 This is a schematic diagram of k-fold cross validation provided in Example 1; Figure 4 This is a comparison diagram of the prediction effect diagram provided in Example 2. DETAILED DESCRIPTION
[0019] The embodiments of the present invention are described below by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0020] The purpose of the present invention is to provide a bridge performance degradation prediction method and device based on ensemble learning in view of the defects of the prior art.
[0021] Embodiment 1
[0022] This embodiment provides a bridge performance degradation prediction method based on ensemble learning, such as Figure 1-Figure 2 As shown, including: S1. Obtain a data set related to bridge performance, preprocess the acquired data set, and divide the processed data set into a training set and a test set; S2. Construct an ensemble learning model, and use the training set to perform spatial selection and optimization on the hyperparameters in the ensemble learning model to obtain a prediction model; wherein the ensemble learning model includes a random forest algorithm and a gradient boosting regression tree algorithm; S3. Input the test set into the prediction model to evaluate the model prediction performance and determine whether the evaluation result meets the requirements. If not, re-execute step S2; if yes, execute step S4; S4. The data to be tested is input into the prediction model for processing, and the prediction model outputs the bridge performance prediction result.
[0023] In step S1, a data set related to bridge performance is obtained, the obtained data set is preprocessed, and the processed data set is divided into a training set and a test set. Specifically: S11. Data collection and data integration.
[0024] Collect regular bridge inspection reports, traffic flow data tables, and local bridge information tables, and perform data integration based on the collected data to obtain the target data set. Table 1 is an example of a data integration target. The database contains a total of 6 features, namely, daily traffic volume, daily number of heavy vehicles, type of bridge structure, length of bridge, age of bridge, and number of bridge repairs. The above features will also be used as input to the prediction model, so that the prediction target (output) of the model is the total score of bridge technology.
[0025] Table 1 Data integration objectives
[0026] S12. Clean the data in the data set.
[0027] Before using the data, it is necessary to conduct a preliminary assessment of the data quality of the original data, understand the function and role of the data, and check whether there are missing values, abnormal values, duplicate data, and format errors in the data. The main sources of abnormalities include missing original data, input errors, and repeated input. In addition to directly deleting abnormal data, the processing method shown in Table 2 below can also be used to ensure maximum utilization of the original data. This embodiment uses the Pandas module of the Python language for data cleaning, but is not limited to this.
[0028] For fields with many outliers, you can directly delete the field to prevent the processed data from containing too much invalid information and adversely affecting the final modeling effect. In particular, for data with incorrect formats, if the incorrect format still contains valid information and the valid information of the data itself can be retained after adjusting or unifying the data, the data can be retained.
[0029] Table 2 Data anomalies and treatment methods
[0030] S13. Encode the data in the data set.
[0031] For example, the "Structure Type" field in Table 1 is text (non-numeric), which cannot be recognized by the machine, and the text needs to be encoded into a numeric value. The encoding method used in the existing scheme is One-hot encoding, but in bridge data, there are many types of bridges (such as hollow slab bridges, T-beam bridges, etc.), and the use of one-hot encoding will greatly expand the feature dimension, which is not conducive to machine learning modeling. Therefore, this embodiment adopts the target encoding method, so the example of the comparison before and after the target encoding of "Structure Type" is shown in Table 3 below.
[0032] Table 3 Comparison of “Structure Type” target encoding before and after
[0033] S14. Divide and normalize the data set obtained in steps S12-S13.
[0034] The processed data set is divided into a training set (70%) and a test set (30%) in a ratio of 7:3, and the division method is random. The training set is used to train the degradation prediction model, and the test set is used to evaluate the model prediction performance.
[0035] The data in the training set and the test set are normalized to better train the model in terms of efficiency and convergence. This embodiment uses the standard normalization method (z-score) to process the features of each dimension so that they conform to the standard normal distribution. For each feature x i , the new eigenvalue after standard normalization It is expressed as:
[0036] Among them, x i represents the eigenvalue, μ(x) and σ(x) represent the mean and standard deviation of each feature dimension respectively. represents the eigenvalue after standard normalization.
[0037] Similarly, the subsequent predicted target values are also normalized and expressed as:
[0038] Where y represents the predicted target value, μ(y) and σ(y) are the mean and standard deviation respectively, and y' represents the predicted target value after standard normalization.
[0039] When making subsequent predictions, the predicted bridge technical condition score should be denormalized, and the mean and standard deviation of each feature should be calculated using the training set to keep consistent with the normalization, so as to prevent data leakage from causing the prediction model to be inconsistent with reality.
[0040] In step S2, an ensemble learning model is constructed, and a training set is used to perform spatial selection and optimization on hyperparameters in the ensemble learning model to obtain a prediction model; wherein the ensemble learning model includes a random forest algorithm and a gradient boosting regression tree algorithm; Ensemble learning is a method that combines several base learners through a certain learning algorithm to achieve better results than single base learning. Currently, the same base learners are used in ensemble learning, and the commonly used methods of ensemble learning are bagging and boosting. A typical example of bagging is random forest (RF), and a typical example of boosting is gradient boosting regression trees (GBRT).
[0041] Step S2 is specifically as follows: S21. Build an integrated learning model.
[0042] The ensemble learning algorithms used in this embodiment include two types: random forest (RF) algorithm and gradient boosted regression tree (GBRT) algorithm. Therefore, an ensemble learning model is constructed based on the random forest (RF) algorithm and the gradient boosted regression tree (GBRT) algorithm.
[0043] S22. Use the training set to perform spatial selection and optimization of hyperparameters in the ensemble learning model.
[0044] This embodiment adjusts the hyperparameters of the model so that the model achieves optimal performance.
[0045] The specific spatial selection of hyperparameters is as follows: pre-set the value range of the hyperparameters, as shown in Table 4.
[0046] Table 4 Hyperparameter space selection
[0047] Hyperparameter optimization is achieved through grid search and cross validation.
[0048] This embodiment uses a combination of grid search and cross-validation to optimize hyperparameters. Grid search is used to traverse the hyperparameter space (limited) given in Table 4 to ensure that the most accurate parameters are found within the specified parameter range. Cross-validation uses k-fold cross-validation, which is to re-divide the training set into k subsets and select one subset as the validation set without repetition. Therefore, a total of k models are established and k validations are performed. Finally, the test results of the k models are averaged as the prediction performance evaluation index of the final model, such as Figure 3 Shown is a schematic diagram of k-fold cross validation (k=10).
[0049] In this embodiment, the prediction performance evaluation indicators include root mean square error (RMSE), mean absolute percentage error (MAPE), determination coefficient R 2 ; The calculation method of the root mean square error, mean absolute percentage error, and determination coefficient is: ; ; ; Among them, RMSE stands for root mean square error; MAPE stands for mean absolute percentage error; R 2 represents the coefficient of determination; m represents the number of samples in the test set; i represents the subscript of the test set data; y i represents the true value; represents the predicted value; Represents the average value of the true value of the test set; SS res Represents the sum of squares of the difference between the true value and the predicted value; SS tot Represents the sum of squares of the differences between the true value and the mean of the true values.
[0050] This embodiment can implement the above two integrated learning algorithms based on Python's scikit-learn library. There are 6 input features of the model: daily traffic volume, daily number of heavy vehicles, type of bridge structure, length of bridge, age of bridge, number of bridge repairs, and the model output is the overall score of the bridge age structure.
[0051] In step S3, the test set is input into the prediction model to evaluate the model prediction performance, and it is determined whether the evaluation result meets the requirements. If not, step S2 is executed again; if yes, step S4 is executed; After the training is completed and the prediction model is obtained, the prediction effect of the prediction model is evaluated using the data of the test set. If the evaluation indicators RMSE and MAPE are lower, R 2 The larger the value is, the better the prediction performance of the prediction model is. If the evaluation index does not meet the preset requirements, it is necessary to re-execute step S2 and then re-train the model until a prediction model with evaluation index meeting the preset requirements is obtained.
[0052] In step S4, the data to be detected is input into the prediction model for processing, and the prediction model outputs the bridge performance prediction result.
[0053] This embodiment uses the model with the best evaluation index to predict the future performance of the target bridge in the business scenario, and the result of bridge performance degradation can be obtained according to the prediction result.
[0054] First, according to the format of Table 1, collect the specific data of the six characteristics of the bridge (the total technical score of the bridge is empty and to be predicted). Then perform data cleaning and data encoding (the same as the training process), and normalize the data according to the mean and standard deviation of the training set. After completing the above process, input the data into the optimal prediction model, and the prediction model will output the predicted total technical score of the bridge. The prediction results need to be denormalized to obtain the actual total technical score of the bridge. The denormalization formula is as follows:
[0055] Among them, y pred Indicates the actual total score of bridge technology; y' pred Represents the predicted total bridge technology score.
[0056] This embodiment has the following beneficial effects: 1. The proposed ensemble learning method includes bagging and boosting methods, specifically two algorithms (RF and GBRT), which can compare the advantages and disadvantages of prediction models and select the optimal model for bridge performance degradation prediction, avoiding the problem of insufficient performance of a single algorithm (such as BP neural network model).
[0057] 2. The proposed method is a data-driven method with strong robustness and will not have the overfitting and underfitting problems commonly found in other machine learning models.
[0058] Embodiment 2 The bridge performance degradation prediction method based on ensemble learning provided in this embodiment is different from that in the first embodiment in that: This embodiment is described by using specific data.
[0059] The data comes from a provincial bridge inspection report. The total data set size is 1209, with 846 data in the training set (70%) and 363 data in the test set (30%). After grid search + 10-fold cross validation, the optimal hyperparameters of the prediction model are as shown in Table 5: Table 5 Hyperparameter selection
[0060] The training results of the final prediction model are shown in Table 6: Table 6 Training results of the final prediction model
[0061] like Figure 4 The following is a schematic diagram of the prediction effect. Figure 4 As can be seen, RMSE and MAPE are lower, R2 is higher, and the prediction effect is better.
[0062] Embodiment 3 This embodiment further provides a bridge performance degradation prediction device based on ensemble learning, which is used to execute a bridge performance degradation prediction method based on ensemble learning in embodiment 1. The prediction device includes a processor, wherein the processor is provided with: An acquisition module is used to acquire a data set related to bridge performance, preprocess the acquired data set, and divide the processed data set into a training set and a test set; The training module is used to construct an integrated learning model, and use the training set to perform spatial selection and optimization on the hyperparameters in the integrated learning model to obtain a prediction model; the integrated learning model includes a random forest algorithm and a gradient boosting regression tree algorithm; The test module is used to input the test set into the prediction model to evaluate the model prediction performance; The detection module is used to input the data to be detected into the prediction model for processing, and the prediction model outputs the prediction result of bridge performance degradation.
[0063] The processor described in this embodiment may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present application.
[0064] The processor described in this embodiment is connected to a memory for storing data or instructions. The memory may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory may be inside or outside the data processing device. In a specific embodiment, the memory is a non-volatile memory. In a specific embodiment, the memory includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0065] The memory can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor. The processor reads and executes the computer program instructions stored in the memory.
[0066] The processor described in this embodiment is connected to a transmission device for transmitting data with an external device. The transmission device can be used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0067] The processor in this embodiment is connected to an input / output device for inputting or outputting information. The input / output device is used to input or output information. In this embodiment, the input information is data information related to bridge performance degradation, and the output information is the total technical score of the bridge.
[0068] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A bridge performance degradation prediction method based on ensemble learning, It is characterized in that include: S1. Obtain a data set related to bridge performance, preprocess the acquired data set, and divide the processed data set into a training set and a test set; S2. Construct an ensemble learning model, and use the training set to perform spatial selection and optimization on the hyperparameters in the ensemble learning model to obtain a prediction model; wherein the ensemble learning model includes a random forest algorithm and a gradient boosting regression tree algorithm; S3. Input the test set into the prediction model to evaluate the model prediction performance and determine whether the evaluation result meets the requirements. If not, re-execute step S2; if yes, execute step S4; S4. The data to be tested is input into the prediction model for processing, and the prediction model outputs the bridge performance prediction result.
2. According to claim 1, a bridge performance degradation prediction method based on ensemble learning, It is characterized in that The characteristics of the data set in step S1 include the daily traffic volume, the daily number of heavy vehicles, the type of bridge structure, the length of the bridge, the age of the bridge, and the number of times the bridge is repaired.
3. According to claim 2, a bridge performance degradation prediction method based on ensemble learning, It is characterized in that The preprocessing of the acquired data set in step S1 specifically includes: cleaning, encoding, and normalizing the data in the data set.
4. According to claim 1, a bridge performance degradation prediction method based on ensemble learning, It is characterized in that The spatial selection of the hyperparameter in step S2 specifically includes: presetting the value range of the hyperparameter.
5. A bridge performance degradation prediction method based on ensemble learning according to claim 4, It is characterized in that The hyperparameter optimization is achieved through grid search and cross validation.
6. In the bridge performance degradation prediction method based on ensemble learning according to claim 5, It is characterized in that The hyperparameters include hyperparameters of the random forest algorithm and hyperparameters of the gradient boosting regression tree algorithm; wherein the hyperparameters of the random forest algorithm include the first number of weak learners, the first maximum depth, and the maximum number of features, and the hyperparameters of the gradient boosting regression tree algorithm include the learning rate, the second number of weak learners, and the second maximum depth.
7. A bridge performance degradation prediction method based on ensemble learning according to claim 6, It is characterized in that The evaluation indicators for evaluating the model prediction performance in step S3 include root mean square error, mean absolute percentage error, and determination coefficient.
8. A bridge performance degradation prediction method based on ensemble learning according to claim 7, It is characterized in that The root mean square error, mean absolute percentage error, and determination coefficient are calculated as follows: ; ; ; Among them, RMSE stands for root mean square error; MAPE stands for mean absolute percentage error; R 2 represents the coefficient of determination; m represents the number of samples in the test set; i represents the subscript of the test set data; y i represents the true value; represents the predicted value; Represents the average value of the true value of the test set; SS res Represents the sum of squares of the difference between the true value and the predicted value; SS tot Represents the sum of squares of the differences between the true value and the mean of the true values.
9. A bridge performance degradation prediction method based on ensemble learning according to claim 8, It is characterized in that The evaluation result in step S3 meets the requirements that the root mean square error and the mean absolute percentage error have low values and the determination coefficient has high value.
10. A bridge performance degradation prediction device based on ensemble learning, used to execute the bridge performance degradation prediction method based on ensemble learning according to any one of claims 1 to 9, the prediction device comprising a processor, It is characterized in that The processor is provided with: An acquisition module is used to acquire a data set related to bridge performance, preprocess the acquired data set, and divide the processed data set into a training set and a test set; The training module is used to construct an integrated learning model, and use the training set to perform spatial selection and optimization on the hyperparameters in the integrated learning model to obtain a prediction model; the integrated learning model includes a random forest algorithm and a gradient boosting regression tree algorithm; The test module is used to input the test set into the prediction model to evaluate the model prediction performance; The detection module is used to input the data to be detected into the prediction model for processing, and the prediction model outputs the bridge performance prediction result.
Citation Information
Patent Citations
Bridge health monitoring method and system, computer and storage medium
CN113553749A
Office building rent prediction method and system based on Stacking ensemble learning algorithm
CN117635280A
Electronic data analysis method and system for digestive system department
CN117747113A
Method for predicting end-point quality of metallurgical process based on stacking integration strategy
CN118197463A
Basement structure design and safety evaluation method and equipment based on improved machine learning, and storage medium
CN118551616A
Cited By
Prediction method and system for technical conditions of bridge infrastructure
CN122114292A
