A Smart Monitoring and Early Warning Method for Tunnel Construction Environment Data
By collecting data in the tunnel construction environment, constructing a training set, and adjusting the depth of the decision tree, the false alarm and missed alarm problems of traditional tunnel construction environment early warning methods are solved, and more accurate prediction and early warning are achieved.
Patent Information
- Application Number
- CN202510424152.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-04-07
AI Technical Summary
Traditional early warning methods for tunnel construction environments ignore the interrelationships between variables, leading to false alarms or missed alarms. Furthermore, improper setting of the decision tree depth in random forest models affects the accuracy of predictions.
By collecting historical data on tunnel construction environment to form a training set, the initial maximum depth of the decision tree is calculated, and the optimal maximum depth of the decision tree is adjusted according to the complexity of the sample and the complexity of the environmental data, and the final random forest model is constructed for monitoring.
It improves the accuracy of prediction and the reliability of early warning of tunnel construction environment data, avoids overfitting and underfitting of the model, and enhances the robustness of the model.
Smart Images

Figure CN120296579B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tunnel construction environment technology, and specifically to a method for intelligent monitoring and early warning of tunnel construction environment data. Background Technology
[0002] Tunnels are engineering structures buried underground, representing a form of human utilization of underground space. Tunnel construction involves complex environments, requiring the coordinated operation of machinery and manpower. The work is inherently dangerous and carries significant safety risks. Therefore, to ensure the safe conduct of tunnel construction operations, comprehensive monitoring of the tunnel construction environment is essential to promptly identify potential safety hazards and implement preventative measures to avoid accidents.
[0003] Tunnel construction environment data involves various environmental factors, including temperature, humidity, gas concentration, noise, and vibration. Traditionally, warnings are issued by setting thresholds for each indicator. However, this method ignores the interrelationships between variables and is sensitive to noise or outliers, making it prone to false alarms or missed alarms. Random forests, with their ability to automatically uncover complex relationships in various construction environment data and their robustness, can be used to predict and issue warnings for current construction environment data. However, the maximum depth of decision trees in random forests is often set based on experience. Excessive depth may lead to overfitting and reduced generalization ability, while insufficient depth may lead to underfitting, affecting prediction accuracy and consequently the accuracy of construction environment safety monitoring. Summary of the Invention
[0004] To address the aforementioned technical problems, the present invention aims to provide a smart monitoring and early warning method for tunnel construction environment data. The specific technical solution adopted is as follows:
[0005] One embodiment of the present invention provides a method for intelligent monitoring and early warning of tunnel construction environment data, the method comprising:
[0006] Samples are obtained using historical data of tunnel construction environment, and a training set for decision trees of random forest is obtained based on the samples; the decision trees are trained using the training set to obtain the initial maximum depth of each decision tree.
[0007] The sample complexity of the training set is calculated based on the information entropy of the labels of each sample in the training set and the samples with the same labels.
[0008] The complexity of the tunnel construction environment historical data is calculated by using the difference between each feature of each sample in the training set and its neighboring data in the corresponding tunnel construction environment historical data, as well as the position of each feature of each sample in the corresponding tunnel construction environment historical data.
[0009] The overall complexity of the training set is obtained by averaging the sample complexity of the training set and the complexity of the historical data of the tunnel construction environment; the initial maximum depth of the decision tree corresponding to the training set is adjusted according to the overall complexity to obtain the optimal maximum depth.
[0010] The final random forest model is obtained by training the training set based on the optimal maximum depth of each decision tree, and the tunnel construction environment is monitored.
[0011] Preferably, the training set for obtaining the decision tree of the random forest based on the samples includes:
[0012] The samples are divided into training and test sets using cross-validation. Each sample in the training set is labeled, and the training set corresponding to each decision tree in the random forest is obtained by sampling from the labeled training set using random sampling with replacement.
[0013] Preferably, the decision trees are trained using the training set to obtain the initial maximum depth of each decision tree, including:
[0014] Set the maximum empirical depth value, train each decision tree based on the training set of each decision tree, and adjust the maximum empirical depth of the random forest using cross-validation after training to obtain the initial maximum depth of each decision tree.
[0015] Preferably, the sample complexity of the training set is calculated based on the information entropy of the labels of samples in each training set and the samples with the same labels, including:
[0016] Obtain the information entropy of the labels of the samples in the training set and normalize it to obtain the sample disorder level; take the number of samples with the same label that have the most identical numbers, and record it as the maximum identical number; compare the number of samples in the training set with the sum of the maximum identical number and the hyperparameter and normalize it to obtain the sample independence level; and sum the sample disorder level and the sample independence level by weight to obtain the sample complexity of the training set.
[0017] Preferably, the complexity of calculating historical data on the tunnel construction environment includes:
[0018] The historical construction environment data corresponding to each feature in the sample is segmented to obtain the data segment of the historical construction environment data corresponding to each feature. The data segment of each feature is obtained according to the position of each feature in the corresponding historical construction environment data. The length of the data segment is a preset length.
[0019] The calculation model for the complexity of the historical tunnel construction environment data corresponding to the sample set is as follows:
[0020] ,
[0021] in, The complexity of the historical tunnel construction environment data corresponding to the training set of the i-th decision tree is indicated; norm represents the normalization function; K represents the number of samples contained in the training set corresponding to the decision tree; and M represents the number of features in a sample. This represents the value of the m-th feature in the j-th sample of the training set corresponding to the i-th decision tree in the historical data of the corresponding tunnel construction environment. This represents the value of the m-th feature in the j-th sample of the corresponding tunnel construction environment historical data at the next adjacent time step for the i-th decision tree. This represents the value of the m-th feature in the j-th sample of the corresponding tunnel construction environment in the next adjacent time step in the historical data of the corresponding tunnel construction environment; This indicates the data segment to which the m-th feature in the j-th sample of the training set corresponding to the i-th decision tree belongs in the historical data of the tunnel construction environment. This indicates the data segment to which the m-th feature in the (j+1)-th sample of the i-th decision tree belongs in the corresponding historical data of tunnel construction environment. This represents the Spearman correlation coefficient between the two data segments.
[0022] Preferably, the optimal maximum depth is obtained by adjusting the initial maximum depth of the decision tree corresponding to the training set according to the overall complexity, including:
[0023] Set adjustment lower and upper thresholds. When the overall complexity of the training set of a decision tree is greater than the adjustment lower threshold but less than the adjustment upper threshold, the optimal maximum depth of the decision tree is the initial maximum depth. When the overall complexity of the training set of a decision tree is less than or equal to the adjustment lower threshold, a first adjustment parameter is obtained by negatively mapping the overall complexity using an exponential function with the natural constant as the base. The initial maximum depth is subtracted from the first adjustment parameter and rounded down to obtain the optimal maximum depth of the decision tree. When the overall complexity of the training set of a decision tree is greater than or equal to the adjustment upper threshold, a second adjustment parameter is obtained by mapping the overall complexity using an exponential function with the natural constant as the base and adding it to a preset value. The initial maximum depth is added to the second adjustment parameter and rounded down to obtain the optimal maximum depth of the decision tree.
[0024] Preferably, monitoring the tunnel construction environment includes:
[0025] The current tunnel construction environment data is input into the final random forest model, and the prediction results are output. If the prediction results are abnormal, an early warning is issued.
[0026] The embodiments of this invention have at least the following beneficial effects: This invention collects historical data on tunnel construction environments to form samples, obtaining a training set for initial training of a random forest model, obtaining the initial maximum depth of each decision tree, thus ensuring model performance; furthermore, it analyzes the distribution of the training set using the labels of the samples corresponding to each decision tree, obtaining the sample complexity of the training set, and then deeply analyzes the situation of each feature in the samples within the corresponding historical data of tunnel construction environments to obtain the complexity of the historical data of tunnel construction environments. A comprehensive analysis of the complexity of the training set is then conducted by combining the sample complexity and the complexity of the historical data of tunnel construction environments. The system first determines the overall complexity of the training set. Then, it adjusts the initial maximum depth of the decision tree corresponding to the training set based on the overall complexity to obtain the optimal maximum depth. This avoids underfitting when the depth is too small when the complexity of the training set is high, and overfitting when the depth is too large when the complexity of the training set is low. Finally, the random forest model is trained again using the training set based on the optimal maximum depth to obtain the final random forest model. This model is then used to monitor the tunnel construction environment, improving the robustness of the final random forest model and making the prediction and early warning of the current tunnel construction environment data more accurate and reliable. Attached Figure Description
[0027] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0028] Figure 1 A flowchart illustrating a method for intelligent monitoring and early warning of tunnel construction environment data, provided in an embodiment of the present invention. Detailed Implementation
[0029] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a smart monitoring and early warning method for tunnel construction environmental data proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0031] The following description, in conjunction with the accompanying drawings, details the specific scheme of the intelligent monitoring and early warning method for tunnel construction environment data provided by this invention.
[0032] Example:
[0033] The main application scenario of this invention is: collecting environmental data during tunnel construction, then using a random forest model to predict whether the construction environment is abnormal, and then judging whether the construction environment is abnormal. If an abnormality occurs, an early warning is issued in time, thereby ensuring construction safety.
[0034] Please see Figure 1 The diagram illustrates a flowchart of a smart monitoring and early warning method for tunnel construction environment data provided by an embodiment of the present invention. The method includes the following steps:
[0035] Step S1: Obtain samples using historical data of tunnel construction environment, and obtain a training set for the decision trees of random forest based on the samples; use the training set to train the decision trees and obtain the initial maximum depth of each decision tree.
[0036] When monitoring the tunnel construction environment, it is necessary to collect environmental data for monitoring and early warning. Therefore, in this embodiment, it is necessary to collect environmental data during the tunnel construction process for monitoring, such as temperature and humidity data, vibration data, and gas concentration data. When collecting data, corresponding sensors are arranged inside the tunnel according to the tunnel construction progress. Each type of data can be formed into a sequence, which is called tunnel environmental historical data.
[0037] After acquiring historical tunnel environment data, it is preprocessed, such as by imputing missing values and removing outliers, and then standardized or normalized to avoid the influence of data dimensions. Samples are obtained using the processed historical tunnel environment data. It should be noted that each sample includes data from multiple dimensions, i.e., multiple features, meaning each sample contains multiple types of historical tunnel environment data. Cross-validation is used to divide the samples into training and test sets. Since the complexity of each decision tree corresponding to the training set needs to be calculated later, each sample in the training dataset needs to be labeled.
[0038] Next, random sampling with replacement is used to sample the training dataset after the sample labels to obtain the training set corresponding to each decision tree in the random forest. At this time, each decision tree is the partitioning and prediction result of the detection data under different dimensional indicators. Since it is necessary to analyze the historical data of tunnel construction environment in the training set corresponding to each decision tree in order to obtain the complexity of the environmental data, it is necessary to retain the timestamps corresponding to each feature of each sample in the training set in the historical tunnel construction environment data.
[0039] Finally, since the maximum depth of each decision tree needs to be adjusted based on the characteristics of the training set corresponding to each decision tree, it is necessary to first obtain the initial maximum depth of each decision tree. The decision trees are then trained using the training set to obtain the initial maximum depth of each decision tree. Specifically, an empirical maximum depth is set based on empirical values, and each decision tree is trained using the training set obtained in step one. After training, the empirical maximum depth of the random forest is adjusted using cross-validation to find the maximum depth that optimizes the model performance. This allows us to obtain the initial maximum depth of the random forest in the decision trees.
[0040] Step S2: Calculate the sample complexity of the training set based on the information entropy of the labels of each sample in the training set and the samples with the same labels.
[0041] Since the maximum depth of each decision tree needs to be adjusted based on the data features in the training set corresponding to each decision tree, cross-validation is first used to obtain the initial maximum depth of each decision tree. Because a larger maximum depth results in a stronger learning effect on the training set, if the complexity of the training set corresponding to that decision tree is low, using a larger depth may lead to overlearning of the training data, resulting in poor prediction and early warning effects for the current tunnel construction environment data. Similarly, if the complexity of the training set corresponding to the current decision tree is high, using a smaller depth may lead to underfitting, failing to capture the complex relationships in the data, thus reducing the predictive ability for the current tunnel construction environment data. Therefore, the final complexity of each decision tree needs to be obtained based on the characteristics of the training set corresponding to each decision tree. The higher or lower the complexity of the training set and the corresponding historical tunnel construction environment data in the training set, the greater the degree of depth adjustment, thus obtaining the final maximum depth of each decision tree.
[0042] Since a more complex training set corresponding to a decision tree in a random forest means that a larger maximum depth is needed to capture more detailed information from the data, the maximum depth of the current decision tree should be increased. On the other hand, if the training set corresponding to the decision tree in a random forest is simpler, a lower maximum depth is sufficient to obtain good classification results, so the maximum depth of the decision tree should be decreased.
[0043] The sample complexity of the training set is calculated based on the information entropy of the labels of each sample in the training set and the samples with the same labels. Specifically, the information entropy of the labels of the samples in the training set is obtained and normalized to obtain the sample disorder; the number of samples with the most identical labels is taken and recorded as the maximum number of identical labels; the number of samples in the training set is compared with the sum of the maximum number of identical labels and the hyperparameter and normalized to obtain the sample independence; the sample disorder and sample independence are weighted and summed to obtain the sample complexity of the training set.
[0044] The calculation formula is as follows:
[0045] ,
[0046] in, Let represent the sample complexity of the training set corresponding to the i-th decision tree. The training set corresponding to the i-th decision tree Information entropy of each sample label in the sample, , Let represent the probability of each sample label in the training set corresponding to the i-th decision tree. To determine the degree of disorder of the samples in the training set, at this time The larger the value, the lower the repetition of the sample labels in the training set corresponding to the i-th decision tree. In other words, the lower the repetition of the training set obtained by random sampling with replacement corresponding to the i-th decision tree, the higher the complexity of the training set corresponding to the i-th decision tree.
[0047] K represents the number of samples in the training set corresponding to the decision tree. This represents the training set corresponding to the i-th decision tree. This represents the maximum number of samples with the same label in the training set corresponding to the i-th decision tree, i.e., the maximum number of identical samples. (For example, if the training set corresponding to the i-th decision tree contains five samples, each labeled 1, 1, 1, 1, 4; and the training set corresponding to the j-th decision tree contains samples labeled 1, 1, 2, 2, 4, then the maximum number of identical samples in the training set corresponding to the i-th decision tree is...) The j-th decision tree corresponds to the training set ), 'a' is a hyperparameter to prevent the denominator from being 0. This value represents the degree of sample independence. A larger value indicates lower repetition among the samples in the training set corresponding to the i-th decision tree, and stronger sample independence. However, this also means a higher complexity of the corresponding training set. `norm` represents the normalization function. Therefore, the sample complexity of the training set corresponding to each decision tree can be obtained.
[0048] Step S3: Calculate the complexity of the tunnel construction environment historical data by using the difference between each feature of each sample in the training set and its neighboring data in the corresponding construction environment historical data, as well as the position of each feature of each sample in the corresponding construction environment historical data.
[0049] In step S2, the complexity of the training set itself is obtained. However, the complexity of the training set itself only represents the complexity of the structure of the training set. The training set itself is composed of historical data of tunnel construction environment. Therefore, it is necessary to evaluate the complexity of the historical data of tunnel construction environment that constitutes the training set. The two are combined to obtain the final complexity of the training set of the current decision tree.
[0050] Since the complexity of the samples in the training set corresponding to the decision tree represents the complexity of the training set structure, the training process of the decision tree is affected not only by the complexity of the training set structure, but also by the historical data of the tunnel construction environment in the training set.
[0051] The complexity of the tunnel construction environment historical data is calculated by using the difference between each feature of each sample in the training set and its neighboring data in the corresponding construction environment historical data, as well as the position of each feature of each sample in the corresponding construction environment historical data. Here, the construction environment historical data corresponding to a feature refers to a sequence of original data of the same type corresponding to that feature.
[0052] First, the historical tunnel construction environment data corresponding to each feature in the sample is segmented to obtain the data segment of the historical construction environment data corresponding to each feature. According to the position of each feature in the corresponding historical tunnel construction environment data, the data segment of each feature is obtained. The length of the data segment is a preset length. In this invention, the reference value is set to 5, and the implementer can adjust it according to the actual situation. It should be noted that different features in a sample correspond to different types of historical tunnel construction environment data. Each feature in a sample has corresponding original historical tunnel construction environment data. Here, each feature in the corresponding historical tunnel construction environment data refers to a series of data (historical tunnel construction environment data) of the type collected corresponding to that feature.
[0053] The calculation model for the complexity of the historical tunnel construction environment data corresponding to the sample set is as follows:
[0054] ,
[0055] in, The complexity of the historical tunnel construction environment data corresponding to the training set of the i-th decision tree is indicated; norm represents the normalization function; K represents the number of samples contained in the training set corresponding to the decision tree; and M represents the number of features in a sample. This represents the value of the m-th feature in the j-th sample of the training set corresponding to the i-th decision tree in the historical data of the corresponding tunnel construction environment. This represents the value of the m-th feature in the j-th sample of the corresponding tunnel construction environment historical data at the next adjacent time step for the i-th decision tree. This represents the value of the m-th feature in the j-th sample of the corresponding tunnel construction environment in the next adjacent time step in the historical data of the corresponding tunnel construction environment; This indicates the data segment to which the m-th feature in the j-th sample of the training set corresponding to the i-th decision tree belongs in the historical data of the tunnel construction environment. This indicates the data segment to which the m-th feature in the (j+1)-th sample of the i-th decision tree belongs in the corresponding historical data of tunnel construction environment. This represents the Spearman correlation coefficient between the two data segments.
[0056] This represents the absolute value of the difference between the previous timestamp value and the current value of the m-th feature in the j-th sample of the corresponding original tunnel construction environment historical data in the training set for the i-th decision tree. Let represent the absolute value of the difference between the next timestamp and the current value of the m-th feature in the j-th sample of the corresponding original tunnel construction environment historical data in the training set for the i-th decision tree, where t, t-1, and t+1 are used to represent three adjacent timestamps. This represents the average of the sums of the differences between the current value of the m-th feature in the j-th sample of the i-th decision tree training set and the values corresponding to the previous and next timestamps in the corresponding original tunnel construction environment historical data. The first term of the calculation model represents the average of the sums of the differences between the values of all features in the corresponding original tunnel construction environment historical data and the values at adjacent times in all samples of the i-th decision tree training set. The larger the first term of the calculation model, the greater the complexity of the changes of each feature in the i-th decision tree training set in the corresponding tunnel construction environment historical data, and the greater the complexity of the tunnel construction environment historical data in the i-th decision tree training set.
[0057] Regarding the second item of the computational model, The first term represents the correlation between the m-th feature of two adjacent samples in a training set and the two data segments in the corresponding historical data of tunnel construction environment. The second term represents the summation, averaging, and reciprocal of this correlation. The larger the reciprocal value, the smaller the correlation, which means the more irregular the changes in the corresponding historical tunnel environment data and the higher the complexity of the data.
[0058] This allows us to determine the complexity of the historical tunnel construction environment data corresponding to the training set for each decision tree.
[0059] Step S4: Average the complexity of the training set samples and the complexity of the historical data of the tunnel construction environment to obtain the overall complexity of the training set; adjust the initial maximum depth of the decision tree corresponding to the training set according to the overall complexity to obtain the optimal maximum depth.
[0060] After obtaining the sample complexity of the training set and the complexity of the historical data of the tunnel construction environment for each decision tree in steps S2 and S3, the overall complexity of the training set can be obtained by averaging them. The specific calculation formula is as follows:
[0061] ,
[0062] in, This represents the overall complexity of the training set corresponding to the i-th decision tree; and represents the sample complexity of the training set corresponding to the i-th decision tree and the complexity of the historical data of the tunnel construction environment, respectively.
[0063] The greater the complexity of the training set samples corresponding to the i-th decision tree and the complexity of the historical data of the tunnel construction environment corresponding to the training set, the greater the maximum depth of the decision tree should be. Conversely, the smaller the complexity, the smaller the maximum depth of the decision tree should be.
[0064] The optimal maximum depth is obtained by adjusting the initial maximum depth of the decision tree corresponding to the training set based on the overall complexity. Specifically, an adjustment lower threshold and an adjustment upper threshold are set. When the overall complexity of the training set of a decision tree is greater than the adjustment lower threshold but less than the adjustment upper threshold, the optimal maximum depth of the decision tree is the initial maximum depth. When the overall complexity of the training set of a decision tree is less than or equal to the adjustment lower threshold, a first adjustment parameter is obtained by negatively mapping the overall complexity using an exponential function with the natural constant as the base. The initial maximum depth is subtracted from the first adjustment parameter and rounded down to obtain the optimal maximum depth of the decision tree. When the overall complexity of the training set of a decision tree is greater than or equal to the adjustment upper threshold, a second adjustment parameter is obtained by mapping the overall complexity using an exponential function with the natural constant as the base and adding it to a preset value. The initial maximum depth is added to the second adjustment parameter and rounded down to obtain the optimal maximum depth of the decision tree.
[0065] The specific calculation formula is as follows:
[0066] ,
[0067] in, This represents the optimal maximum depth corresponding to the i-th decision tree after adjustment. Let represent the overall complexity of the training set corresponding to the i-th decision tree, and dp represent the initial maximum depth. This indicates the first adjustment parameter. 0.3 represents the lower threshold adjustment; 0.7 represents the upper threshold adjustment. This indicates the second adjustment parameter. exp represents an exponential function with the natural constant as its base.
[0068] The higher the overall complexity, the greater the maximum depth needs to be; conversely, the lower the final complexity, the smaller the maximum depth needs to be. Since the initial maximum depth of the decision tree is already set as a good depth for training on the current training set, the maximum depth is only adjusted when the complexity of the i-th decision tree is too high or too low. The lower and upper thresholds can be adjusted according to the specific tunnel construction environment data characteristics. This allows us to obtain the optimal maximum depth for each decision tree.
[0069] Step S5: Use the training set to train the final random forest model based on the optimal maximum depth of each decision tree, and monitor the tunnel construction environment.
[0070] After obtaining the optimal maximum depth of each decision tree, it is necessary to retrain using the training set. The final random forest model is obtained by training the model based on the optimal maximum depth of each decision tree using the training set. Specifically, a random forest model is obtained by training the model based on the optimal maximum depth of each decision tree using the training set. After obtaining this random forest model, the predictive performance of the random forest model is evaluated using the test set. Common evaluation metrics include mean squared error (MSE), mean absolute error (MAE), and R² value. Based on the evaluation results of the predictive performance, appropriate parameter optimization is performed to obtain the final random forest model.
[0071] Furthermore, the current tunnel construction environment data is input into the final random forest model. At this point, each decision tree classifies the current construction environment data into positive or negative categories. Based on the classification results of each decision tree, a vote is taken, and the result with the most votes is used as the prediction result. If the prediction result is abnormal, an early warning is issued for the current tunnel construction environment data.
[0072] In summary, when using random forests for early warning of current tunnel construction environment data, this application adaptively adjusts the maximum depth of each decision tree based on the characteristics of the training set corresponding to each decision tree in the random forest and the data characteristics of the historical tunnel construction environment data corresponding to the training set. This results in a maximum depth that is dynamically adjusted based on the characteristics of the decision tree itself. This method avoids the underfitting phenomenon of small depth when the complexity of the training set corresponding to the decision tree is high, and the overfitting phenomenon of large depth when the complexity of the training set corresponding to the decision tree is low. This makes the prediction and early warning of current tunnel construction environment data using random forests more accurate and reliable.
[0073] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0074] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0075] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent monitoring and early warning of tunnel construction environment data, characterized in that, The method includes: Samples are obtained using historical data of tunnel construction environment, and a training set for decision trees of random forest is obtained based on the samples; the decision trees are trained using the training set to obtain the initial maximum depth of each decision tree. The sample complexity of the training set is calculated based on the information entropy of the labels of each sample in the training set and the samples with the same labels. The complexity of the tunnel construction environment historical data is calculated by using the difference between each feature of each sample in the training set and its neighboring data in the corresponding tunnel construction environment historical data, as well as the position of each feature of each sample in the corresponding tunnel construction environment historical data. The overall complexity of the training set is obtained by averaging the sample complexity of the training set and the complexity of the historical data of the tunnel construction environment; the initial maximum depth of the decision tree corresponding to the training set is adjusted according to the overall complexity to obtain the optimal maximum depth. The final random forest model is obtained by training the training set based on the optimal maximum depth of each decision tree, and the tunnel construction environment is monitored. The calculation of the sample complexity of the training set based on the information entropy of the labels of each sample in the training set and the samples with the same labels includes: Obtain the information entropy of the labels of the samples in the training set and normalize it to obtain the sample disorder level; take the number of samples with the same label that have the most identical numbers, and record it as the maximum identical number; compare the number of samples in the training set with the sum of the maximum identical number and the hyperparameter and normalize it to obtain the sample independence level; and sum the sample disorder level and the sample independence level by weight to obtain the sample complexity of the training set.
2. The intelligent monitoring and early warning method for tunnel construction environment data according to claim 1, characterized in that, The training set for obtaining the decision tree of the random forest based on the samples includes: The samples are divided into training and test sets using cross-validation. Each sample in the training set is labeled, and the training set corresponding to each decision tree in the random forest is obtained by sampling from the labeled training set using random sampling with replacement.
3. The intelligent monitoring and early warning method for tunnel construction environment data according to claim 1, characterized in that, The step of training decision trees using a training set to obtain the initial maximum depth of each decision tree includes: Set the maximum empirical depth value, train each decision tree based on the training set of each decision tree, and adjust the maximum empirical depth of the random forest using cross-validation after training to obtain the initial maximum depth of each decision tree.
4. The intelligent monitoring and early warning method for tunnel construction environment data according to claim 1, characterized in that, The complexity of the historical data on the tunnel construction environment is calculated, including: The historical construction environment data corresponding to each feature in the sample is segmented to obtain the data segment of the historical construction environment data corresponding to each feature. The data segment of each feature is obtained according to the position of each feature in the corresponding historical construction environment data. The length of the data segment is a preset length. The calculation model for the complexity of the historical tunnel construction environment data corresponding to the sample set is as follows: , in, The complexity of the historical tunnel construction environment data corresponding to the training set of the i-th decision tree is indicated; norm represents the normalization function; K represents the number of samples contained in the training set corresponding to the decision tree; and M represents the number of features in a sample. This represents the value of the m-th feature in the j-th sample of the training set corresponding to the i-th decision tree in the historical data of the corresponding tunnel construction environment. This represents the value of the m-th feature in the j-th sample of the corresponding tunnel construction environment historical data at the next adjacent time step for the i-th decision tree. This represents the value of the m-th feature in the j-th sample of the corresponding tunnel construction environment in the next adjacent time step in the historical data of the corresponding tunnel construction environment; This indicates the data segment to which the m-th feature in the j-th sample of the training set corresponding to the i-th decision tree belongs in the historical data of the tunnel construction environment. This indicates the data segment to which the m-th feature in the (j+1)-th sample of the i-th decision tree belongs in the corresponding historical data of tunnel construction environment. This represents the Spearman correlation coefficient between the two data segments.
5. The intelligent monitoring and early warning method for tunnel construction environment data according to claim 1, characterized in that, The step of adjusting the initial maximum depth of the decision tree corresponding to the training set according to the overall complexity to obtain the optimal maximum depth includes: Set adjustment lower and upper thresholds. When the overall complexity of the training set of a decision tree is greater than the adjustment lower threshold but less than the adjustment upper threshold, the optimal maximum depth of the decision tree is the initial maximum depth. When the overall complexity of the training set of a decision tree is less than or equal to the adjustment lower threshold, a first adjustment parameter is obtained by negatively mapping the overall complexity using an exponential function with the natural constant as the base. The initial maximum depth is subtracted from the first adjustment parameter and rounded down to obtain the optimal maximum depth of the decision tree. When the overall complexity of the training set of a decision tree is greater than or equal to the adjustment upper threshold, a second adjustment parameter is obtained by mapping the overall complexity using an exponential function with the natural constant as the base and adding it to a preset value. The initial maximum depth is added to the second adjustment parameter and rounded down to obtain the optimal maximum depth of the decision tree.
6. The intelligent monitoring and early warning method for tunnel construction environment data according to claim 1, characterized in that, The monitoring of the tunnel construction environment includes: The current tunnel construction environment data is input into the final random forest model, and the prediction results are output. If the prediction results are abnormal, an early warning is issued.
Citation Information
Patent Citations
Random forest-based tunnel operation state sensing model building method
CN107563425A
Sewage treatment process optimization method and device based on deep learning
CN119227908A