A risk mitigation method and device based on counterfactual generation

By adopting a risk mitigation method based on counterfactual generation in drilling and explosion tunnel construction, the problems of insufficient data and imbalance are solved, effective mitigation of over-digging risks and high generalization capabilities of the model are achieved, and more explanatory risk prediction and optimization solutions are provided.

CN119379004BActive Publication Date: 2025-05-16HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411625826.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-05-16
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

During the construction of drilling and explosion tunnels, the uncontrollable energy released by explosives leads to excessive under-digging, reducing load-bearing capacity and increasing accident and maintenance costs. The existing AI models have problems of overfitting and lack of explanatory ability in the case of insufficient data and imbalance.

Method used

The risk mitigation method based on counterfactual generation is adopted, and the target data set is obtained through two-stage data augmentation, the target model is trained to predict the risk of over-mining, and when the over-mining risk prediction data is greater than the threshold, the optimal counterfactual is obtained through the counterfactual generation algorithm, and the blasting parameters are optimized to reduce the risk of over-mining.

Benefits of technology

It effectively alleviates the risk of over-digging, improves the generalization ability of the model, provides more explanatory risk prediction and optimization solutions, and reduces construction risks and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379004B_ABST
    Figure CN119379004B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of tunnel construction, and specifically discloses a risk mitigation method and device based on counterfactual generation, the method comprising: obtaining drilling and blasting tunnel construction data; inputting drilling and blasting tunnel construction data into a target model, and obtaining over-excavation risk prediction data output by the target model; when the over-excavation risk prediction data is greater than the over-excavation threshold, accessing the target model and the target data set through a counterfactual generation algorithm, obtaining the optimal counterfactual corresponding to the drilling and blasting tunnel construction data, and guiding the optimization of blasting parameters to reduce the over-excavation risk; wherein the target model is obtained based on the training of the target data set, and the target data set is obtained through two-stage data enhancement. Through the present application, insufficient data and data imbalance of the data set can be avoided, the generalization ability of the model can be improved, the optimal counterfactual can be obtained, the blasting parameters can be effectively optimized, and risk mitigation can be guided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of tunnel construction, and more specifically, to a risk mitigation method and device based on counterfactual generation. Background Art

[0002] Tunnel construction is an important infrastructure to relieve traffic pressure in and outside cities. When crossing hard rock, the drill and blast method is highly regarded for its fast construction speed and cost-effectiveness. However, the drill and blast tunnel construction is considered high-risk due to the uncontrollable energy released by explosives. This energy may cause excessive damage to the surrounding rock mass, resulting in overbreak and underbreak, which in turn reduces the bearing capacity and causes accidents and high post-blasting maintenance costs. Therefore, controlling overbreak and underbreak to ensure the safety of such complex engineering systems is a major challenge.

[0003] In the existing technology, with the maturity of artificial intelligence (AI), machine learning (ML) and deep learning (DL) have gradually emerged in risk mitigation. These advanced technologies are able to learn the nonlinear relationship between geological features and blasting parameters, thereby predicting overbreak and underbreak. AI models have a strong ability to accurately predict overbreak and underbreak and optimize blasting parameters, thereby mitigating risks before construction. Although these technologies are widely used, they also have reliability issues: (1) Construction data are usually short and unbalanced. The data collection interval for drilling and blasting tunnel construction is long, resulting in small data samples and uneven distribution of different geological profiles. This limited data often leads to model overfitting, affecting its generalization ability for different geological features; (2) The developed risk mitigation models lack interpretability. Well-performing AI models are usually similar to "black boxes" and their outputs are difficult to interpret. This lack of transparency makes it impossible to understand how and why the AI ​​model generates its output, thereby undermining the trust of tunnel managers in using AI models to make appropriate safety decisions and making it difficult to effectively mitigate risks. These problems pose significant challenges to its practical application in engineering. Summary of the invention

[0004] In view of the shortcomings of the prior art, the purpose of this application is to use limited data to accurately assess the risks of blasting-based tunnel construction and effectively mitigate the risk of over-excavation.

[0005] To achieve the above objectives, in a first aspect, the present application provides a risk mitigation method based on counterfactual generation, the method comprising:

[0006] Obtain drill and blast tunnel construction data;

[0007] Input the drilling and blasting tunnel construction data into the target model, and obtain the over-excavation risk prediction data output by the target model (the over-excavation risk may specifically be the average over-excavation amount of each blasting section);

[0008] When the over-break risk prediction data is greater than the over-break threshold, the counterfactual generation algorithm is used to access the target model and target data set to obtain the optimal counterfactual corresponding to the drill-and-blast tunnel construction data, and guide the optimization of blasting parameters to reduce the over-break risk.

