A method and device for predicting the risk classification of coal and gas in tunnels
By improving the hyperparameter optimization of the sparrow search algorithm and deep neural network model, a hierarchical prediction model of tunnel coal and gas hazards was constructed, solving the accuracy of coal body behavior patterns and gas hazard prediction in tunnel engineering, and improving the accuracy and stability of the prediction results.
Patent Information
- Application Number
- CN202510442988.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-04-10
AI Technical Summary
In tunnel engineering, it is difficult for the prior art to accurately predict the behavioral patterns and gas hazards of coal bodies, resulting in great randomness and inaccuracy of prediction results.
A tunnel coal and gas hazard grading prediction method is adopted, and the sparrow search algorithm is improved by obtaining historical data, data cleaning and feature screening, combining cubic chaos mapping method and sinusoidal search strategy, and hyperparameter optimization is carried out on the deep neural network model, and a prediction model is built to perform hazard grading prediction.
The accuracy and stability of the prediction model are improved, the number of features is reduced while maintaining the prediction performance of the model, and the randomness and inaccuracy of the prediction results are solved.
Smart Images

Figure CN119962977B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tunnel engineering prediction, and more particularly, to a method and device for predicting the risk classification of coal and gas in tunnels. Background Art
[0002] In the technical field of tunnel engineering prediction, the single-index method and the comprehensive-index method are the main methods currently used. Both of these methods judge whether it exceeds the limit for prediction by presetting the critical value of a certain key index and comparing it with the actual monitoring data. However, as a porous medium, the physical and mechanical properties of coal are easily affected by uncontrollable factors such as artificial mining activities and the heterogeneity of the coal occurrence environment, which makes it difficult to accurately predict the behavior pattern of coal. At present, most of the research focuses on the risk prediction in the coal mine field. However, when these methods are applied to tunnel engineering, due to the introduction of specific parameters such as tunnel excavation methods, face area, support methods, and surrounding rock lithology, the data collection work becomes more complex, which increases the difficulty of data collection and also puts forward higher requirements for the construction of prediction models. Due to the diversity and uncertainty of tunnel parameters, prediction models often have difficulty accurately capturing the interactions between parameters, resulting in large randomness and inaccuracy of prediction results.
[0003] Therefore, there is an urgent need for a method and device for predicting the risk classification of coal and gas in tunnels to solve the problem of large randomness and inaccuracy of prediction results. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and device for predicting the risk classification of coal and gas in tunnels to improve the above problems. To achieve the above purpose, the technical solutions adopted by the present invention are as follows:
[0005] In a first aspect, the present application provides a method for predicting the risk classification of coal and gas in tunnels, including:
[0006] Obtaining historical data, where the historical data includes gas parameter data, coal body parameter data, tunnel parameter data, and risk classification labels;
[0007] Performing data cleaning processing on the historical data, and obtaining a data set by dividing the cleaned historical data;
[0008] Based on the preset cubic chaos mapping method, performing iterative training optimization on the positive and cosine search strategies of the initial sparrow search algorithm to obtain an improved sparrow search algorithm;
[0009] Optimizing the hyperparameters of a preset deep neural network model according to the improved sparrow search algorithm to obtain an improved deep neural network model;
[0010] Input the dataset into the improved deep neural network model for iterative training, and obtain a prediction model by screening the feature parameters of the dataset.
[0011] Based on the prediction model, predict the preset tunnel coal and gas monitoring data to obtain a risk grading result.
[0012] In a second aspect, the present application also provides a tunnel coal and gas risk grading prediction device, including:
[0013] An acquisition model for acquiring historical data, where the historical data includes gas parameter data, coal body parameter data, tunnel parameter data, and risk grading labels.
[0014] A cleaning model for performing data cleaning processing on the historical data, and obtaining a dataset by partitioning the cleaned historical data.
[0015] A first optimization model for iteratively training and optimizing the initial sparrow search algorithm based on a preset cubic chaotic mapping method to obtain an improved sparrow search algorithm.
[0016] A second optimization model for optimizing the hyperparameters of a preset deep neural network model according to the improved sparrow search algorithm to obtain an improved deep neural network model.
[0017] A training model for inputting the dataset into the improved deep neural network model for iterative training, and obtaining a prediction model by screening the feature parameters of the dataset.
[0018] A prediction model for predicting the preset tunnel coal and gas monitoring data based on the prediction model to obtain a risk grading result.
[0019] In a third aspect, the present application also provides a tunnel coal and gas risk grading prediction device, including:
[0020] A memory for storing a computer program.
[0021] A processor for implementing the steps of the tunnel coal and gas risk grading prediction method when executing the computer program.
[0022] In a fourth aspect, the present application also provides a medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the above-mentioned tunnel coal and gas risk grading prediction method.
[0023] The beneficial effects of the present invention are:
[0024] The present invention improves the initial sparrow search algorithm through the cubic chaos mapping method and the sine search strategy, enhancing the uniformity and randomness of the population distribution, and helping to enhance the exploration ability of the discoverers and avoid premature convergence. The deep neural network model is optimized by improving the sparrow search algorithm, simulating the foraging and anti-predation behaviors of sparrows. When the improved sparrow search algorithm is used to optimize the hyperparameters of the deep neural network model, it can search more efficiently in the hyperparameter space, quickly and accurately find a set of better hyperparameter combinations, and obtain an improved deep neural network model. In constructing the prediction model, through feature selection, the role of each feature in model prediction is analyzed. While reducing the number of features, the prediction performance of the model can still be maintained. The present invention solves the problems of large randomness and inaccuracy of the prediction results.
[0025] Other features and advantages of the present invention will be described in the following specification. And, in part, it will become apparent from the specification or be understood by implementing the embodiments of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the written specification, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0027] Figure 1 It is a schematic flow chart of the tunnel coal and gas hazard grading prediction method described in the embodiments of the present invention;
[0028] Figure 2 It is a schematic structural diagram of the tunnel coal and gas hazard grading prediction device described in the embodiments of the present invention.
[0029] Reference numerals in the figure: 800, tunnel coal and gas hazard grading prediction device; 801, processor; 802, memory; 803, multimedia component; 804, I / O interface; 805, communication component. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. Components of the embodiments of the present invention usually described and illustrated in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0031] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present invention, terms such as "first" and "second" are only used for descriptive distinction and cannot be construed as indicating or implying relative importance.
[0032] Embodiment 1:
[0033] This embodiment provides a method for predicting the risk level of coal and gas in tunnels. Referring to Figure 1 , the figure shows that this method includes steps S1 to S6, including:
[0034] S1: Obtain historical data, where the historical data includes gas parameter data, coal body parameter data, tunnel parameter data, and risk level labels;
[0035] In this step, the gas parameter data includes gas pressure, gas content, and / or initial gas emission velocity, etc.; the coal body parameter data includes coal seam thickness, lithology of the coal seam roof, and / or coal seam dip angle, etc.; the tunnel parameter data includes tunnel driving step length, excavation method, and / or type of advanced support, etc.
[0036] S2: Perform data cleaning on the historical data, and obtain a data set by partitioning the cleaned historical data;
[0037] To clarify the specific acquisition method of the data set, steps S21 to S23 are included in step S2, specifically:
[0038] S21: Delete duplicate data from the historical data, and fill in missing values for the deleted historical data to obtain preprocessed data;
[0039] In this step, for the missing value filling process, features in the historical data with missing values exceeding a preset threshold ratio after deletion are deleted, and features with missing values less than the threshold ratio are filled using the Multiple Imputation (MI) algorithm, and the optimal filling is selected by comparing the filling effects.
[0040] S22: According to the feature nature of the historical data, perform class balancing on the preprocessed data through a preset Synthetic Minority Over-sampling Technique (SMOTE) algorithm to obtain class-balanced data;
[0041] In this step, the class balancing uses the SMOETNC algorithm, which is an improved algorithm of SMOTE. Interpolation is performed simultaneously according to the feature nature of the historical data to generate adjacent new samples to balance the class balance of sample labels; preferably, the feature nature includes continuous and discrete features.
[0042] Preferably, the SMOTE algorithm is the Synthetic Minority Over-sampling Technique algorithm.
[0043] S23: Based on a preset danger level threshold, screen the feature parameters of the class-balanced data to obtain a parameter set, and divide the parameter set to obtain a data set.
[0044] In this step, the parameter set is divided into a training set and a validation set according to a ratio of 7:3 of the total sample quantity; the continuous variables are subjected to Z-Score standardization respectively, the variables of discrete features are subjected to Ordinal encoding, and the danger level classification labels are subjected to One-Hot encoding;
[0045] The data in the training set is used for improving the optimization and training of the deep neural network model, etc.; the data in the validation set is used to verify the performance of the improved deep neural network model under the optimal parameter combination.
[0046] S3: Based on a preset cubic chaotic mapping method, perform iterative training optimization on the initial sparrow search algorithm with a sine-cosine search strategy to obtain an improved sparrow search algorithm;
[0047] In this step, the improved sparrow search algorithm is the ISSA algorithm.
[0048] To clarify the specific acquisition method of the improved sparrow search algorithm, steps S3 includes S31 to S35, specifically:
[0049] S31: Based on the cubic chaotic mapping method, perform initialization distribution on the population in the initial sparrow search algorithm to obtain the initial position of the population;
[0050] In this step, when initializing the population distribution, the Cubic chaotic map is used to replace the original random distribution of the population in the initial sparrow search algorithm;
[0051] The initial value of the population iteration is:
[0052] (1);
[0053] In the above formula (1), is the initial value of the th iteration; is the initial value of the th iteration;
[0054] The formula for the initial position of the population is:
[0055] (2);
[0056] In the above formula (2), is the initial position of the population; is the initial value of the th iteration; is the lower position boundary of the population; is the upper position boundary of the population;
[0057] Preferably, the Cubic chaotic map is the cubic chaotic mapping method. This method improves the uniformity and randomness of the population distribution;
[0058] S32: Improve and optimize the sine-cosine search strategy according to the initial position of the population and the preset adaptive non-linear decreasing inertia weight factor to obtain an improved sine-cosine search strategy;
[0059] In this step, according to the initial position of the population, through the preset exponential non-linear decreasing adaptive factor and the preset adaptive non-linear decreasing inertia weight factor improve the sine-cosine search strategy;
[0060] The expression of the exponential non-linear decreasing adaptive factor is:
[0061] (3);
[0062] In the above formula (3), is the adaptive factor; is the adjustment coefficient; is the current iteration number; is the maximum iteration number; is the natural constant;
[0063] The expression of the adaptive non-linear decreasing inertia weight factor is:
[0064] (4);
[0065] In the above formula (4), is the inertia weight factor; is the initial value of the weight; is the final value of the weight; is the current iteration number; is the maximum iteration number; is the adjustment coefficient; is the natural constant;
[0066] The expression of the improved sine-cosine search strategy is:
[0067] (5);
[0068] In the above formula (5), is the th sparrow's position at the th dimension and the th iteration; is the th sparrow's position at the th dimension and the th iteration; is the global optimal position at the th iteration; is the adaptive factor; is the inertia weight factor; , , are all random numbers obeying the uniform distribution.
[0069] S33: Optimize and update the sparrow individual positions in the initial sparrow search algorithm based on the improved sine-cosine search strategy to obtain the optimal position;
[0070] To clarify the specific acquisition method of the optimal position, steps S33 includes S331 to S333, specifically:
[0071] S331: Update the position of the discoverer sparrow in the sparrow individual positions according to the improved sine-cosine search strategy to obtain the updated expression of the discoverer sparrow position;
[0072] In this step, the updated expression of the discoverer sparrow position is:
[0073] (6);
[0074] In the above formula (6), is the position of the discoverer sparrow at the th dimension and the dimension, the position in the th iteration; is the position of the th sparrow in the th iteration; is the global optimal position in the th iteration; is the adaptive factor; is the inertia weight factor; is the warning value; , are both random numbers obeying the uniform distribution.
[0075] When updating the discoverer's position, introducing the improved sine-cosine search strategy helps to enhance the discoverer's exploration ability, avoid premature convergence, and at the same time introduce the adaptive factor with exponential nonlinear decreasing and the preset adaptive nonlinear decreasing inertia weight factor
[0076] S332: Update the follower's position in the sparrow individual positions according to the preset Levy flight strategy to obtain the follower position update expression;
[0077] In this step, the expression of the Levy flight strategy is:
[0078] (7);
[0079] In the above formula (7), is the random step size; obeys the normal distribution, where ; is the absolute value; β is the parameter;
[0080] The follower position update expression is:
[0081] (8);
[0082] In the above formula (8), is the updated position of the follower for the th sparrow in the th dimension, the th iteration; is the th sparrow in the th dimension, the th iteration; is the The global optimal position in the i-th iteration; For the i-th iteration, the global worst sparrow position; Indicates the optimal position in the i-th iteration; Is a constant; Represents the exponential function; Is the number of individuals in the population; Is the random step size;
[0083] Preferably, the Levy flight strategy is the Levy flight strategy.
[0084] When updating the follower position, introducing the Levy flight strategy can avoid the sparrow population from having too high an aggregation degree and falling into a local optimal solution.
[0085] S333: Update the sparrow individual positions based on the discoverer sparrow position update expression and the follower position update expression to obtain the optimal position.
[0086] S34: Based on the optimal position, calculate the sparrow individual solutions through the lens imaging reverse learning strategy for the preset adaptive non-linear increasing factor and the sparrows in the initial sparrow search algorithm;
[0087] In this step, based on the optimal position, through the adaptive reverse learning strategy based on lens imaging, introduce the adaptive non-linear increasing factor ,
[0088] The expression of the adaptive non-linear increasing factor is:
[0089] (9);
[0090] In the above formula (9), Is the adaptive non-linear increasing factor; Is the adjustment coefficient; Is the current iteration number; Is the maximum iteration number;
[0091] Then the lens reverse learning formula becomes:
[0092] (10);
[0093] In the above formula (10), Is the reverse solution of the sparrow individual; Is a certain sparrow individual; Is the adaptive non-linear increasing factor; Is the lower position boundary of the population; Is the upper position boundary of the population;
[0094] Merge the reverse solutions (a total of M) of the sparrow individuals with the forward solutions (a total of M) of the sparrow individuals (a total of 2M), and select the top M individuals with the best fitness through fitness ranking for the next round of iteration to obtain the sparrow individual solutions.
[0095] Finally, introduce an adaptive reverse learning strategy based on lens imaging, perform fitness ranking on each sparrow individual and its reverse solution, select high-quality individual solutions, and accelerate the convergence speed and optimization accuracy of the algorithm.
[0096] S35: Judge whether the current iteration number meets the preset maximum iteration number. When the preset maximum iteration number is met, output the sparrow individual solutions and the optimal position to obtain the improved sparrow search algorithm.
[0097] In this step, when the preset maximum iteration number is met, output the sparrow individual solutions, the optimal position, and the preset fitness curve, and the training ends to obtain the improved sparrow search algorithm.
[0098] S4: Optimize the hyperparameters of the preset deep neural network model according to the improved sparrow search algorithm to obtain an improved deep neural network model;
[0099] To clarify the specific acquisition method of the improved deep neural network model, steps S4 includes S41 to S44, specifically:
[0100] S41: According to the boundary conditions of the improved sparrow search algorithm, input the training set in the dataset into the improved sparrow search algorithm for training to obtain the optimal solution, and the optimal solution includes the number of hidden layer neurons and the batch size;
[0101] S42: Optimize the deep neural network according to the preset K-fold cross-validation method to obtain a deep neural network model;
[0102] To clarify the specific acquisition method of the deep neural network model, steps S42 includes S421 to S425, specifically:
[0103] S421: Obtain a strategy for dynamically adjusting the learning rate;
[0104] S422: Divide the training set in the dataset according to the K-fold cross-validation method to obtain multiple subsets;
[0105] In this step, the K-fold cross-validation method is K-fold cross-validation, and the training set in the dataset is divided into K subsets.
[0106] S423: Optimize the deep neural network by dynamically adjusting the learning rate and a preset activation function according to the strategy, obtaining an optimized deep neural network;
[0107] In this step, optimize the deep neural network through the strategy to dynamically adjust the learning rate ReduceLROnPlateau, the activation function ReLu, the optimizer algorithm AdamOptimizer, the loss function Categorical_crossentropy, the evaluation criterion, and perform set regularization means DropOut rate and the maximum number of iterations Epoch and the early stopping strategy, obtaining an optimized deep neural network; the early stopping strategy is to prevent overfitting in training.
[0108] S424: Perform multiple trainings and validations on multiple of the subsets according to the K-fold cross-validation method. In each training, adopt the strategy of using one subset as the validation set and other subsets as the training set, obtaining the average accuracy;
[0109] In this step, perform K trainings and validations on multiple of the subsets according to the K-fold cross-validation method. In each training, use one subset as the validation set and the remaining K - 1 subsets as the training set, obtaining the mean of Accuracy for K validations; the mean of Accuracy for K validations is the average accuracy.
[0110] S425: Input the training set into the optimized deep neural network, input the number of hidden layer neurons and the batch size into the optimized deep neural network for optimization, output the average accuracy, obtaining a deep neural network model.
[0111] In this step, the number of hidden layer neurons is N1, N2, N3 and the batch size is BatchSize.
[0112] S43: Input the optimal solution into the deep neural network model for hyperparameter optimization, obtaining a set of optimal hyperparameter combinations;
[0113] S44: Input the set of optimal hyperparameter combinations into the deep neural network model, and through training the training set, obtain an improved deep neural network model.
[0114] In this step, the deep neural network model is a DNN deep neural network model, and the improved deep neural network model is an ISSA-DNN model. Optimize the deep neural network model through the improved sparrow search algorithm, simulating the foraging and anti-predation behaviors of sparrows. When the improved sparrow search algorithm performs hyperparameter optimization on the deep neural network model, it can perform more efficient searches in the hyperparameter space and quickly and accurately find a set of better hyperparameter combinations.
[0115] S5: Input the dataset into the improved deep neural network model for iterative training, and obtain a prediction model by screening the feature parameters of the dataset.
[0116] To clarify the specific acquisition method of the prediction model, steps S5 includes S51 to S55, specifically:
[0117] S51: Input the validation set in the dataset into the improved deep neural network model for training, and obtain the original evaluation index by comparing the predicted labels of the validation set with the true labels of the validation set.
[0118] S52: Based on the method for predicting the results of a preset machine learning model, calculate the improved deep neural network model through the feature parameters of the dataset to obtain the contribution degree of the feature parameters.
[0119] In this step, the method for predicting the results of the machine learning model is the SHAP method.
[0120] S53: Sort the importance of the feature parameters according to the contribution degree of the feature parameters to obtain a ranking result.
[0121] In this step, the ranking result is the SHAP feature importance ranking.
[0122] S54: Based on the ranking result, sequentially reduce the number of the features with the lower ranking results, and delete the dataset features with the lower ranking results. After reducing the number of features, retrain the improved deep neural network model and make predictions to obtain multiple model evaluation indexes.
[0123] In this step, by combining the traditional recursive feature elimination method (RFE method), sequentially reduce the number of the features with the lower ranking results. This step analyzes the role of each feature in model prediction through an intuitive and more interpretable feature selection strategy. While reducing the number of features, it can still maintain the prediction performance of the model and avoid the "curse of dimensionality".
[0124] S55: Compare the original evaluation index with multiple model evaluation indexes, and select the optimal model according to the comparison result to obtain a prediction model.
[0125] S6: Based on the prediction model, predict the preset tunnel coal and gas monitoring data to obtain a risk classification result.
[0126] Embodiment 2:
[0127] This embodiment provides a tunnel coal and gas risk classification prediction device, and the device includes:
[0128] An acquisition model for acquiring historical data, where the historical data includes gas parameter data, coal body parameter data, tunnel parameter data, and a risk grading label;
[0129] A cleaning model for performing data cleaning processing on the historical data, and obtaining a data set by partitioning the cleaned historical data;
[0130] To clarify the specific acquisition method of the cleaning model, specifically:
[0131] A processing unit for deleting duplicate data from the historical data, and obtaining preprocessed data by filling in missing values in the deleted historical data;
[0132] A balancing unit for balancing the categories of the preprocessed data according to the characteristic properties of the historical data through a preset synthetic minority over-sampling technique (SMOTE) to obtain category-balanced data;
[0133] A partitioning unit for screening the characteristic parameters of the category-balanced data based on a preset risk level threshold to obtain a parameter set, and obtaining a data set by partitioning the parameter set.
[0134] A first optimization model for iteratively training and optimizing the initial sparrow search algorithm based on a preset cubic chaotic mapping method to obtain an improved sparrow search algorithm;
[0135] To clarify the specific acquisition method of the first optimization model, specifically:
[0136] An initialization module for initializing the distribution of the population in the initial sparrow search algorithm based on the cubic chaotic mapping method to obtain the initial position of the population;
[0137] An improved optimization module for improving and optimizing the sine-cosine search strategy according to the initial position of the population and a preset adaptive non-linear decreasing inertia weight factor to obtain an improved sine-cosine search strategy;
[0138] An optimization update module for optimizing and updating the positions of sparrow individuals in the initial sparrow search algorithm based on the improved sine-cosine search strategy to obtain the optimal position;
[0139] A calculation module for calculating the sparrow individual solution based on the optimal position through a preset adaptive non-linear increasing factor and the sparrow individuals in the initial sparrow search algorithm using a lens imaging reverse learning strategy;
[0140] A training module for determining whether the current iteration count meets a preset maximum iteration count. After meeting the preset maximum iteration count, an improved sparrow search algorithm is obtained by outputting the sparrow individual solution and the optimal position.
[0141] A second optimization model for hyperparameter optimization of a preset deep neural network model according to the improved sparrow search algorithm to obtain an improved deep neural network model;
[0142] To clarify the specific acquisition method of the second optimization model, specifically:
[0143] A second training unit for inputting the training set in the dataset into the improved sparrow search algorithm for training according to the boundary conditions of the improved sparrow search algorithm to obtain an optimal solution, where the optimal solution includes the number of hidden layer neurons and the batch size;
[0144] A first optimization unit for optimizing the deep neural network according to a preset K-fold cross-validation method to obtain a deep neural network model;
[0145] A second optimization unit for inputting the optimal solution into the deep neural network model for hyperparameter optimization to obtain an optimal hyperparameter combination set;
[0146] A third training unit for inputting the optimal hyperparameter combination set into the deep neural network model and training the training set to obtain an improved deep neural network model.
[0147] A training model for iteratively training the dataset by inputting it into the improved deep neural network model, and obtaining a prediction model by screening the feature parameters of the dataset;
[0148] To clarify the specific acquisition method of the training model, specifically:
[0149] A first training unit for inputting the validation set in the dataset into the improved deep neural network model for training, and obtaining an original evaluation index by comparing the predicted labels and the true labels of the validation set;
[0150] A calculation unit for calculating the contribution degree of feature parameters to the improved deep neural network model through the feature parameters of the dataset based on a preset method for predicting the results of a machine learning model;
[0151] A sorting unit for sorting the importance of feature parameters according to the contribution degree of feature parameters to obtain a ranking result;
[0152] A screening unit, configured to, based on the ranking result, sequentially reduce the quantity of the features with the lower ranking results, and delete the dataset features with the lower ranking results. After the quantity of features is reduced, retrain the improved deep neural network model and perform prediction to obtain multiple model evaluation metrics.
[0153] A selection unit, configured to compare the original evaluation metrics with the multiple model evaluation metrics, and perform optimal model selection based on the comparison result to obtain a prediction model.
[0154] A prediction model, configured to perform prediction on preset tunnel coal and gas monitoring data based on the prediction model to obtain a risk grading result.
[0155] It should be noted that, regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0156] Embodiment 3:
[0157] Corresponding to the above method embodiment, in this embodiment, a tunnel coal and gas risk grading prediction device is further provided. A tunnel coal and gas risk grading prediction device described below can be mutually and correspondingly referred to the above-described tunnel coal and gas risk grading prediction method.
[0158] Figure 2 It is a block diagram of a tunnel coal and gas risk grading prediction device 800 shown according to an exemplary embodiment. As Figure 2 shown, the tunnel coal and gas risk grading prediction device 800 may include: a processor 801, a memory 802. The tunnel coal and gas risk grading prediction device 800 may further include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.
[0159] Among them, the processor 801 is used to control the overall operation of the tunnel coal and gas hazard grading prediction device 800 to complete all or part of the steps in the above-mentioned tunnel coal and gas hazard grading prediction method. The memory 802 is used to store various types of data to support the operation of the tunnel coal and gas hazard grading prediction device 800. These data may include, for example, instructions for any application program or method operating on the tunnel coal and gas hazard grading prediction device 800, as well as application program-related data, such as contact data, sent and received messages, pictures, audio, video, and so on. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen can be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal can be further stored in the memory 802 or sent through the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be a keyboard, a mouse, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the tunnel coal and gas hazard grading prediction device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them. Therefore, the corresponding communication component 805 may include: a Wi-Fi module, a Bluetooth module, an NFC module.
[0160] In an exemplary embodiment, the tunnel coal and gas hazard grading prediction device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the above-mentioned tunnel coal and gas hazard grading prediction method.
[0161] Embodiment 4:
[0162] Corresponding to the above method embodiment, in this embodiment, a medium is further provided. A medium described below can be correspondingly referred to the above-described tunnel coal and gas hazard grading prediction method.
[0163] A medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the tunnel coal and gas hazard grading prediction method in the above method embodiment.
[0164] Specifically, the medium can be various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0165] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0166] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present invention, and all of them should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for predicting the hazard classification of coal and gas in a tunnel, characterized in that: include: Acquiring historical data, wherein the historical data includes gas parameter data, coal body parameter data, tunnel parameter data and hazard classification labels; Performing data cleaning on the historical data, and obtaining a data set by dividing the cleaned historical data; Based on the preset cubic chaos mapping method, the initial sparrow search algorithm is iteratively trained and optimized with sine and cosine search strategies to obtain an improved sparrow search algorithm. The specific steps of improving the sparrow search algorithm include: Initializing the distribution of the population in the initial sparrow search algorithm based on the cubic chaos mapping method to obtain the population initialization position; The sine-cosine search strategy is improved and optimized according to the population initialization position and the preset adaptive nonlinear decreasing inertia weight factor to obtain an improved sine-cosine search strategy; The expression of the improved sine-cosine search strategy is: ; In the above formula, For the A sparrow in the Wei, The position in the iteration; For the A sparrow in the Wei, The position in the iteration; For the The global optimal position in the iteration; is the adaptive factor; is the inertia weight factor; All are random numbers that obey uniform distribution; Based on the improved sine-cosine search strategy, the individual positions of the sparrows in the initial sparrow search algorithm are optimized and updated to obtain the optimal position; Among them, the update expression of the position of the sparrow that discovers the individual position of the sparrow is: ; In the above formula, For the finder sparrow position A sparrow in the Wei, The position in the iteration; For the A sparrow in the Wei, The position in the iteration; For the The global optimal position in the iteration; is the adaptive factor; is the inertia weight factor; is the warning value; is the safety threshold; All are random numbers that obey uniform distribution; Based on the optimal position, a sparrow individual solution is obtained by calculating the lens imaging reverse learning strategy for the preset adaptive nonlinear increase factor and the sparrow individual in the initial sparrow search algorithm; Determine whether the current number of iterations meets the preset maximum number of iterations. When the preset maximum number of iterations is met, output the sparrow individual solution and the optimal position to obtain an improved sparrow search algorithm; perform hyperparameter optimization on a preset deep neural network model according to the improved sparrow search algorithm to obtain an improved deep neural network model; Inputting the data set into the improved deep neural network model for iterative training, and obtaining a prediction model by screening feature parameters of the data set; Based on the prediction model, the preset tunnel coal and gas monitoring data are predicted to obtain the hazard classification result.
2. The tunnel coal and gas hazard classification prediction method according to claim 1 is characterized in that: The data set is input into the improved deep neural network model for iterative training, and a prediction model is obtained by screening feature parameters of the data set, including: Inputting the validation set in the data set into the improved deep neural network model for training, and obtaining the original evaluation index by comparing the predicted labels of the validation set with the real labels of the validation set; Based on the method of predicting the results of a preset machine learning model, the improved deep neural network model is calculated through the characteristic parameters of the data set to obtain the characteristic parameter contribution; The importance of the feature parameters is sorted according to the contribution of the feature parameters to obtain a ranking result; Based on the ranking results, the number of features at the bottom of the ranking results is reduced in sequence, and the features of the data set at the bottom of the ranking results are deleted. When the number of features is reduced, the improved deep neural network model is retrained and predicted to obtain multiple model evaluation indicators; The original evaluation index is compared with the plurality of model evaluation indexes, and the optimal model is selected based on the comparison results to obtain a prediction model.
3. The tunnel coal and gas hazard classification prediction method according to claim 1 is characterized in that: The historical data is cleaned and divided into data sets, including: Deleting duplicate data from the historical data, and filling missing values from the deleted historical data to obtain preprocessed data; According to the characteristic properties of the historical data, class balancing is performed on the preprocessed data by using a preset synthetic minority sample algorithm to obtain class balanced data; The characteristic parameters of the category balance data are screened based on a preset hazard level threshold to obtain a parameter set, and the data set is obtained by dividing the parameter set.
4. The tunnel coal and gas hazard classification prediction method according to claim 1 is characterized in that: The preset deep neural network model is optimized for hyperparameters according to the improved sparrow search algorithm to obtain an improved deep neural network model, including: According to the boundary conditions of the improved sparrow search algorithm, the training set in the data set is input into the improved sparrow search algorithm for training to obtain an optimal solution, wherein the optimal solution includes the number of hidden layer neurons and the batch size; Optimizing the deep neural network according to a preset K-fold cross-validation method to obtain a deep neural network model; Inputting the optimal solution into the deep neural network model to perform hyperparameter optimization to obtain an optimal hyperparameter combination set; The optimal hyperparameter combination set is input into the deep neural network model, and an improved deep neural network model is obtained by training the training set.
5. A tunnel coal and gas hazard classification prediction device, characterized in that: include: An acquisition model is used to acquire historical data, wherein the historical data includes gas parameter data, coal body parameter data, tunnel parameter data and hazard classification labels; A cleaning model is used to perform data cleaning on the historical data, and obtain a data set by dividing the cleaned historical data; The first optimization model is used to perform iterative training optimization of the sine and cosine search strategy on the initial sparrow search algorithm based on a preset cubic chaos mapping method to obtain an improved sparrow search algorithm; The specific steps of the first optimization model are: An initialization module, used for initializing the distribution of the population in the initial sparrow search algorithm based on the cubic chaos mapping method to obtain the population initialization position; An improved optimization module, used for improving and optimizing the sine-cosine search strategy according to the population initialization position and a preset adaptive nonlinear decreasing inertia weight factor to obtain an improved sine-cosine search strategy; The expression of the improved sine-cosine search strategy is: ; In the above formula, For the A sparrow in the Wei, The position in the iteration; For the A sparrow in the Wei, The position in the iteration; For the The global optimal position in the iteration; is the adaptive factor; is the inertia weight factor; All are random numbers that obey uniform distribution; An optimization and updating module, used for optimizing and updating the individual positions of sparrows in the initial sparrow search algorithm based on the improved sine-cosine search strategy to obtain the optimal position; Among them, the update expression of the position of the sparrow that discovers the individual position of the sparrow is: ; In the above formula, For the finder sparrow position A sparrow in the Wei, The position in the iteration; For the A sparrow in the Wei, The position in the iteration; For the The global optimal position in the iteration; is the adaptive factor; is the inertia weight factor; is the warning value; is the safety threshold; All are random numbers that obey uniform distribution; A calculation module, for obtaining a sparrow individual solution based on the optimal position by performing lens imaging reverse learning strategy calculation on a preset adaptive nonlinear increase factor and the sparrow individual in the initial sparrow search algorithm; A training module, used for judging whether the current number of iterations meets a preset maximum number of iterations, and when the preset maximum number of iterations is met, outputting the sparrow individual solution and the optimal position to obtain an improved sparrow search algorithm; A second optimization model is used to optimize the hyperparameters of a preset deep neural network model according to the improved sparrow search algorithm to obtain an improved deep neural network model; A training model is used to input the data set into the improved deep neural network model for iterative training, and obtain a prediction model by screening feature parameters of the data set; The prediction model is used to predict the preset tunnel coal and gas monitoring data based on the prediction model to obtain a hazard classification result.
6. The tunnel coal and gas hazard classification prediction device according to claim 5 is characterized in that: Training the model, including: A first training unit is used to input a verification set in the data set into the improved deep neural network model for training, and obtain an original evaluation index by comparing the predicted label of the verification set with the real label of the verification set; A calculation unit, for calculating the improved deep neural network model based on the method for predicting the result of a preset machine learning model, by using the characteristic parameters of the data set to obtain the characteristic parameter contribution; A ranking unit, used to rank the importance of feature parameters according to the contribution of the feature parameters to obtain a ranking result; A screening unit is used to reduce the number of features at the bottom of the ranking results in turn based on the ranking results, and delete the data set features at the bottom of the ranking results. When the number of features is reduced, the improved deep neural network model is retrained and predicted to obtain multiple model evaluation indicators; The selection unit is used to compare the original evaluation index with the multiple model evaluation indexes, select the optimal model based on the comparison results, and obtain the prediction model.
7. The tunnel coal and gas hazard classification prediction device according to claim 5 is characterized in that: Cleaning model, including: A processing unit, used for deduplicating the historical data and filling missing values in the deleted historical data to obtain preprocessed data; A balancing unit, configured to perform category balancing on the preprocessed data by using a preset synthetic minority class sample algorithm according to characteristic properties of the historical data to obtain category balanced data; The division unit is used to screen the characteristic parameters of the category balance data based on a preset danger level threshold to obtain a parameter set, and to obtain a data set by performing data division on the parameter set.
8. The tunnel coal and gas hazard classification prediction device according to claim 5 is characterized in that: The second optimization model includes: A second training unit is used for inputting the training set in the data set into the improved sparrow search algorithm for training according to the boundary conditions of the improved sparrow search algorithm to obtain an optimal solution, wherein the optimal solution includes the number of hidden layer neurons and the batch size; A first optimization unit is used to optimize the deep neural network according to a preset K-fold cross-validation method to obtain a deep neural network model; A second optimization unit is used to input the optimal solution into the deep neural network model to perform hyperparameter optimization to obtain an optimal hyperparameter combination set; The third training unit is used to input the optimal hyperparameter combination set into the deep neural network model, and obtain an improved deep neural network model by training the training set.
Citation Information
Patent Citations
Intelligent power grid security situation assessment method based on improved probabilistic neural network
CN117235596A
Tunnel surrounding rock grading method, device and equipment and readable storage medium
CN117787105A