Mine environment monitoring method and system based on machine learning
By weighting standard distance and exponential attenuation distance, the total data distance is calculated, the noise is removed and random noise is introduced, the data set is balanced, and the density characteristics are designed, the problems of equipment differences and types in mining environment monitoring are solved, and the accuracy of monitoring is improved. Diversity improves the scientificity and rationality of monitoring.
Patent Information
- Application Number
- CN202411428344.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-10-14
AI Technical Summary
There are differences in monitoring equipment and uneven distribution of mining environment types in the existing mining environment monitoring methods, which leads to deviations in the model and cannot truly reflect the actual situation of the mining environment. The complexity and diversity of data lead to misjudgment and ineffective monitoring.
Use weighted standard distances and exponential attenuation distances to calculate the total distance between the data, remove noise data, build discrete data sets and introduce random noise, balance data sets, design local and global density, calculate clustering centers, and allocate data to the most suitable ones clusters to improve data accuracy and diversity.
It improves the accuracy and reliability of data, enhances data diversity, improves data category imbalance, improves the scientificity and rationality of monitoring, ensures the effectiveness of model training and evaluation, and provides better decision-making basis.
Smart Images

Figure CN118936566B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of environmental monitoring, and specifically refers to a mine environment monitoring method and system based on machine learning. Background Art
[0002] The method of mine environment monitoring is to use machine learning algorithms to analyze and process various data in the mine environment, evaluate the mine environment status in real time, provide a scientific basis for mine management and decision-making, help formulate more reasonable environmental protection and governance measures, and improve the efficiency and accuracy of monitoring, reduce labor costs and errors. However, the existing mine environment monitoring methods have the problem of differences in monitoring equipment and uneven distribution of mine environment types, which leads to model deviations and cannot truly reflect the actual situation of the mine environment; the existing mine environment monitoring methods have the problem that the mine environment data is highly complex and diverse, and the mine environment conditions in different regions vary greatly, which leads to misjudgment of the mine environment conditions and the inability to effectively monitor the mine environment. Summary of the invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a mine environment monitoring method and system based on machine learning. In view of the problem that the existing mine environment monitoring methods have differences in monitoring equipment and uneven distribution of mine environment types, which lead to model deviations and cannot truly reflect the actual situation of the mine environment, this scheme designs weighted standard distance and exponential decay distance to obtain the total distance between data, calculates the nearest neighbor data of the data based on the total distance, filters out and removes noise data, thereby improving the accuracy and reliability of the data; introduces discreteness to construct a discrete data set, determines the number of data to be synthesized based on discreteness and nearest neighbor data, and synthesizes new data based on the discrete data set and introduces random noise, thereby balancing the data and increasing the diversity of the data; constructs a balanced mine environment data set, improves the imbalance of data categories, and improves the rationality of mine environment monitoring; in view of the existing mine environment The monitoring method has the problem that the mine environmental data is highly complex and diverse, and the mine environmental conditions in different regions vary greatly, resulting in misjudgment of the mine environmental conditions and the inability to effectively monitor the mine environment. This scheme calculates the nearest neighbor data of the data based on the total distance, designs the local density and global density to obtain the total density of the data, comprehensively considers the local and global characteristics, and reflects the data characteristics more comprehensively and meticulously; calculates the distance threshold based on the minimum distance of the data, calculates the density threshold based on the adjustment factor and the total density, and constructs a candidate center data set to avoid missing important potential centers; calculates the overlapping nearest neighbor data set based on the nearest neighbor data, obtains the cluster center data set according to the total density and the number of overlapping data, and distributes the remaining data to the cluster to which the cluster center with the closest total distance belongs, thereby improving the quality of the entire evaluation model, which is conducive to accurately evaluating the mine environmental status and helping to better understand and analyze the mine environment.
[0004] The technical solution adopted by the present invention is as follows: The mine environment monitoring method based on machine learning provided by the present invention comprises the following steps:
[0005] Step S1: data collection;
[0006] Step S2: data preprocessing;
[0007] Step S3: mine environmental data balance;
[0008] Step S4: constructing a mine environment status assessment model;
[0009] Step S5: Real-time monitoring of the mine environment.
[0010] Furthermore, in step S1, the data collection is to collect historical mine environmental data; the historical mine environmental data includes air quality data, meteorological data, water quality data, soil data, operating activity data, biological data, geological data and environmental status; the air quality data includes oxygen concentration, carbon dioxide concentration, volatile organic compound concentration, particulate matter concentration and harmful gas concentration; the meteorological data includes temperature, humidity, air pressure, precipitation, wind speed and wind direction; the water quality data includes water pH value and water pollutants; the soil data includes soil pH value, soil moisture and heavy metal content; the operating activity data includes equipment emission data and mining volume; the biological data includes biodiversity and vegetation coverage; the geological data includes geological structure, stratum stability and ground stress; the environmental status includes excellent, good, general, poor and severe, and the environmental status is used as a data label. The data label is not considered during clustering and is only used when selecting cluster labels.
[0011] Furthermore, in step S2, the data preprocessing is to perform data cleaning, data conversion, data normalization and data set construction on the collected data; data cleaning includes processing missing values, outliers and duplicate values; data conversion is to convert the data into vector form; data normalization is to unify the data range based on the maximum and minimum normalization method; and data set construction is to construct a mining environment data set based on the processed data, and obtain a minority class data set and a majority class data set based on the mining environment data set.
[0012] Furthermore, in step S3, the mine environment data balance specifically includes the following steps:
[0013] Step S31: removing noise data, including the following steps:
[0014] Step S311: Calculate the total distance between the data, use the inverse of the Euclidean distance as the weight, and design the weighted standard distance in combination with the mean and standard deviation, then introduce the attenuation coefficient and exponential function to design the exponential attenuation distance, and combine the weighted standard distance and the exponential attenuation distance to obtain the total distance between every two mining environment data in the mining environment data set. The formula used is as follows:
[0015] ;
[0016] ;
[0017] ;
[0018] ;
[0019] In the formula, Is the mine environment data x i and x j The weight between , and They are respectively mine environment data x i and x j The weighted standard distance, exponential decay distance and total distance between i and x j are the i-th and j-th mine environment data, i and j are mine environment data indexes, ED(·) is the Euclidean function, is a smoothing term, β is the attenuation coefficient in the range of (0, 1), D is the characteristic dimension of the mining environment data, d is the dimension index, and x id and x jd They are respectively mine environment data x i and x j The features of the dth dimension in is the square of the L2 norm, μ d and σ d are the mean and standard deviation of the dth dimension in the mining environment dataset, e is a natural constant, α1 and α2 are the weighted standard distance weight and exponential decay distance weight in the range of (0, 1), and α1+α2=1;
[0020] Step S312: Noise data screening: calculate the k1 nearest neighbor data of each data in the minority class data set in the mining environment data set according to the total distance. If the k1 nearest neighbor data of the minority class data all belong to the majority class data, then the minority class data is removed from the minority class data set as noise data; otherwise, the minority class data is retained; and the screened minority class data set is used as the denoised data set;
[0021] Step S32: Calculate the discreteness, pre-set the discreteness threshold, and construct a discrete data set based on the mining environment data in the denoised data set whose discreteness is greater than the discreteness threshold. The formula used is as follows:
[0022] ;
[0023] ;
[0024] ;
[0025] In the formula, and are the centers of the first a and first a+1 nearest neighbor data of the i-th mining environment data, a is the nearest neighbor data index, is the first a nearest neighbor data set of the i-th mining environment data, c is The data in and are the center offsets of the first a and first a+1 nearest neighbor data of the i-th mining environment data, is the discreteness of the i-th mine environment data;
[0026] Step S33: Calculate the number of synthesis, and determine the number of data that needs to be synthesized for each mining environment data in the denoised data set based on the discreteness and the nearest neighbor data. The formula used is as follows:
[0027] ;
[0028] ;
[0029] In the formula, S majority and S minority are the number of data in the majority class data set and the minority class data set, r is the balance ratio, S new is the total amount of data that needs to be synthesized, and f is The data in is the k1 nearest neighbor data set of the i-th mining environment data, is the Euclidean distance between the i-th mine environment data and its nearest neighbor data f, ED max is the maximum Euclidean distance between the i-th mine environment data and its nearest neighbor data, is the floor function, is the number of data that needs to be synthesized for the i-th mine environment data;
[0030] Step S34: synthesize new data. For each mining environment data in the denoised data set, randomly select one data from the discrete data set as the reference data each time, and introduce random noise for data synthesis until the number of new data synthesized for each mining environment data in the denoised data set is equal to the number of data required to be synthesized calculated in step S33. The formula used is as follows:
[0031] ;
[0032] In the formula, is the new data synthesized from the i-th mine environment data, is a function with mean 0 and variance σ 2 The random noise sampled from the normal distribution, g is a data randomly selected from the discrete data set, γ1 and γ2 are the control interpolation coefficient and control noise intensity coefficient in the range of (0, 1) respectively;
[0033] Step S35: construct a mine environmental balance data set, aggregate the new data synthesized in step S34, the minority class data set and the majority class data set to obtain a mine environmental balance data set.
[0034] Furthermore, in step S4, the construction of the mine environment status assessment model specifically includes the following steps:
[0035] Step S41: Calculate the total density of each data, including the following steps:
[0036] Step S411: Calculate the local density of each data in the mine environmental balance data set, calculate the k2 nearest neighbor data of each data in the mine environmental balance data set according to the total distance, and calculate the local density of the mine environmental data based on the nearest neighbor data. The formula used is as follows:
[0037] ;
[0038] In the formula, is the local density of the i-th mine environment data, is the k2 nearest neighbor data set of the i-th mine environment data, n is The data in is the total distance between the i-th mining environment data and its nearest neighbor data n;
[0039] Step S412: Calculate the global density of each data in the mine environmental balance data set, using the following formula:
[0040] ;
[0041] In the formula, is the global density of the i-th mine environment data, is the local density of the jth mine environmental data, and N is the number of data in the mine environmental balance data set;
[0042] Step S413: Calculate the total density of each data in the mine environmental balance data set, using the following formula:
[0043] ;
[0044] In the formula, is the total density of the i-th mine environment data;
[0045] Step S42: Calculate the minimum distance using the following formula:
[0046] ;
[0047] In the formula, is the minimum distance of the i-th mine environment data, is the total density of the jth mine environment data;
[0048] Step S43: determining the cluster center, including the following steps:
[0049] Step S431: Calculate the candidate center data set, sort the data in the mine environmental balance data set from large to small based on the minimum distance, and select the top candidate center data set. The minimum distance of each mining environment data is used to calculate the distance threshold; the adjustment factor is set in advance, and the density threshold is calculated based on the adjustment factor and the total density of all data in the mining environment balance data set; the mining environment data in the mining environment balance data set whose total density and minimum distance are both greater than the density threshold and the distance threshold are selected as candidate centers, and the candidate center data set is constructed. The formula used is as follows:
[0050] ;
[0051] ;
[0052] In the formula, δ threshold and m threshold are the distance threshold and density threshold respectively, and p is the adjustment factor in the range of (0, 1);
[0053] Step S432: Calculate the overlapping nearest neighbor data set, calculate the k3 nearest neighbor data of each data in the candidate center data set according to the total distance, and then construct the overlapping nearest neighbor data set between every two different data in the candidate center data set to obtain the number of overlapping data;
[0054] Step S433: Calculating the cluster center data set, including the following steps:
[0055] Step S4331: Delete. Preset the number of cluster centers. If the number of data in the candidate center data set is greater than the pre-set number of cluster centers, sort the data in the candidate center data set in descending order based on the total density, and randomly select one of the two different data in the candidate center data set whose overlapping data number is greater than 0 to delete. When the number of remaining data in the candidate center data set is equal to the pre-set number of cluster centers, stop deleting, build a cluster center data set based on the remaining data in the candidate center data set, and go to step S44 for clustering;
[0056] Step S4332: Iterate. If the number of remaining data in the candidate center data set is still greater than the preset number of cluster centers after the deletion in step S4331, recalculate the k3 nearest neighbor data of the remaining data in the current candidate center data set based on the total distance, and go to step S4331 to delete again until the number of remaining data in the candidate center data set is equal to the preset number of cluster centers and stop the iteration;
[0057] Step S44: clustering, allocating the remaining data in the mine environmental balance data set except the cluster center to the cluster to which the cluster center with the shortest total distance belongs, completing clustering, and obtaining the mine environmental status assessment model.
[0058] Furthermore, in step S5, the real-time monitoring of the mine environment is to collect real-time mine environment data; the real-time mine environment data includes air quality data, meteorological data, water quality data, soil data, work activity data, biological data and geological data; after data preprocessing of the real-time mine environment data, the real-time mine environment data and the historical mine environment data are jointly input into the mine environment status assessment model for clustering processing, and based on the output clustering results, the label type with the largest number of historical mine environment data in the cluster is selected as the cluster label to obtain the current state of the mine environment and realize real-time monitoring of the mine environment.
[0059] The mine environment monitoring system based on machine learning provided by the present invention includes a data acquisition module, a data preprocessing module, a mine environment data balance module, a mine environment status assessment model building module and a mine environment real-time monitoring module;
[0060] The data acquisition module collects historical mine environment data and sends the data to the data preprocessing module;
[0061] The data preprocessing module performs data cleaning, data conversion, data normalization and data set construction on the collected data, and sends the data to the mine environment data balance module;
[0062] The mine environment data balance module designs weighted standard distance and exponential decay distance to obtain the total distance between data, calculates the nearest neighbor data of the data according to the total distance, screens out and removes noise data, introduces discreteness to construct a discrete data set, determines the number of data to be synthesized based on discreteness and nearest neighbor data, synthesizes new data based on the discrete data set and introduces random noise, constructs a mine environment balance data set, and sends the data to a mine environment status assessment model construction module;
[0063] The module for constructing a mine environment status assessment model calculates the nearest neighbor data according to the total distance, designs the local density and the global density to obtain the total density, calculates the distance threshold based on the minimum distance, calculates the density threshold based on the adjustment factor and the total density, constructs a candidate center data set, calculates the overlapping nearest neighbor data set, obtains the cluster center data set according to the total density and the number of overlapping data, and distributes the remaining data to the cluster to which the cluster center with the closest total distance belongs, completes clustering, obtains the mine environment status assessment model, and sends the data to the mine environment real-time monitoring module;
[0064] The mine environment real-time monitoring module inputs the collected mine environment data into the mine environment status assessment model for clustering processing, obtains the current state of the mine environment based on the output clustering results, and realizes real-time monitoring of the mine environment.
[0065] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0066] (1) In view of the problem that the existing mine environment monitoring methods have differences in monitoring equipment and uneven distribution of mine environment types, which lead to model deviations and cannot truly reflect the actual situation of the mine environment, this scheme designs weighted standard distance and exponential decay distance to obtain the total distance between data, calculates the nearest neighbor data of the data based on the total distance, screens out and removes noise data, improves the accuracy and reliability of the data, and reduces the interference of noise on monitoring and analysis; introduces discreteness to construct discrete data sets, determines the number of data to be synthesized based on discreteness and nearest neighbor data, and synthesizes new data based on discrete data sets and introduces random noise, which increases the diversity of data while balancing the data, which is conducive to more comprehensive and accurate monitoring of the mine environment; constructs a balanced mine environment data set, improves the imbalance of data categories, makes model training and evaluation more effective, improves the scientificity and rationality of mine environment monitoring, and provides a better basis for decision-making.
[0067] (2) In view of the fact that the existing mine environment monitoring methods have the problems of high complexity and diversity of mine environment data and great differences in mine environment conditions in different regions, which lead to misjudgment of mine environment conditions and inability to effectively monitor mine environment, this scheme calculates the nearest neighbor data of the data based on the total distance, designs local density and global density to obtain the total density of the data, comprehensively considers local and global characteristics, reflects the data characteristics more comprehensively and meticulously, and identifies different environmental areas and characteristics; calculates the distance threshold based on the minimum distance of the data, calculates the density threshold based on the adjustment factor and the total density, constructs the candidate center data set, avoids missing important potential centers, and makes the clustering results more accurate and representative; calculates the overlapping nearest neighbor data set based on the nearest neighbor data, obtains the cluster center data set according to the total density and the number of overlapping data, and assigns the remaining data to the cluster to which the cluster center with the closest total distance belongs, completes clustering, and obtains the mine environment status assessment model, making the cluster center more reasonable and accurate, thereby improving the quality of the entire assessment model, which is conducive to accurately assessing the mine environment status and helping to better understand and analyze the mine environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 A schematic diagram of the process of the mine environment monitoring method based on machine learning provided by the present invention;
[0069] Figure 2 A schematic diagram of a mine environment monitoring system based on machine learning provided by the present invention;
[0070] Figure 3 is a schematic flow chart of step S3;
[0071] Figure 4 It is a schematic diagram of the process of step S4.
[0072] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0073] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0074] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0075] Example 1, see Figure 1 The present invention provides a method for monitoring mine environment based on machine learning, which comprises the following steps:
[0076] Step S1: data collection, collecting historical mine environment data;
[0077] Step S2: Data preprocessing, data cleaning, data conversion, data normalization and data set construction for the collected data;
[0078] Step S3: Balance of mine environmental data, design weighted standard distance and exponential decay distance to obtain the total distance between data, calculate the nearest neighbor data of the data according to the total distance, filter out and remove the noise data, introduce discreteness to construct a discrete data set, determine the number of data to be synthesized based on discreteness and nearest neighbor data, synthesize new data based on the discrete data set and introduce random noise to construct a mine environmental balance data set;
[0079] Step S4: construct a mine environment status assessment model, calculate the nearest neighbor data according to the total distance, design the local density and the global density to obtain the total density, calculate the distance threshold based on the minimum distance, calculate the density threshold based on the adjustment factor and the total density, construct a candidate center data set, calculate the overlapping nearest neighbor data set, obtain the cluster center data set according to the total density and the number of overlapping data, and assign the remaining data to the cluster to which the cluster center with the closest total distance belongs, complete clustering, and obtain the mine environment status assessment model;
[0080] Step S5: Real-time monitoring of the mine environment. The collected mine environment data is input into the mine environment status assessment model for clustering processing. Based on the output clustering results, the current state of the mine environment is obtained to achieve real-time monitoring of the mine environment.
[0081] Example 2, see Figure 1This embodiment is based on the above embodiment. In step S1, the historical mine environment data includes air quality data, meteorological data, water quality data, soil data, operation activity data, biological data, geological data and environmental status; air quality data includes oxygen concentration, carbon dioxide concentration, volatile organic compound concentration, particulate matter concentration and harmful gas concentration; meteorological data includes temperature, humidity, air pressure, precipitation, wind speed and wind direction; water quality data includes water pH value and water pollutants; soil data includes soil pH value, soil moisture and heavy metal content; operation activity data includes equipment emission data and mining volume; biological data includes biodiversity and vegetation coverage; geological data includes geological structure, stratum stability and ground stress; environmental status includes excellent, good, general, poor and severe. The environmental status is used as a data label. The data label is not considered during clustering and is only used when selecting cluster labels.
[0082] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, data cleaning includes processing missing values, outliers and duplicate values; data conversion is to convert data into vector form; data normalization is to unify the data range based on the maximum and minimum normalization method; and data set construction is to construct a mining environment data set based on the processed data, and obtain a minority class data set and a majority class data set based on the mining environment data set.
[0083] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S3, the mine environment data balance specifically includes the following steps:
[0084] Step S31: removing noise data, including the following steps:
[0085] Step S311: Calculate the total distance between the data, use the inverse of the Euclidean distance as the weight, and design the weighted standard distance in combination with the mean and standard deviation, then introduce the attenuation coefficient and exponential function to design the exponential attenuation distance, and combine the weighted standard distance and the exponential attenuation distance to obtain the total distance between every two mining environment data in the mining environment data set, so as to more accurately measure the degree of difference between the data and improve the accuracy of judging the noise data; the formula used is as follows:
[0086] ;
[0087] ;
[0088] ;
[0089] ;
[0090] In the formula, Is the mine environment data x i and x j The weight between , and They are respectively mine environment data x i and x j The weighted standard distance, exponential decay distance and total distance between i and x j are the i-th and j-th mine environment data, i and j are mine environment data indexes, ED(·) is the Euclidean function, is a smoothing term, β is the attenuation coefficient in the range of (0, 1), D is the characteristic dimension of the mining environment data, d is the dimension index, and x id and x jd They are respectively mine environment data x i and x j The features of the dth dimension in is the square of the L2 norm, μ d and σ d are the mean and standard deviation of the dth dimension in the mining environment dataset, e is a natural constant, α1 and α2 are the weighted standard distance weight and exponential decay distance weight in the range of (0, 1), and α1+α2=1;
[0091] Step S312: Noise data screening, calculating the k1 nearest neighbor data of each data in the minority class data set in the mining environment data set according to the total distance. If the k1 nearest neighbor data of the minority class data all belong to the majority class data, the minority class data is removed from the minority class data set as noise data; otherwise, the minority class data is retained; the screened minority class data set is used as a denoising data set to accurately remove noise data that is obviously similar to the majority class data, while retaining the minority class data with unique characteristics, which is helpful to better balance the data distribution in the future;
[0092] Step S32: Calculate the discreteness, pre-set the discrete threshold, and construct a discrete data set based on the mining environment data with a discreteness greater than the discrete threshold in the denoised data set, so as to effectively identify the data with a large discreteness. The formula used is as follows:
[0093] ;
[0094] ;
[0095] ;
[0096] In the formula, and are the centers of the first a and first a+1 nearest neighbor data of the i-th mining environment data, a is the nearest neighbor data index, is the first a nearest neighbor data set of the i-th mining environment data, c is The data in and are the center offsets of the first a and first a+1 nearest neighbor data of the i-th mining environment data, is the discreteness of the i-th mine environment data;
[0097] Step S33: Calculate the number of synthesis, and determine the number of data that needs to be synthesized for each mining environment data in the denoised data set based on the discreteness and the nearest neighbor data, which is conducive to more reasonable adjustment of data distribution and achieving data balance; the formula used is as follows:
[0098] ;
[0099] ;
[0100] In the formula, S majority and S minority are the number of data in the majority class data set and the minority class data set, r is the balance ratio, S new is the total amount of data that needs to be synthesized, and f is The data in is the k1 nearest neighbor data set of the i-th mining environment data, is the Euclidean distance between the i-th mine environment data and its nearest neighbor data f, ED max is the maximum Euclidean distance between the i-th mine environment data and its nearest neighbor data, is the floor function, is the number of data that needs to be synthesized for the i-th mine environment data;
[0101] Step S34: synthesize new data. For each mining environment data in the denoised data set, randomly select one data from the discrete data set as the reference data each time, and introduce random noise for data synthesis until the number of new data synthesized for each mining environment data in the denoised data set is equal to the number of data required to be synthesized calculated in step S33, so as to increase the richness and randomness of the data and better simulate the actual data situation. The formula used is as follows:
[0102] ;
[0103] In the formula, is the new data synthesized from the i-th mine environment data, is a function with mean 0 and variance σ 2The random noise sampled from the normal distribution, g is a data randomly selected from the discrete data set, γ1 and γ2 are the control interpolation coefficient and control noise intensity coefficient in the range of (0, 1) respectively;
[0104] Step S35: construct a mine environmental balance data set, aggregate the new data synthesized in step S34, the minority class data set and the majority class data set to obtain a mine environmental balance data set.
[0105] By performing the above operations, in order to solve the problem that the existing mine environment monitoring methods have differences in monitoring equipment and uneven distribution of mine environment types, which lead to model deviations and cannot truly reflect the actual situation of the mine environment, this scheme designs weighted standard distance and exponential decay distance to obtain the total distance between data, calculates the nearest neighbor data of the data based on the total distance, filters out and removes noise data, improves the accuracy and reliability of the data, and reduces the interference of noise on monitoring and analysis; introduces discreteness to construct discrete data sets, determines the number of data to be synthesized based on discreteness and nearest neighbor data, and synthesizes new data based on discrete data sets and introduces random noise, which increases the diversity of data while balancing the data, and is conducive to more comprehensive and accurate monitoring of the mine environment; constructs a balanced mine environment data set, improves the imbalance of data categories, makes model training and evaluation more effective, improves the scientificity and rationality of mine environment monitoring, and provides a better basis for decision-making.
[0106] Example 5, see Figure 1 and Figure 4 Based on the above embodiment, in step S4, building a mine environment status assessment model specifically includes the following steps:
[0107] Step S41: Calculate the total density of each data, including the following steps:
[0108] Step S411: Calculate the local density of each data in the mine environmental balance data set, calculate the k2 nearest neighbor data of each data in the mine environmental balance data set according to the total distance, calculate the local density of the mine environmental data based on the nearest neighbor data, accurately determine the density of each data in the local range, and help to analyze the distribution characteristics of the data more carefully; the formula used is as follows:
[0109] ;
[0110] In the formula, is the local density of the i-th mine environment data, is the k2 nearest neighbor data set of the i-th mine environment data, n is The data in is the total distance between the i-th mining environment data and its nearest neighbor data n;
[0111] Step S412: Calculate the global density of each data in the mine environmental balance data set, which can more comprehensively reflect the distribution characteristics of the data; the formula used is as follows:
[0112] ;
[0113] In the formula, is the global density of the i-th mine environment data, is the local density of the jth mine environmental data, and N is the number of data in the mine environmental balance data set;
[0114] Step S413: Calculate the total density of each data in the mine environmental balance data set to more accurately describe the characteristics of the data; the formula used is as follows:
[0115] ;
[0116] In the formula, is the total density of the i-th mine environment data;
[0117] Step S42: Calculate the minimum distance using the following formula:
[0118] ;
[0119] In the formula, is the minimum distance of the i-th mine environment data, is the total density of the jth mine environment data;
[0120] Step S43: determining the cluster center, including the following steps:
[0121] Step S431: Calculate the candidate center data set, sort the data in the mine environmental balance data set from large to small based on the minimum distance, and select the top candidate center data set. The minimum distance of each mining environment data is used to calculate the distance threshold; the adjustment factor is set in advance, and the density threshold is calculated based on the adjustment factor and the total density of all data in the mining environment balance data set; the mining environment data in the mining environment balance data set whose total density and minimum distance are both greater than the density threshold and the distance threshold are selected as candidate centers, and the candidate center data set is constructed. The formula used is as follows:
[0122] ;
[0123] ;
[0124] In the formula, δ threshold and m threshold are the distance threshold and density threshold respectively, and p is the adjustment factor in the range of (0, 1);
[0125] Step S432: Calculate the overlapping nearest neighbor data set, calculate the k3 nearest neighbor data of each data in the candidate center data set according to the total distance, and then construct the overlapping nearest neighbor data set between every two different data in the candidate center data set to obtain the number of overlapping data, and further analyze the degree of association between the candidate centers;
[0126] Step S433: Calculating the cluster center data set, including the following steps:
[0127] Step S4331: Delete. Preset the number of cluster centers. If the number of data in the candidate center data set is greater than the pre-set number of cluster centers, sort the data in the candidate center data set in descending order based on the total density, and randomly select one of the two different data in the candidate center data set whose overlapping data number is greater than 0 to delete. When the number of remaining data in the candidate center data set is equal to the pre-set number of cluster centers, stop deleting, build a cluster center data set based on the remaining data in the candidate center data set, and go to step S44 for clustering;
[0128] Step S4332: Iteration. If the number of remaining data in the candidate center data set is still greater than the preset number of cluster centers after deletion in step S4331, the k3 nearest neighbor data of the remaining data in the current candidate center data set are recalculated based on the total distance, and the process goes to step S4331 for deletion again. The iteration is stopped when the number of remaining data in the candidate center data set is equal to the preset number of cluster centers. The selection of cluster centers is gradually optimized to make the model more reasonable.
[0129] Step S44: clustering, allocating the remaining data in the mine environmental balance data set except the cluster center to the cluster to which the cluster center with the shortest total distance belongs, completing clustering, and obtaining the mine environmental status assessment model.
[0130] By performing the above operations, in view of the fact that the existing mine environment monitoring methods have high complexity and diversity of mine environment data, and the mine environment conditions in different regions vary greatly, resulting in misjudgment of mine environment conditions and inability to effectively monitor the mine environment, this scheme calculates the nearest neighbor data of the data based on the total distance, designs local density and global density to obtain the total density of the data, comprehensively considers local and global characteristics, reflects the data characteristics more comprehensively and meticulously, and identifies different environmental areas and characteristics; calculates the distance threshold based on the minimum distance of the data, calculates the density threshold based on the adjustment factor and the total density, constructs a candidate center data set, avoids missing important potential centers, and makes the clustering results more accurate and representative; calculates the overlapping nearest neighbor data set based on the nearest neighbor data, obtains the cluster center data set according to the total density and the number of overlapping data, and distributes the remaining data to the cluster to which the cluster center with the closest total distance belongs, completes clustering, and obtains the mine environment status assessment model, making the cluster center more reasonable and accurate, thereby improving the quality of the entire assessment model, which is conducive to accurately assessing the mine environment status and helping to better understand and analyze the mine environment.
[0131] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, real-time monitoring of the mine environment is to collect real-time mine environment data; the real-time mine environment data includes air quality data, meteorological data, water quality data, soil data, work activity data, biological data and geological data; after data preprocessing of the real-time mine environment data, the real-time mine environment data and the historical mine environment data are input into the mine environment status assessment model for clustering processing. Based on the output clustering results, the label type with the largest number of historical mine environment data in the cluster is selected as the cluster label to obtain the current state of the mine environment and realize real-time monitoring of the mine environment.
[0132] Embodiment 7, see Figure 2 , this embodiment is based on the above embodiment, the mine environment monitoring system based on machine learning provided by the present invention includes a data acquisition module, a data preprocessing module, a mine environment data balance module, a mine environment status assessment model building module and a mine environment real-time monitoring module;
[0133] The data acquisition module collects historical mine environment data and sends the data to the data preprocessing module;
[0134] The data preprocessing module performs data cleaning, data conversion, data normalization and data set construction on the collected data, and sends the data to the mine environment data balance module;
[0135] The mine environment data balance module designs weighted standard distance and exponential decay distance to obtain the total distance between data, calculates the nearest neighbor data of the data according to the total distance, screens out and removes noise data, introduces discreteness to construct a discrete data set, determines the number of data to be synthesized based on discreteness and nearest neighbor data, synthesizes new data based on the discrete data set and introduces random noise, constructs a mine environment balance data set, and sends the data to a mine environment status assessment model construction module;
[0136] The module for constructing a mine environment status assessment model calculates the nearest neighbor data according to the total distance, designs the local density and the global density to obtain the total density, calculates the distance threshold based on the minimum distance, calculates the density threshold based on the adjustment factor and the total density, constructs a candidate center data set, calculates the overlapping nearest neighbor data set, obtains the cluster center data set according to the total density and the number of overlapping data, and distributes the remaining data to the cluster to which the cluster center with the closest total distance belongs, completes clustering, obtains the mine environment status assessment model, and sends the data to the mine environment real-time monitoring module;
[0137] The mine environment real-time monitoring module inputs the collected mine environment data into the mine environment status assessment model for clustering processing, obtains the current state of the mine environment based on the output clustering results, and realizes real-time monitoring of the mine environment.
[0138] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0139] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.
[0140] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A mine environment monitoring method based on machine learning, characterized in that: The method comprises the following steps: Step S1: data collection; Step S2: data preprocessing; Step S3: Balance of mine environmental data, design weighted standard distance and exponential decay distance to obtain the total distance between data, calculate the nearest neighbor data of the data according to the total distance, filter out and remove the noise data, introduce discreteness to construct a discrete data set, determine the number of data to be synthesized based on discreteness and nearest neighbor data, synthesize new data based on the discrete data set and introduce random noise to construct a mine environmental balance data set; Step S4: construct a mine environment status assessment model, calculate the nearest neighbor data according to the total distance, design the local density and the global density to obtain the total density, calculate the distance threshold based on the minimum distance, calculate the density threshold based on the adjustment factor and the total density, construct a candidate center data set, calculate the overlapping nearest neighbor data set, obtain the cluster center data set according to the total density and the number of overlapping data, and assign the remaining data to the cluster to which the cluster center with the closest total distance belongs, complete clustering, and obtain the mine environment status assessment model; Step S5: real-time monitoring of the mine environment; In step S3, the mine environment data balance specifically includes the following steps: Step S31: removing noise data; Step S32: Calculate the discreteness, pre-set the discreteness threshold, and construct a discrete data set based on the mining environment data in the denoised data set whose discreteness is greater than the discreteness threshold. The formula used is as follows: ; ; ; In the formula, and are the centers of the first a and first a+1 nearest neighbor data of the i-th mining environment data, a is the nearest neighbor data index, is the first a nearest neighbor data set of the i-th mining environment data, c is The data in and are the center offsets of the first a and first a+1 nearest neighbor data of the i-th mining environment data, is the discreteness of the i-th mine environment data; Step S33: Calculate the number of synthesis, and determine the number of data that needs to be synthesized for each mining environment data in the denoised data set based on the discreteness and the nearest neighbor data. The formula used is as follows: ; ; In the formula, S majority and S minority are the number of data in the majority class data set and the minority class data set, r is the balance ratio, S new is the total amount of data that needs to be synthesized, and f is The data in is the k1 nearest neighbor data set of the i-th mining environment data, is the Euclidean distance between the i-th mine environment data and its nearest neighbor data f, ED max is the maximum Euclidean distance between the i-th mine environment data and its nearest neighbor data, is the floor function, is the number of data that needs to be synthesized for the i-th mine environment data; Step S34: synthesize new data. For each mining environment data in the denoised data set, randomly select one data from the discrete data set as the reference data each time, and introduce random noise for data synthesis until the number of new data synthesized for each mining environment data in the denoised data set is equal to the number of data required to be synthesized calculated in step S33. The formula used is as follows: ; In the formula, is the new data synthesized from the i-th mine environment data, is a function with mean 0 and variance σ 2 is the random noise sampled from the normal distribution, g is a data randomly selected from the discrete data set, γ1 and γ2 are the control interpolation coefficient and the control noise intensity coefficient respectively; Step S35: construct a mine environmental balance data set, aggregate the new data synthesized in step S34, the minority class data set and the majority class data set to obtain a mine environmental balance data set; In step S31, the noise data removal specifically includes the following steps: Step S311: Calculate the total distance between the data, use the inverse of the Euclidean distance as the weight, and design the weighted standard distance in combination with the mean and standard deviation, then introduce the attenuation coefficient and exponential function to design the exponential attenuation distance, and combine the weighted standard distance and the exponential attenuation distance to obtain the total distance between every two mining environment data in the mining environment data set. The formula used is as follows: ; ; ; ; In the formula, Is the mine environment data x i and x j The weight between , and They are respectively mine environment data x i and x j The weighted standard distance, exponential decay distance and total distance between i and x j are the i-th and j-th mine environment data, i and j are mine environment data indexes, ED(·) is the Euclidean function, is the smoothing term, β is the attenuation coefficient, D is the characteristic dimension of the mining environment data, d is the dimension index, and x id and x jd They are respectively mine environment data x i and x j The features of the dth dimension in is the square of the L2 norm, μ d and σ d are the mean and standard deviation of the dth dimension in the mining environment dataset, e is a natural constant, α1 and α2 are the weighted standard distance weight and exponential decay distance weight, respectively; Step S312: Noise data screening: calculate the k1 nearest neighbor data of each data in the minority class data set in the mining environment data set according to the total distance. If the k1 nearest neighbor data of the minority class data all belong to the majority class data, then the minority class data is removed from the minority class data set as noise data; otherwise, the minority class data is retained; and the screened minority class data set is used as the denoised data set; In step S4, the construction of the mine environment status assessment model specifically includes the following steps: Step S41: Calculate the total density of each data; Step S42: Calculate the minimum distance using the following formula: ; In the formula, is the minimum distance of the i-th mine environment data, is the total density of the jth mine environment data; Step S43: determining the cluster center, including the following steps: Step S431: Calculate the candidate center data set, sort the data in the mine environmental balance data set from large to small based on the minimum distance, and select the top candidate center data set. The minimum distance of each mining environment data is used to calculate the distance threshold; the adjustment factor is set in advance, and the density threshold is calculated based on the adjustment factor and the total density of all data in the mining environment balance data set; the mining environment data in the mining environment balance data set whose total density and minimum distance are both greater than the density threshold and the distance threshold are selected as candidate centers, and the candidate center data set is constructed. The formula used is as follows: ; ; In the formula, δ threshold and m threshold are the distance threshold and density threshold respectively, and p is the adjustment factor; Step S432: Calculate the overlapping nearest neighbor data set, calculate the k3 nearest neighbor data of each data in the candidate center data set according to the total distance, and then construct the overlapping nearest neighbor data set between every two different data in the candidate center data set to obtain the number of overlapping data; Step S433: Calculating the cluster center data set, including the following steps: Step S4331: Delete. Preset the number of cluster centers. If the number of data in the candidate center data set is greater than the pre-set number of cluster centers, sort the data in the candidate center data set in descending order based on the total density, and randomly select one of the two different data in the candidate center data set whose overlapping data number is greater than 0 to delete. When the number of remaining data in the candidate center data set is equal to the pre-set number of cluster centers, stop deleting, build a cluster center data set based on the remaining data in the candidate center data set, and go to step S44 for clustering; Step S4332: Iterate. If the number of remaining data in the candidate center data set is still greater than the preset number of cluster centers after the deletion in step S4331, recalculate the k3 nearest neighbor data of the remaining data in the current candidate center data set based on the total distance, and go to step S4331 to delete again until the number of remaining data in the candidate center data set is equal to the preset number of cluster centers and stop the iteration; Step S44: clustering, allocating the remaining data in the mine environmental balance data set except the cluster center to the cluster to which the cluster center with the shortest total distance belongs, completing clustering, and obtaining a mine environmental status assessment model; In step S41, the calculation of the total density of each data specifically includes the following steps: Step S411: Calculate the local density of each data in the mine environmental balance data set, calculate the k2 nearest neighbor data of each data in the mine environmental balance data set according to the total distance, and calculate the local density of the mine environmental data based on the nearest neighbor data. The formula used is as follows: ; In the formula, is the local density of the i-th mine environment data, is the k2 nearest neighbor data set of the i-th mine environment data, n is The data in is the total distance between the i-th mining environment data and its nearest neighbor data n; Step S412: Calculate the global density of each data in the mine environmental balance data set, using the following formula: ; In the formula, is the global density of the i-th mine environment data, is the local density of the jth mine environmental data, and N is the number of data in the mine environmental balance data set; Step S413: Calculate the total density of each data in the mine environmental balance data set, using the following formula: ; In the formula, is the total density of the i-th mine environment data.
2. The mine environment monitoring method based on machine learning according to claim 1, characterized in that: In step S5, the real-time monitoring of the mine environment is to collect real-time mine environment data; the real-time mine environment data includes air quality data, meteorological data, water quality data, soil data, work activity data, biological data and geological data; after data preprocessing of the real-time mine environment data, the real-time mine environment data and the historical mine environment data are input into the mine environment status assessment model for clustering processing, and based on the output clustering results, the label type with the largest number of historical mine environment data in the cluster is selected as the cluster label to obtain the current state of the mine environment and realize real-time monitoring of the mine environment.
3. The mine environment monitoring method based on machine learning according to claim 1, characterized in that: In step S1, the data collection is to collect historical mine environmental data; the historical mine environmental data includes air quality data, meteorological data, water quality data, soil data, operating activity data, biological data, geological data and environmental status; the air quality data includes oxygen concentration, carbon dioxide concentration, volatile organic compound concentration, particulate matter concentration and harmful gas concentration; the meteorological data includes temperature, humidity, air pressure, precipitation, wind speed and wind direction; the water quality data includes water pH value and water quality pollutants; the soil data includes soil pH value, soil moisture and heavy metal content; the operating activity data includes equipment emission data and mining volume; the biological data includes biodiversity and vegetation coverage; the geological data includes geological structure, stratum stability and ground stress; the environmental status includes excellent, good, general, poor and severe, and the environmental status is used as a data label. The data label is not considered during clustering and is only used when selecting cluster labels.
4. The mine environment monitoring method based on machine learning according to claim 1, characterized in that: In step S2, the data preprocessing is to perform data cleaning, data conversion, data normalization and data set construction on the collected data; data cleaning includes processing missing values, outliers and duplicate values; Data conversion is to convert data into vector form; data normalization is to unify the data range based on the maximum and minimum normalization method; data set construction is to construct a mining environment data set based on the processed data, and obtain minority class data sets and majority class data sets based on the mining environment data set.
5. A mine environment monitoring system based on machine learning, used to implement the mine environment monitoring method based on machine learning as described in any one of claims 1 to 4, characterized in that: It includes data acquisition module, data preprocessing module, mine environment data balance module, mine environment status assessment model building module and mine environment real-time monitoring module; The data acquisition module collects historical mine environment data and sends the data to the data preprocessing module; The data preprocessing module performs data cleaning, data conversion, data normalization and data set construction on the collected data, and sends the data to the mine environment data balance module; The mine environment data balance module designs weighted standard distance and exponential decay distance to obtain the total distance between data, calculates the nearest neighbor data of the data according to the total distance, screens out and removes noise data, introduces discreteness to construct a discrete data set, determines the number of data to be synthesized based on discreteness and nearest neighbor data, synthesizes new data based on the discrete data set and introduces random noise, constructs a mine environment balance data set, and sends the data to a mine environment status assessment model construction module; The module for constructing a mine environment status assessment model calculates the nearest neighbor data according to the total distance, designs the local density and the global density to obtain the total density, calculates the distance threshold based on the minimum distance, calculates the density threshold based on the adjustment factor and the total density, constructs a candidate center data set, calculates the overlapping nearest neighbor data set, obtains the cluster center data set according to the total density and the number of overlapping data, and distributes the remaining data to the cluster to which the cluster center with the closest total distance belongs, completes clustering, obtains the mine environment status assessment model, and sends the data to the mine environment real-time monitoring module; The mine environment real-time monitoring module inputs the collected mine environment data into the mine environment status assessment model for clustering processing, obtains the current state of the mine environment based on the output clustering results, and realizes real-time monitoring of the mine environment.