[0009] Among them, the target model is obtained through training based on the target data set, and the target data set is obtained through two-stage data enhancement. The first stage of data enhancement is to divide the historical data of drill and blast tunnel construction into different geological categories. The second stage of data enhancement is to process the historical data through a generative adversarial network to obtain synthetic data, and then combine the synthetic data with the historical data to obtain the target data set.

[0010] In a possible implementation, the counterfactual generation algorithm is used to access the target model and the target data set to obtain the optimal counterfactual corresponding to the drill-and-blast tunnel construction data, including:

[0011] Adopt the Diverse Counterfactual Explanation DiCE algorithm, access the target model and target dataset, and generate diverse counterfactuals;

[0012] The counterfactuals generated by the DiCE algorithm are screened to obtain the optimal counterfactuals.

[0013] In a possible implementation, the counterfactuals generated by the DiCE algorithm are screened to obtain the optimal counterfactuals, including:

[0014] Calculate the closeness of the counterfactual relative to the original input (the original drill-and-blast tunnel construction data);

[0015] Based on the angle tolerance and the proximity of the counterfactual to the original input, the counterfactuals generated by the DiCE algorithm are screened to obtain candidate counterfactuals;

[0016] The direction of the reverse search is determined based on the direction vector between the original input and the candidate counterfactual, and the candidate counterfactual is used as the starting point of the search. The counterfactual with a lower over-mining risk is searched along the reverse search direction according to the preset step size to obtain the optimal counterfactual. The over-mining risk of the optimal counterfactual is lower than the over-mining risk of the candidate counterfactual, and the direction vector points from the original input to the candidate counterfactual.

[0017] In a possible implementation, the counterfactuals generated by the DiCE algorithm are screened based on the angle tolerance and the proximity of the counterfactuals to the original input to obtain candidate counterfactuals, specifically including determining the candidate counterfactuals by the following formula:

[0018]

[0019] Where c represents the counterfactual, x represents the original input, p(c,x) represents the closeness of the counterfactual to the original input, and c i and c j are two different candidate counterfactuals, β represents the angle tolerance, and S2 represents the set of candidate counterfactuals.

[0020] In a possible implementation, the target data set is obtained through the following steps:

[0021] The historical data of drill-and-blast tunnel construction are divided into different geological categories using the K-means algorithm.

[0022] Through the conditional generative adversarial network (CTGAN), historical data is processed to obtain synthetic data, and the synthetic data is combined with historical data to obtain the target data set.

[0023] In a possible implementation, the target model is specifically an extreme gradient boosting XGBoost model.

[0024] In a second aspect, the present application provides a risk mitigation device based on counterfactual generation, comprising:

[0025] A data acquisition module, used to acquire drill and blast tunnel construction data;

[0026] A prediction module is used to input drilling and blasting tunnel construction data into the target model and obtain overbreak risk prediction data output by the target model;

[0027] The counterfactual generation module is used to access the target model and target data set through the counterfactual generation algorithm when the over-break risk prediction data is greater than the over-break threshold, obtain the optimal counterfactual corresponding to the drill-and-blast tunnel construction data, and guide the optimization of blasting parameters to reduce the over-break risk;

[0028] Among them, the target model is obtained through training based on the target data set, and the target data set is obtained through two-stage data enhancement. The first stage of data enhancement is to divide the historical data of drill and blast tunnel construction into different geological categories. The second stage of data enhancement is to process the historical data through a generative adversarial network to obtain synthetic data, and then combine the synthetic data with the historical data to obtain the target data set.

[0029] In a third aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect.

[0030] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0031] In a fifth aspect, the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0032] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the prior art:

[0033] Through the first stage of data enhancement, the historical data of tunnel construction by drilling and blasting can be divided into different geological categories. Through the second stage of data enhancement, the historical data can be processed by generative adversarial networks to obtain synthetic data, and the synthetic data can be combined with historical data to construct the target data set. The two-stage data enhancement can avoid insufficient data and data imbalance in the data set, and then the target model obtained by training the target data set has better generalization ability. The target model can maintain a high prediction accuracy in the face of different geological characteristics. At the same time, when the over-excavation risk prediction data is greater than the over-excavation threshold, the counterfactual generation algorithm can be used to access the target model and the target data set to obtain the optimal counterfactual. The over-excavation risk corresponding to the optimal counterfactual is lower than the over-excavation threshold, which can effectively optimize the blasting parameters and guide risk mitigation. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is one of the flowcharts of the risk mitigation method based on counterfactual generation provided in the embodiment of the present application;

[0035] Figure 2 This is the second flow chart of the risk mitigation method based on counterfactual generation provided in the embodiment of the present application;

[0036] Figure 3 It is a schematic diagram of the geological conditions of a part of the area of ​​the case tunnel provided in the embodiment of the present application;

