A coal mine risk intelligent monitoring method and computer equipment based on machine learning model
The coal mine risk score prediction model is constructed through the GBDT model, and combined with multiple data dimensions, it solves the problem of insufficient accuracy in coal mine accident risk monitoring in the existing technology, and achieves accurate prediction of coal mine risks and improvement of safety management levels.
Patent Information
- Application Number
- CN202410816904.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-24
AI Technical Summary
The existing technology lacks comprehensive analysis of coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, historical accident data and other factors, making it difficult to build an effective coal mine risk scoring model, resulting in inaccurate coal mine accident risk monitoring.
The coal mine risk score prediction model is built using the gradient boosting decision tree (GBDT) model. Through data preprocessing, model training, evaluation and interpretability analysis, coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and history are combined. Accident data, construct multiple decision trees to fit the residuals, optimize model parameters, use 10-fold cross-validation and grid search to find optimal parameters, select MAE and R² as evaluation indicators, and analyze feature importance.
It achieves accurate prediction of coal mine accident risks and comprehensive assessment of risk scores, improves coal mine safety management levels and risk prevention capabilities, and provides more comprehensive insights to improve coal mine safety conditions.
Smart Images

Figure CN118378900B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent monitoring of coal mine risks, and in particular to a method and computer equipment for intelligent monitoring of coal mine risks based on a machine learning model. Background Art
[0002] At present, researchers are conducting more and more in-depth research on intelligent monitoring of coal mine risks, and have proposed various intelligent monitoring methods specifically for coal mine risks. For example, Yan Ruiqiang of Taiyuan Fanhai Zhongda Technology Co., Ltd. applied for an intelligent monitoring and control device and system for coal mine ventilation on January 3, 2024. The patent application number of this Chinese invention patent is CN202410010101.0.
[0003] Although many experts and scholars have conducted relevant research on the monitoring of coal mine safety risks, few studies have constructed a relationship model between coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, historical accident data and coal mine risk scores, and there is a lack of analysis of the important factors affecting coal mine risk scores from five aspects: coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data. Therefore, it is very necessary to propose a reasonable and reliable coal mine risk intelligent monitoring method based on machine learning models. Summary of the invention
[0004] In view of the above-mentioned defects of the prior art, the present invention proposes a coal mine risk intelligent monitoring method and computer equipment based on a machine learning model, constructs a relationship model between various characteristics of the current status and potential risks of coal mines and the coal mine accident risk score, so as to achieve accurate prediction of coal mine accident risks and analyze the important factors affecting coal mine accidents.
[0005] To achieve the above purpose, the present invention adopts the following technical solution: a coal mine risk intelligent monitoring method based on machine learning model, comprising:
[0006] Model construction and data collection that influences coal mine risk scores;
[0007] Perform data preprocessing on the collected data;
[0008] Training of coal mine risk score prediction model based on gradient boosting decision tree;
[0009] Evaluation of coal mine risk scoring prediction models;
[0010] Interpretability analysis of coal mine risk score prediction model results.
[0011] Furthermore, the model construction affecting the coal mine risk score specifically adopts the GBDT algorithm to construct multiple decision trees, and each tree is fitted on the residual of the previous tree.
[0012] Furthermore, the data collection that affects the coal mine risk score specifically includes important indicators in five dimensions: coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data; among them, coal mine production data includes the output, output value, and production equipment operation status score of the coal mine; environmental monitoring data includes the air quality, humidity, and temperature of the environment around the coal mine; equipment operation data includes the number of coal mine equipment failures and the number of coal mine equipment maintenance; personnel behavior data includes the work conditions of coal mine workers, safety training records, and violation records; historical accident data includes the number of accidents and accident levels that have occurred in coal mines in the past.
[0013] Furthermore, the collected data is preprocessed, specifically:
[0014] Handle missing values, check whether there are missing values in the data, and choose to fill the mean for the missing values;
[0015] Divide the data into training set and test set, and divide the data samples into 80% training set and 20% test set.
[0016] Furthermore, the training of the coal mine risk score prediction model based on the gradient boosting decision tree specifically adopts 10-fold cross-validation and grid search methods to perform parameter optimization. First, the range of parameter combinations is determined by grid search, and then the model is evaluated in combination with 10-fold cross-validation to find the optimal parameter combination.
[0017] Furthermore, the parameters include: the number of decision trees, the learning rate of the model, the sub-sample ratio, and the depth limit of each decision tree.
[0018] Furthermore, the evaluation of the coal mine risk score prediction model uses MAE and R² as evaluation indicators of the model.
[0019] Furthermore, the interpretability analysis of the results of the coal mine risk score prediction model is specifically: analyzing the importance of indicators in five dimensions, namely, coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data, to the coal mine risk score.
[0020] Furthermore, the importance of the five-dimensional indicators of coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data to the coal mine risk score is obtained by calculating the average value of the local importance of the characteristics of the corresponding dimensional indicators in each subtree. The calculation formula is:
[0021]
[0022] in, and Respectively represent the global importance of feature j and the importance of feature j in the subtree The local importance in , W represents the number of subtrees, feature j in the subtree The calculation formula of local importance in is:
[0023]
[0024] Among them, the GBDT model is a binary tree, and M-1 represents a subtree The number of leaf nodes, is the reduction in the residual sum of squares of the non-leaf node after the split at time t, is the discriminant function, is the feature that a non-leaf node depends on when it splits at time t.
[0025] The present invention has the following technical effects:
[0026] 1. Based on the GBDT model, the present invention constructs a relationship model between coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, historical accident data and coal mine risk scores. This model is crucial for improving the safety management level and risk prevention capabilities of coal mines and comprehensively assessing the risk status of coal mines. Through data-driven methods, coal mine risk monitoring and prediction can be carried out more accurately, thereby more effectively improving the safety level of coal mines and achieving sustainable development.
[0027] 2. The present invention analyzes the importance of coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data to coal mine risk scores, which is crucial to improving the level of coal mine safety management. By comprehensively analyzing the indicators of these five dimensions, we can have a more comprehensive understanding of the factors affecting coal mine risk scores, and improve and prevent the factors affecting the safety level of coal mines in a targeted manner.
[0028] 3. The present invention simultaneously considers the relationship between coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, historical accident data and coal mine risk levels, and can provide coal mine enterprises with more comprehensive insights. By comprehensively analyzing the key factors affecting the risk level of coal mines, the safety status and potential risks of coal mines can be more accurately understood, so that corresponding prevention and management measures can be taken to ensure the safe production of coal mines. This comprehensive analysis method can help coal mine enterprises fully understand the safety status of coal mines from multiple angles. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a flow chart of a method for intelligent monitoring of coal mine risks based on a machine learning model provided by the present invention. DETAILED DESCRIPTION
[0030] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings to make the technical content clearer and easier to understand. The present invention can be embodied in many different forms of embodiments, and the protection scope of the present invention is not limited to the embodiments mentioned in the text.
[0031] Figure 1 This is a flow chart of a method for intelligent monitoring of coal mine risks based on a machine learning model provided by the present invention.
[0032] The present invention proposes a method for intelligent monitoring of coal mine risks based on a machine learning model. First, it is necessary to prepare a training data set containing coal mine accident risk scores, coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data. Then, data preprocessing is required, including missing value processing, data division into training sets and test sets, so as to evaluate the performance of the model. Next, the GBDT algorithm is used to iteratively construct multiple decision trees, each of which is fitted on the residual of the previous tree, thereby gradually improving the accuracy of the model. The model performance is optimized by adjusting hyperparameters such as the number, depth, and learning rate of trees. Finally, the generalization ability of the model is verified using a test set to evaluate its performance on unseen data. After the model training is completed, the contribution of each feature to the risk of coal mine accidents can be understood through feature importance analysis, so that coal mine managers can promptly discover potential risks and take corresponding measures to ensure the safe production of coal mines and provide deeper insights and decision support.
[0033] In view of the above technical problems in the prior art, the present invention provides a coal mine risk intelligent monitoring method based on a machine learning model, such as Figure 1 As shown, the specific steps of the method can be as follows:
[0034] Step 1: Model construction and data collection affecting coal mine risk scores
[0035] First, we need to determine the important indicators in five dimensions: coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data. Among them, coal mine production data includes coal mine output, output value, and production equipment operation status score; environmental monitoring data includes the air quality, humidity, and temperature of the surrounding environment of the coal mine; equipment operation data includes the number of coal mine equipment failures and coal mine equipment maintenance times; personnel behavior data includes coal mine workers' work conditions, safety training records, and violation records; historical accident data includes the number of accidents and accident levels that occurred in coal mines in the past. After determining the indicators, the model that affects the coal mine accident risk score is constructed and data collection work is carried out.
[0036] In step 1, the model that affects the risk score of coal mines is constructed by using the GBDT algorithm to construct multiple decision trees, and each tree is fitted on the residual of the previous tree.
[0037] Specifically, the specific steps of using the GBDT algorithm to build a model that affects coal mine risk scores are as follows:
[0038] Step 1-1) Determine the input: Determine the training set based on the collected data. in X is the input data set, Y is the coal mine risk score set, is the i-th element in the input data set (i.e., the i-th input data), i ranges from 1 to N, N is the total amount of data, R n represents n-dimensional real space, and R is one-dimensional real space. The i-th input data A vector composed of values from coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data , for The corresponding coal mine risk score is: is the loss function, y is the collected coal mine risk score, f ( x ) is the coal mine risk score output by the model prediction corresponding to y;
[0039] Step 1-2) Determine the output: Coal Mine Risk Score Prediction Model .
[0040] Steps 1-3) Initialization:
[0041] (1)
[0042] in, is the initial coal mine risk score prediction model, Indicates the value of c that reaches the minimum value, c is The corresponding predicted value is is the loss function.
[0043] Steps 1-4) , where M is the number of iterations;
[0044] For each sample (i.e. each input data) , calculate the residual (The residual here uses the loss function The negative gradient value is used to approximate):
[0045] (2)
[0046] Based on the residual of the previous step Fit a new regression tree (i.e., decision tree), whose leaf node area is recorded as , where J represents the number of leaf nodes of the mth decision tree, and the number of decision trees is equal to the number of iterations. is the loss function, For the i-th input data The corresponding model predicts the output of the coal mine risk score, For f m-1 (x).
[0047] right ,calculate:
[0048] (3)
[0049] In the formula, for The value of c when it reaches the minimum value, The coal mine risk score output by the model prediction in the previous step.
[0050] Update the current learner and get:
[0051] (4)
[0052] In the formula, The input data x belongs to the leaf node area The discriminant function of .
[0053] Steps 1-5) get the final coal mine risk score prediction model:
[0054] (5)
[0055] Step 2: Data preprocessing
[0056] When using the Gradient Boosting Decision Tree (GBDT) method to build a coal mine risk score prediction model, data preprocessing is a crucial step that helps improve the stability and performance of the model. For the given data, the following are the required data preprocessing steps:
[0057] Step 2-1): Handling missing values:
[0058] Check whether there are missing values in the data. For missing values, you can choose to fill the mean to ensure data integrity.
[0059] Step 2-2): Divide the training set and test set
[0060] The data samples are divided into 80% training set and 20% test set.
[0061] Usually, machine learning requires data standardization and other operations before model training, but the gradient boosting decision tree (GBDT) does not need to standardize the data. The main reason is that GBDT is a nonlinear model based on a tree structure, and its construction process mainly depends on the relative order of features rather than the specific numerical size. Since the decision tree focuses on the relative order of features when dividing nodes and is not affected by the absolute scale, data standardization is not necessary for the construction and prediction of the GBDT model. This feature makes GBDT show good robustness when processing features of different scales and ranges, without the need for linear transformation of features, and can more flexibly and effectively capture complex nonlinear relationships.
[0062] Step 3: Training of coal mine risk score prediction model based on gradient boosting decision tree
[0063] The main parameters involved in the training process of the GBDT model are as follows:
[0064] (1) n_estimators
[0065] n_estimators represents the number of decision trees, that is, the number of model iterations. Generally speaking, the larger the n_estimators value, the stronger the model fit, but too large a n_estimators value may cause the model to overfit. Therefore, when selecting n_estimators, it is necessary to consider the model's fit and efficiency. The default value of n_estimators is 100.
[0066] (2) learning_rate
[0067] learning_rate represents the learning rate of the model. The learning rate represents the contribution weight of each base learner in the entire iteration. The default value is generally 0.1, which is used to control the step size of each tree model update, also known as the step size factor. Generally speaking, the smaller the learning rate, the slower the model converges, and more iterations are required to achieve the desired effect. Therefore, when adjusting the learning rate, it is necessary to comprehensively consider the number of iterations and the size of the learning rate to determine the appropriate parameter combination.
[0068] (3) Subsample
[0069] Subsample is used to control the subsample ratio used by each base learner, and to prevent overfitting by sampling samples. The value range of subsample is (0,1], and it is generally recommended to be between [0.5,0.8]. The default value is 1. When the value is 1, it means that during the training process of the model, the training set used each time is the same as the original sample set, that is, no sample is sampled.
[0070] (4) max_depth
[0071] max_depth indicates the depth limit of each decision tree, which is used to control the complexity of the model. When max_depth is small, the model's fitting ability is weak and it is easy to underfit; when max_depth is too large, the model is easy to overfit. The default value of max_depth is 3. When the depth is 1, the generated trees are all binary trees with only two leaf nodes, so there is no interaction between the variables. When the depth is 2, the generated tree model has interaction between two variables. By analogy, deeper base trees can explore very complex variable interactions, but they are also more likely to cause overfitting.
[0072] In the process of model parameter adjustment, the K-fold cross-validation method is usually used to find the optimal parameters. K-fold cross-validation is a commonly used model evaluation technique, which divides the data set into K non-overlapping equal subsets, and uses K training and testing to evaluate the performance of the model. In each cross-validation, one subset is used as a test set, and the remaining K-1 subsets are used as training sets to train the model. The final result is the average of all cross-validation results. The present invention uses 10-fold cross-validation and grid search methods to optimize parameters. First, the range of parameter combinations is determined by grid search, and then the model is evaluated in combination with 10-fold cross-validation to find the optimal parameter combination.
[0073] Step 4: Evaluation of the coal mine risk score prediction model
[0074] Model evaluation is a very important part of machine learning. A reasonable model evaluation process can assist in judging the pros and cons of the model and improve the model's ability in prediction. Therefore, it is necessary to select appropriate evaluation indicators to comprehensively evaluate the performance of the model, find out the problems and determine the direction of optimization. According to different model tasks, the evaluation indicators can be divided into two categories: classification indicators and regression indicators. Classification indicators are usually used to measure the performance of classification algorithms, such as accuracy, recall, ROC (Receiver Operating Characteristic) curve, AUC (Area Under Curve), etc.; while regression indicators are used to evaluate the performance of regression algorithms, including MSE (Mean Squared Error), MAE (Mean Absolute Error), MAPE (Mean Absolute Percentage Error), R² (Coefficient of Determination), etc. Different models and application scenarios require the selection of appropriate evaluation indicators to measure the performance and applicability of the model. The present invention selects MAE and R² as evaluation indicators of the model to measure the accuracy of model prediction.
[0075] Step 5: Interpretability analysis of coal mine risk score prediction model results
[0076] The present invention selects the GBDT model not only because the model has high prediction accuracy, but also because the GBDT model is an ensemble learning algorithm based on decision trees. Therefore, the decision-making process of each tree can be well explained and understood, and the GBDT algorithm has rich visualization tools. The visualization tools can be used to show the importance of each feature to the model and the influence of a single feature or two features acting together on the model's dependent variable.
[0077] Next, we analyze the importance of indicators in five dimensions, namely coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data, to the coal mine risk score.
[0078] (1) Feature importance analysis
[0079] GBDT is an iterative ensemble learning algorithm. The global importance of a single feature can be obtained by calculating the average value of the local importance of the corresponding feature in each subtree (i.e., each decision tree). The global importance calculation formula for a single feature is shown as follows (6):
[0080]
[0081] in, and Respectively represent the global importance of feature j and the importance of feature j in the subtree The local importance in , W represents the number of subtrees, feature j in the subtree The calculation formula of local importance in is shown in (7):
[0082]
[0083] Among them, because the GBDT model is a binary tree, the subtree The number of leaf nodes is represented by M-1. is the reduction in the residual sum of squares of the non-leaf node after the split at time t. is the discriminant function, the feature that non-leaf nodes rely on when splitting at time t When is feature j, the function value is 1, otherwise, the function value is 0.
[0084] Analyzing the importance of indicators in five dimensions, namely coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data, to coal mine risk scoring is crucial to improving the level of coal mine safety management and risk prevention capabilities, and comprehensively assessing the risk status of coal mines.
[0085] The present invention also proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned intelligent coal mine risk monitoring method based on the machine learning model.
[0086] The preferred specific embodiments of the present invention are described in detail above. It should be understood that ordinary technicians in the field can make many modifications and changes based on the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by technicians in the technical field based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A method for intelligent monitoring of coal mine risks based on a machine learning model, characterized in that: include: Model construction and data collection affecting coal mine risk scores; wherein, the model construction affecting coal mine risk scores specifically uses the GBDT algorithm to construct multiple decision trees, each tree is fitted on the residual of the previous tree, and the specific steps of using the GBDT algorithm to construct a model affecting coal mine risk scores are as follows: Step 1-1) Determine the input: Determine the training set based on the collected data. in X is the input data set, Y is the coal mine risk score set, is the i-th element in the input data set, i is 1~N, N is the total amount of data, R n represents n-dimensional real space, R is one-dimensional real space; the i-th input data A vector composed of values from coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data , for The corresponding coal mine risk score is: is the loss function, y is the collected coal mine risk score, f ( x ) is the coal mine risk score output by the model prediction corresponding to y; Step 1-2) Determine the output: Coal Mine Risk Score Prediction Model ; Steps 1-3) Initialization: in, is the initial coal mine risk score prediction model, Indicates the value of c that reaches the minimum value, c is The corresponding predicted value is is the loss function; Steps 1-4) , where M is the number of iterations; For each sample, that is, each input data , calculate the residual The residual here uses the loss function The negative gradient value is approximated by: Based on the residual of the previous step Fit a new regression tree, namely a decision tree, whose leaf node area is recorded as , where J represents the number of leaf nodes of the mth decision tree, and the number of decision trees is equal to the number of iterations. is the loss function, For the i-th input data The corresponding model predicts the output of the coal mine risk score, For f m-1 The derivative of (x); right ,calculate: In the formula, for The value of c when it reaches the minimum value, The coal mine risk score output by the model prediction in the previous step; Update the current learner and get: In the formula, The input data x belongs to the leaf node area The discriminant function when ; Steps 1-5) get the final coal mine risk score prediction model: The data collection that affects the coal mine risk score specifically includes important indicators in five dimensions: coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data; among them, coal mine production data includes the output, output value, and production equipment operation status score of the coal mine; environmental monitoring data includes the air quality, humidity, and temperature of the environment around the coal mine; equipment operation data includes the number of coal mine equipment failures and the number of coal mine equipment maintenance; personnel behavior data includes the work status of coal mine workers, safety training records, and violation records; historical accident data includes the number of accidents that occurred in the coal mine in the past and the accident level; Perform data preprocessing on the collected data; Training of coal mine risk score prediction model based on gradient boosting decision tree; wherein, 10-fold cross validation and grid search methods are used for parameter optimization, firstly, the range of parameter combination is determined by grid search, and then the model is evaluated by combining 10-fold cross validation to find the optimal parameter combination, the parameters include: the number of decision trees, the learning rate of the model, the sub-sample ratio, and the depth limit of each decision tree; Evaluation of coal mine risk scoring prediction models; The interpretability analysis of the results of the coal mine risk score prediction model, wherein the interpretability analysis of the results of the coal mine risk score prediction model is specifically: analyzing the importance of indicators in five dimensions, namely, coal mine production data, environmental monitoring data, equipment operation data, personnel behavior data, and historical accident data, to the coal mine risk score; wherein, the average value of the local importance of the characteristics of the corresponding dimensional indicators in each subtree is calculated, and the calculation formula is: in, and Respectively represent the global importance of feature j and the importance of feature j in the subtree The local importance in , W represents the number of subtrees, feature j in the subtree The calculation formula of local importance in is: Among them, the GBDT model is a binary tree, and M-1 represents a subtree The number of leaf nodes, is the reduction in the residual sum of squares of the non-leaf node after the split at time t, is the discriminant function, is the feature that a non-leaf node depends on when it splits at time t.
2. The method for intelligent monitoring of coal mine risks based on a machine learning model according to claim 1, characterized in that: The data preprocessing of the collected data is specifically as follows: Handle missing values, check whether there are missing values in the data, and choose to fill the mean for the missing values; Divide the data into training set and test set, and divide the data samples into 80% training set and 20% test set.
3. According to the method for intelligent monitoring of coal mine risks based on machine learning model in claim 1, the evaluation of the coal mine risk score prediction model uses MAE and R² as the evaluation indicators of the model.
4. A computer device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the intelligent coal mine risk monitoring method based on the machine learning model as described in any one of claims 1 to 3.