[0037] Figure 4 is a schematic diagram of the clustering results of geological conditions provided in the embodiments of the present application;

[0038] Figure 5 This is one of the comparative schematic diagrams of overbreak prediction between DA-XGB and the baseline method provided in the embodiment of the present application;

[0039] Figure 6 This is the second comparative schematic diagram of over-excavation prediction between DA-XGB and the baseline method provided in the embodiment of the present application;

[0040] Figure 7 It is a verification diagram of counterfactuals generated by using DA-XGB and RF for query example 1 by changing blasting parameters provided in an embodiment of the present application;

[0041] Figure 8 It is a verification diagram of the counterfactual generated by using DA-XGB and RF by changing the blasting parameters for query instance 2 provided in an embodiment of the present application;

[0042] Fig. 9 It is a verification diagram of the counterfactual generated by using DA-XGB and RF by changing the blasting parameters for query instance 3 provided in the embodiment of the present application;

[0043] Fig.10 It is a verification diagram of the counterfactual generated by using DA-XGB and RF by changing the blasting parameters for query instance 4 provided in the embodiment of the present application;

[0044] Fig.11 It is a verification diagram of the counterfactual generated by using DA-XGB and RF by changing the blasting parameters for query instance 5 provided in the embodiment of the present application;

[0045] Fig.12 It is a verification diagram of the counterfactual generated by using DA-XGB and RF by changing the blasting parameters for query instance 6 provided in an embodiment of the present application;

[0046] Fig.13 is a schematic diagram comparing the approximately optimal counterfactual and the diversified counterfactual provided in the embodiment of the present application;

[0047] Fig.14 is a schematic diagram of the structure of a risk mitigation device based on counterfactual generation provided in an embodiment of the present application;

[0048] Fig.15 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0051] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.

[0052] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.

[0053] Figure 1 is one of the flow charts of the risk mitigation method based on counterfactual generation provided in the embodiment of the present application, such as Figure 1 As shown, the method includes the following steps S101, S102 and S103.

[0054] Step S101, obtaining drill and blast tunnel construction data;

[0055] Step S102, inputting the drilling and blasting tunnel construction data into the target model, and obtaining the overbreak risk prediction data output by the target model (the overbreak risk may specifically be the average overbreak amount of each blasting section);

[0056] Step S103, when the overbreak risk prediction data is greater than the overbreak threshold, the target model and the target data set are accessed through the counterfactual generation algorithm to obtain the optimal counterfactual corresponding to the drill and blast tunnel construction data, and guide the optimization of blasting parameters to reduce the overbreak risk;

[0057] Among them, the target model is obtained through training based on the target data set, and the target data set is obtained through two-stage data enhancement. The first stage of data enhancement is to divide the historical data of drill and blast tunnel construction into different geological categories. The second stage of data enhancement is to process the historical data through a generative adversarial network to obtain synthetic data, and then combine the synthetic data with the historical data to obtain the target data set.

[0058] It can be understood that through the first stage of data enhancement, the historical data of tunnel construction by drilling and blasting can be divided into different geological categories. Through the second stage of data enhancement, the historical data can be processed by generative adversarial networks to obtain synthetic data, and the synthetic data can be combined with historical data to construct a target data set. The use of two-stage data enhancement can avoid insufficient data and data imbalance in the data set, and then the target model obtained by training the target data set has better generalization ability. The target model can maintain a high prediction accuracy in the face of different geological characteristics. At the same time, when the over-excavation risk prediction data is greater than the over-excavation threshold, the counterfactual generation algorithm can be used to access the target model and the target data set to obtain the optimal counterfactual. The over-excavation risk corresponding to the optimal counterfactual is lower than the over-excavation threshold, which can effectively optimize the blasting parameters and guide risk mitigation.

[0059] Therefore, through the above two-stage data enhancement and counterfactual generation, the risk of over-mining can be effectively alleviated while improving the generalization ability of the model.

[0060] The following is an illustrative description of the risk mitigation method based on counterfactual generation provided in this application with reference to several examples.

[0061] The risk mitigation method based on counterfactual generation includes the following steps S1-S4:

[0062] Step S1, data preprocessing, including collecting historical data of tunnel construction using the drill and blast method, and preprocessing the data;

[0063] Step S2, data enhancement: A two-stage data enhancement technique is used. First, the K-means algorithm is used to automatically identify geological conditions and divide the data set into different geological categories. Then, the CTGAN algorithm is used to generate synthetic data for each geological category to enhance the availability and balance of the data.

[0064] Step S3: constructing a risk prediction model, using enhanced data to train an extreme gradient boosting (XGBoost) model to predict the over-excavation risk during tunnel excavation;

[0065] Step S4, counterfactual generation, using the Diverse Counterfactual Explanations (DiCE) algorithm to generate diverse counterfactual explanations, and filter out the approximate optimal counterfactuals through multi-layer filters to optimize the blow-up parameters and mitigate risks.

[0066] The DiCE algorithm is an algorithm for explaining machine learning models. It explains the model's predictions by generating "counterfactual" data points that are close to the original input but diverse. These "counterfactual" data points show how the input data needs to change to lead to changes in the model output. The core idea of ​​the DiCE algorithm is to set the search for counterfactual explanations as an optimization problem, similar to finding adversarial examples. It focuses on perturbations that change the output of machine learning models, and these perturbations need to be diverse and feasible. DiCE supports the generation of a set of counterfactual explanations and has parameters for adjusting the diversity and proximity of explanations. It also supports simple constraints on features to ensure the feasibility of the generated counterfactual examples.

[0067] In the specific counterfactual generation process, DiCE usually performs the following steps. (1) Select input sample: Select an input sample for which a counterfactual needs to be generated. (2) Obtain model prediction: Obtain the prediction result of the sample through the model. When generating counterfactuals, it is necessary to know the prediction result of the original input sample. DiCE will generate counterfactual examples that can change the prediction based on this result. (3) Generate counterfactuals: Generate multiple counterfactual examples based on the model's prediction results and the feature distribution of the training data. These examples should be reasonable in the feature space and be able to change the model's prediction.

[0068] The DiCE algorithm generally requires access to a trained model. For example, by accessing a trained model to obtain the prediction result: When generating counterfactuals, you first need to know the prediction result of the original input sample. DiCE will generate counterfactual examples that can change the prediction based on this result. For example, if the model predicts that a sample is "positive", DiCE will try to generate a counterfactual so that the model's prediction for the sample becomes "negative". For example, by accessing a trained model to calculate gradient information: In some implementations, DiCE may use the gradient information of the model to guide the generation process of counterfactuals. By calculating the impact of input features on model output, DiCE can more effectively adjust feature values ​​to generate reasonable counterfactuals.

[0069] DiCE algorithms generally also require access to training data. For example, access to training data ensures feasibility: the generated counterfactuals need to be reasonable in the feature space, that is, they should be samples that are likely to appear in the training data. By referring to the training data, DiCE can ensure that the generated counterfactuals do not exceed the distribution range of the data. For example, access to training data ensures diverse generation: by analyzing the distribution of training data, DiCE can generate diverse counterfactual examples, ensuring that these examples are sufficiently different in the feature space, thereby providing a more comprehensive explanation.

[0070] In step S2, the K-means algorithm is used to automatically cluster the geological conditions and generate synthetic data for each type of geological condition based on the clustering results to enhance the validity of the data. (1) ,x (2) ,…,x (n)} and cluster center K, K-means algorithm finds K clusters by minimizing the square sum criterion from points within the class to the centroid. The specific formula is as follows:

[0071]

[0072] Among them, x (i) represents the input data point, μ (k) Representation Cluster The center of mass, ||x (i) -μ (k) || 2 is the square of the Euclidean distance from the data point to the centroid.

[0073] The K-means algorithm usually uses the silhouette coefficient as a key performance indicator (KPI) to evaluate clustering performance, which is defined as follows:

[0074]

[0075] Here, a is the average distance between a sample and all other points in the same class, and b is the average distance between a sample and all other points in the nearest cluster.

[0076] In step S2, CTGAN (Conditional Generative Adversarial Network) is a generative adversarial network (GAN) used to generate data with conditional attributes. CTGAN generates high-quality synthetic data through adversarial training of the generator and the discriminator. CTGAN consists of a generator and a discriminator. The goal of the discriminator c(·) is to identify the difference between real data and synthetic data. During the training process, CTGAN continuously optimizes the generator to generate data that is very close to the conditional distribution of real data. When the discriminator cannot distinguish the generated data from the real data, the CTGAN model training is completed and the final synthetic data can be generated. The loss function of the generator is And the loss function of the discriminator As shown below:

[0077]

[0078] Among them, m is the batch size, pac is the batch processing size, cond represents the conditional vector, and r represents the current synthetic data and real data. and m i* Represent the i-th one-hot condition vector and its associated mask vector respectively.

[0079] In step S3, the XGBoost model achieves high-precision prediction of over-excavation risk by training the enhanced data.

[0080] In step S4, the counterfactual explanation generated by the DiCE algorithm takes into account diversity, proximity, user constraints, and sparsity, and defines a specific loss function that includes various constraints:

[0081] Diversity term: controls the differences between counterfactuals and is constructed from the determinant of the distance function, expressed as:

[0082]

[0083] where dist(c i ,c j ) is the distance measure between two counterfactuals, det represents the determinant;

[0084] Proximity term: Determine the change between the counterfactual and the input. Use Manhattan distance to calculate the vector distance. The average proximity of a set of counterfactuals is defined as follows:

[0085]

[0086] Here, k represents the number of counterfactuals.

[0087] User constraints: allow users to control the range of counterfactuals to make them consistent with physical laws and human constraints;

[0088] Sparsity constraint: Try to make the counterfactual change as little as possible relative to the original input;

[0089] The final loss function for the counterfactual is defined as follows:

[0090]

[0091] y represents the true value of the counterfactual over-digging risk, f represents the predicted value of the counterfactual over-digging risk, MSE represents the mean squared error, and λ1 and λ2 are preset parameters.

[0092] In step S4, two key definitions are given:

[0093] (1) Validity ε:

[0094] ε-validity:f(c)∈d(c)[(1-ε),(1+ε)];

[0095] Where c is the counterfactual to be verified, f is the machine learning verifier, and d is the expected output of the counterfactual;

[0096] (2) Proximity:

[0097]

[0098] Here, m is the number of variables in the vector and x is the original input.

[0099] The multi-layer filter selects the approximately optimal counterfactual, including the following steps S201-S203:

[0100] Step S201, calculate the proximity of the counterfactuals to the original input and sort them. For each counterfactual in the set S, calculate their proximity to the input x, pair them to form a new set S1, and arrange the elements in increasing order;

[0101] S1={(c,p(c,x))};

[0102] Step S202, filtering counterfactuals based on diversity. In this step, cosine distance is used to filter out counterfactuals with a short distance, and an angle tolerance β is set. Let S2 represent the diversity candidate counterfactuals selected from S1 under the diversity criterion.

[0103]

[0104] Step S203, perform reverse linear search. In S2, reverse linear search is performed. This step uses a reverse linear search algorithm to find the counterfactual that is close to the decision boundary of the machine learning model and is closest to the input among all feasible counterfactuals, that is, the optimal counterfactual.

[0105] Reverse linear search: (1) Calculate the vector between the current counterfactual and the input to determine the direction in which the DiCE algorithm modifies the input to break through the model decision boundary; (2) Based on the DiCE counterfactual, further adjust the counterfactual in this direction with a specific step size to make it further approach a smaller output (risk).

[0106] Example: Input vector (1,0), DiCE generates counterfactual (0,0), direction (-1,0). Assuming the step size is 0.1, the reverse search will continue to try (-0.1,0), (-0.2,0), and so on, to determine whether the model output can be further reduced.

[0107] The following is a specific application of a method for mitigating tunnel blasting construction risks based on counterfactual generation. The flowchart of the method in this specific application is as follows: Figure 2 shown.

[0108] 1. Data collection.

[0109] The case selected is a single-line double-track railway tunnel constructed by drill and blast method, with a total length of about 2.4 km. The construction data were collected through a collaborative effort between the contractor and the researchers, which mainly included three steps: (1) Conducting geological surveys to identify the geological type and the properties of the surrounding rocks, e.g. Figure 3 (2) 3D scanning is performed after blasting to capture the outline of the tunnel; (3) the point cloud model is aligned with the design model to calculate the overbreak. The blasting parameters recorded by the construction personnel are pre-designed and adjusted on site based on experience.

[0110] By analyzing relevant studies, uniaxial compressive strength (UCS) and rock density (RD) were selected as representatives of geological parameters. Among the blasting parameters, total charge (TC), minimum resistance line (W), cut hole spacing (CS) and peripheral hole spacing (E) were selected. The risk is the average overbreak of each blasting section. After filtering out missing values ​​and obvious outliers, there are a total of 113 sets of raw data.

[0111] 2. Data enhancement and validity testing.

[0112] To simulate the actual situation, the collected data are divided into training set and test set in a ratio of 8:2. The training set contains 90 samples and the test set contains 23 samples. The training set represents the excavated section, while the test set simulates the unexcavated section. The geological conditions of the training set are analyzed using the K-means algorithm. Figure 4 When the geological conditions were clustered into two categories, the K-means algorithm performed best with a silhouette coefficient of 0.707, with 69 samples belonging to one category and 21 samples belonging to the other. This result reflects the significance of limestone in the actual project and highlights the imbalance of feature representation in the training data.

[0113] Next, the CTGAN model was trained to enhance the features of the two geological conditions. Due to the lack of quantitative indicators in the data synthesis task, the hyperparameters were repeatedly adjusted through preliminary experiments, and finally the appropriate hyperparameter configuration to ensure the validity of the data was determined. The structures of the generator and the discriminator are both two hidden layers, each containing 256 neurons, and the learning rate is set to 2×10 -4 The training uses the Adam optimizer and the weight decay is set to 1×10 -6 , the number of training rounds and batch size are set to 1000 and 200 respectively. For each geological feature, 250 sets of samples are generated, and finally a synthetic dataset containing 500 sets of samples is generated. To further improve the authenticity of the data, the synthetic data are combined with the real data to form the final mixed dataset.

[0114] The effectiveness of the synthetic dataset is verified from two statistical perspectives. First, the basic statistical indicators of the two datasets are compared, as shown in Table 1. The extreme values ​​of each variable in the two datasets are the same. In addition, the mean and standard deviation are also very close, proving that the synthetic data reflects the characteristics of the real data well.

[0115] Table 1 Statistical indicators of real datasets and synthetic datasets

[0116]

[0117] Based on these analyses, the CTGAN model can effectively learn the underlying characteristics of real data and generate high-quality synthetic data, effectively solving the problems of insufficient and imbalanced data.

[0118] 3. Prediction of over-excavation and under-excavation.

[0119] The XGBoost model was trained with a fully validated mixed dataset and its performance was evaluated. To verify the effectiveness of data augmentation, the XGBoost, random forest (RF) and deep neural network (DNN) models were trained with the original training set as comparisons. The hyperparameters of all algorithms were adjusted by grid search to determine the coefficient R 2 As performance indicators, they are shown in Table 2.

[0120] Table 2 Hyperparameter settings of the proposed method and baseline model

[0121]

[0122] The prediction performance of the proposed method and the baseline model is measured by four key performance indicators (KPIs), which can be calculated by the following formulas: (1) Coefficient of determination (R 2 ); (2) root mean square error (RMSE); (3) mean absolute error (MAE); (4) mean absolute percentage error (MAPE). Figure 5 (The data numbers in the figure are the numbers of the data samples), Figure 6 (The monitoring data in the figure represents the actual monitored over-excavation) and Table 3 show the prediction results and performance of the test set.

[0123]

[0124] Table 3 Key performance indicators of DA-XGB and baseline methods in the test

[0125] Performance Indicators DA-XGB XGBoost RF DNN R2 0.883 0.782 0.739 0.764 RMSE 1.335 1.822 1.990 1.892 MAE 1.124 1.225 1.561 1.335 MAPE 0.050 0.051 0.076 0.060

[0126] Obviously, DA-XGB (the trained model obtained by training XGBoost with a two-stage data augmentation dataset) outperforms other commonly used algorithms and achieves the most satisfactory accuracy. DA-XGB achieved the highest R2 (0.883), and the lowest RMSE (1.335), MAE (1.124), and MAPE (0.05). The gap between the predicted value and the monitored value is relatively small. In the monitoring-prediction coordinate system, the data points are close to the straight line y=x, indicating that the two are highly consistent. The results prove the reliability of XGBoost in over-mining prediction and the effectiveness of data enhancement.

[0127] According to China's Railway Tunnel Construction Technical Guidelines (TZ 204-2008) and engineering practice, an average overbreak of less than 20 cm is considered acceptable. According to risk prediction, most of the construction scenarios will exceed the overbreak threshold. Therefore, the risk status of the tunnel is not optimistic, and parameter optimization technology is needed to guide the adjustment of the construction process.

[0128] 4. Optimization of blasting parameters.

[0129] Six samples (called query instances) with over-mining exceeding the criterion are selected to test the counterfactual generation algorithm and discuss the corresponding risk mitigation strategies. The test consists of two steps. First, the effectiveness of the diversified counterfactuals generated by DiCE is evaluated. Second, it is verified whether the proposed multi-layer filter effectively approximates the optimal counterfactual.

[0130] DiCE generates 40 counterfactuals for each query instance, 20 counterfactuals are generated by modifying blasting parameters, and the other 20 counterfactuals are generated by modifying geological parameters. Table 4 shows some counterfactuals examples and their corresponding query instances. Taking query instance 1 as an example, explain how counterfactuals guide risk mitigation. The counterfactuals suggest adjusting the cut hole spacing from 80 cm to 50.4 cm and the peripheral hole spacing from 70 cm to 66.8 cm. These adjustments reduce over-excavation from 21.795 cm to 19.345 cm. In addition, the current construction plan should better match the uniaxial compressive strength of 39.3 MPa and the tensile strength of 2.8 g / cm 3 of rock density, which would reduce the overbreak to 19.525 cm.

[0131] Table 4. Examples of counterfactuals generated for six different query instances

[0132]

[0133] First, the validity of the counterfactuals is verified. Since DiCE usually requires access to the training model and its data when generating counterfactuals, this raises the question of whether the counterfactuals are only applicable to a specific model architecture. To address this issue, DA-XGB (i.e., the original training model) and the Random Forest (RF) model (i.e., a training-independent machine learning model) are selected as validators to check the generalizability of the counterfactuals.

[0134] The results of the verification experiment are as follows Figure 7-12 As shown. It can be seen that all cases achieved good results in the DA-XGB-based verification, with the predicted values ​​highly consistent with the counterfactual results, the root mean square error (RMSE) less than 0.2, and ε (effectiveness) less than 0.017. As expected, the random forest model has a poor prediction effect on counterfactuals, and the results are mediocre in most experiments. This shows that when generating counterfactuals, the architecture of the training model has an important impact on counterfactual generation. However, analyzing the prediction results of the random forest shows that counterfactuals still enable the machine learning model to generate prediction results that are significantly smaller than the initial over-mining. This means that the counterfactual is closer to the decision boundary of the machine learning model than the original query instance. Although the results are not completely accurate, the DiCE algorithm still achieves the goal of reducing over-mining in a completely black box system, that is, an unknown trainer, proving the reliability and effectiveness of the generated counterfactuals.

[0135] Next, the proposed multi-layer filter is used to further optimize counterfactuals and reduce the risk of over-mining. The hyperparameter settings of the multi-layer filter are determined through preliminary experiments, and the results are shown in Table 5. These parameters effectively filter out similar counterfactuals while retaining potential candidate counterfactuals. The approximate optimal counterfactuals for each query instance are shown in Table 6. Obviously, the counterfactual values ​​generated by the counterfactual generation algorithm proposed in this application are smaller than those generated by DiCE, further breaking through the decision boundary of DA-XGB. The results show that the counterfactual generation algorithm proposed in this application is highly effective in optimizing blasting parameters and promoting risk mitigation.

[0136] Table 5 Parameter settings of multi-layer filter

[0137]

[0138]

[0139] Table 6 Approximately optimal counterfactuals for each query instance

[0140]

[0141] In addition, a metric is designed to evaluate the feasibility of generating counterfactuals and assess the importance of input features.

[0142] Defining sparsity: Sparsity indicates the degree of parameter variation in the counterfactual. The higher the sparsity, the fewer parameters need to be changed in the counterfactual relative to the original input. The less the feature changes, the more feasible the counterfactual is. Sparsity can be calculated by the following formula:

[0143]

[0144] Where n is the number of counterfactuals generated and m is the number of variables. When each variable in the counterfactual changes, the count value is increased by 1.

[0145] Fig.13 A comparison of near-optimal counterfactuals with diverse counterfactuals in terms of closeness (lower is better) and sparsity (higher is better) is shown. The results show that near-optimal counterfactuals perform comparable to most DiCE-generated counterfactuals in terms of closeness and sparsity. This result indicates that the counterfactual generation algorithm proposed in this application can discover higher-quality counterfactuals (i.e., lower counterfactual values) without reducing enforceability, thereby optimizing blowup parameters in engineering scenarios and helping guide risk mitigation.

[0146] In summary, the counterfactual generation framework provided in this application significantly improves the ability to mitigate risks in tunnel blasting construction and provides more interpretable risk prediction and optimization solutions.

[0147] The risk mitigation device based on counterfactual generation provided in the present application is described below. The risk mitigation device based on counterfactual generation described below and the risk mitigation method based on counterfactual generation described above can be referenced to each other.

[0148] Fig.14 is a schematic diagram of the structure of a risk mitigation device based on counterfactual generation provided in an embodiment of the present application, such as Fig.14 As shown, the device includes: a data acquisition module 10, a prediction module 20 and a counterfactual generation module 30. Among them:

[0149] A data acquisition module 10, for acquiring drill and blast tunnel construction data;

[0150] Prediction module 20, used for inputting drilling and blasting tunnel construction data into the target model, and obtaining overbreak risk prediction data output by the target model;

[0151] The counterfactual generation module 30 is used to access the target model and the target data set through the counterfactual generation algorithm to obtain the optimal counterfactual corresponding to the drilling and blasting tunnel construction data when the over-break risk prediction data is greater than the over-break threshold, so as to guide the optimization of blasting parameters to reduce the over-break risk;

[0152] Among them, the target model is obtained through training based on the target data set, and the target data set is obtained through two-stage data enhancement. The first stage of data enhancement is to divide the historical data of drill and blast tunnel construction into different geological categories. The second stage of data enhancement is to process the historical data through a generative adversarial network to obtain synthetic data, and then combine the synthetic data with the historical data to obtain the target data set.

[0153] It can be understood that the detailed functional implementation of each of the above-mentioned units / modules can be found in the introduction of the aforementioned method embodiment, and will not be repeated here.

[0154] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program module in the device are similar to those described in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method, which will not be repeated here.

[0155] Based on the method in the above embodiment, an embodiment of the present application provides an electronic device, Fig.15 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Fig.15 As shown, the electronic device may include: a processor (Processor) 810, a communication interface (CommunicationsInterface) 820, a memory (Memory) 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call the logic instructions in the memory 830 to execute the method in the above embodiment.

[0156] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0157] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.

[0158] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0159] It is understandable that the processor in the embodiment of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0160] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0161] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

[0162] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0163] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A risk mitigation method based on counterfactual generation, characterized in that: include: Obtain drill and blast tunnel construction data; Input the drill and blast tunnel construction data into the target model and obtain the overbreak risk prediction data output by the target model; When the over-break risk prediction data is greater than the over-break threshold, the counterfactual generation algorithm is used to access the target model and target data set to obtain the optimal counterfactual corresponding to the drill-and-blast tunnel construction data, and guide the optimization of blasting parameters to reduce the over-break risk. Among them, the target model is obtained through training based on the target data set, and the target data set is obtained through two-stage data enhancement. The first stage of data enhancement is to divide the historical data of drill and blast tunnel construction into different geological categories. The second stage of data enhancement is to process the historical data through a generative adversarial network to obtain synthetic data, and then combine the synthetic data with the historical data to obtain the target data set.

2. The risk mitigation method based on counterfactual generation according to claim 1, characterized in that: The method of accessing the target model and the target data set through the counterfactual generation algorithm to obtain the optimal counterfactual corresponding to the drill and blast tunnel construction data includes: Adopt the Diverse Counterfactual Explanation DiCE algorithm, access the target model and target dataset, and generate diverse counterfactuals; The counterfactuals generated by the DiCE algorithm are screened to obtain the optimal counterfactuals and guide the optimization of blasting parameters to reduce the risk of over-excavation.

3. The risk mitigation method based on counterfactual generation according to claim 2, characterized in that: The counterfactuals generated by the DiCE algorithm are screened to obtain the optimal counterfactuals, including: Compute the closeness of the counterfactual relative to the original input; Based on the angle tolerance and the proximity of the counterfactual to the original input, the counterfactuals generated by the DiCE algorithm are screened to obtain candidate counterfactuals; The direction of the reverse search is determined based on the direction vector between the original input and the candidate counterfactual, and the candidate counterfactual is used as the starting point of the search. The counterfactual with a lower over-mining risk is searched along the reverse search direction according to the preset step size to obtain the optimal counterfactual. The over-mining risk of the optimal counterfactual is lower than the over-mining risk of the candidate counterfactual, and the direction vector points from the original input to the candidate counterfactual.

4. The risk mitigation method based on counterfactual generation according to claim 3, characterized in that: The counterfactuals generated by the DiCE algorithm are screened based on the angle tolerance and the proximity of the counterfactuals to the original input to obtain candidate counterfactuals, specifically including determining the candidate counterfactuals by the following formula: Where c represents the counterfactual, x represents the original input, p(c,x) represents the closeness of the counterfactual to the original input, and c i and c j are two different candidate counterfactuals, β represents the angle tolerance, and S2 represents the set of candidate counterfactuals.

5. The risk mitigation method based on counterfactual generation according to claim 1, characterized in that: The target data set is obtained by following the steps below: The historical data of drill-and-blast tunnel construction are divided into different geological categories using the K-means algorithm. Through the conditional generative adversarial network (CTGAN), historical data is processed to obtain synthetic data, and the synthetic data is combined with historical data to obtain the target data set.

6. The risk mitigation method based on counterfactual generation according to any one of claims 1 to 5, characterized in that: The target model is specifically an extreme gradient boosting XGBoost model.

7. A risk mitigation device based on counterfactual generation, characterized in that: include: A data acquisition module, used to acquire drill and blast tunnel construction data; A prediction module is used to input drilling and blasting tunnel construction data into the target model and obtain overbreak risk prediction data output by the target model; The counterfactual generation module is used to access the target model and target data set through the counterfactual generation algorithm when the over-break risk prediction data is greater than the over-break threshold, obtain the optimal counterfactual corresponding to the drill-and-blast tunnel construction data, and guide the optimization of blasting parameters to reduce the over-break risk; Among them, the target model is obtained through training based on the target data set, and the target data set is obtained through two-stage data enhancement. The first stage of data enhancement is to divide the historical data of drill and blast tunnel construction into different geological categories. The second stage of data enhancement is to process the historical data through a generative adversarial network to obtain synthetic data, and then combine the synthetic data with the historical data to obtain the target data set.

8. An electronic device, characterized in that: include: at least one memory for storing a computer program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program runs on a processor, the processor is caused to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that When the computer program product runs on a processor, the processor is caused to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for automatically matching and optimizing blasting parameters based on drilling parameters and back break results

    CN115238564A

  • Method and system for evaluating and improving tunnel blasting effect

    CN118411616A