Coal mine hydrological dynamic parameter classification method and system based on clustering algorithm

By combining the hybrid clustering algorithms DBSCAN and K-means with PCA dimensionality reduction and time decay factor optimization, the problems of low classification accuracy and poor noise resistance in dynamic monitoring of coal mine hydrology were solved, and high-precision real-time monitoring and early warning of underground hydrological parameters were realized.

CN121723205APending Publication Date: 2026-03-24YULIN SHENHUA ENERGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In the dynamic monitoring of hydrology in coal mines, existing technologies suffer from insufficient classification accuracy of clustering algorithms, difficulty in handling multi-source heterogeneous data, delayed early warning, and sensitivity to noise. Furthermore, traditional methods cannot adapt to dynamic data changes, which threatens the safety of monitoring equipment.

Method used

The hybrid clustering algorithms DBSCAN and K-means are used, combined with PCA dimensionality reduction and sliding window feature extraction. The cluster centers are optimized by silhouette coefficient and time decay factor to generate dynamic hydrological zoning maps and trigger hierarchical early warning.

Benefits of technology

It improves the real-time classification accuracy and noise resistance of coal mine hydrological data, enhances the accuracy of water inrush early warning, reduces the false alarm rate, and achieves high-precision monitoring of dynamic hydrological parameters in underground coal mines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121723205A_ABST
    Figure CN121723205A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of coal mining, and discloses a coal mine hydrological dynamic parameter classification method and system based on a clustering algorithm. The method comprises the following steps: collecting multi-source hydrological data in real time and carrying out wavelet denoising; constructing a feature matrix through PCA dimension reduction and sliding window feature extraction; dynamically dividing parameter categories by adopting a hybrid clustering algorithm DBSCAN and K-means; optimizing the clustering center based on the contour coefficient and the time decay factor; carrying out visualization and decision output; a dynamic hydrological partition map is generated, and high-risk areas are marked; and outputting the classification report to a coal mine safety system, and triggering grading early warning. According to the method, the problems of low real-time classification precision and poor noise immunity of the coal mine hydrological data are solved, dynamic parameter optimization is realized through the adaptive clustering algorithm, and the water inrush early warning accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of coal mining technology, and in particular relates to a method and system for classifying dynamic hydrological parameters in coal mines based on clustering algorithms. Background Technology

[0002] During the construction and production of coal mines, the flow trajectory of fault water is constantly changing due to the continuous forward movement of coal seams. Therefore, it is necessary to dynamically monitor the flow trajectory of fault water in coal mines. During coal mining, coal seams are often buried deep underground, requiring mechanical excavation to reach the coal seam area before mining can begin. When the excavating equipment passes through water-rich faults, the vibration caused by the continuous forward movement of the mining face leads to changes in the fault. Therefore, it is necessary to conduct rapid hydrological monitoring of the coal mine mining face. This requires monitoring equipment to be installed on the mining equipment for real-time dynamic monitoring. However, when existing equipment is used for monitoring, the vibration generated during the mining process causes the fault water to sway, and at the same time, it causes cracks in the rock mass, resulting in changes in the flow direction of the fault water. The amount of water transported in the cracks is relatively small, which means that existing monitoring equipment cannot accurately monitor the flow path of fault water in real time. Consequently, it may not be able to predict the occurrence of rock mass collapse accidents, threatening the safe operation of the monitoring equipment.

[0003] The invention patent is for a dynamic monitoring system for hydrology in coal mines (publication number CN114412571B, publication date and authorization date 20220923), which is used to dynamically monitor the hydrological conditions of large faults in roadways during the mining process and to protect the monitoring equipment in the event of a dangerous accident.

[0004] Clustering is a commonly used data mining method that identifies potentially correlated distributions and patterns in data. As an unsupervised data processing method, clustering relies entirely on the similarity between data points, as there is no prior data. Due to its unsupervised nature, how to measure the performance and correctness of the algorithm is crucial. Furthermore, the "no free lunch" theorem states that there is no universally applicable best method or model. Some clustering algorithms may work well for convex structures but not for ring clusters, such as the K-means algorithm. Some commonly used algorithms include: DBSCAN, k-means, COBWEB, Fuzzy c-means, Farthestfirst, and EM. If there is limited prior knowledge of the data, it is difficult to determine which algorithm to use; randomly selecting a clustering algorithm may result in a very ambiguous final clustering result.

[0005] Currently, algorithm evaluation is receiving increasing attention. Existing literature indicates that different types of clustering algorithms can be ranked, and then the optimal algorithm can be selected. G. Wang applied decision-making methods to data mining, studied the model selection problem in clustering, and proposed a new selection method. Y. Zhang used clustering effectiveness to evaluate the results of processing algorithms and select optimal parameters, then introduced multi-objective decision-making to rank algorithms and select the optimal algorithm. In 2015, W. Wu proposed a theoretical framework for data mining model evaluation based on multi-objective decision-making. The MSM operator was originally proposed by C. Maclaurin.

[0006] However, existing clustering algorithms still have certain application limitations in terms of classification accuracy. Furthermore, they lack effective theoretical basis for classifying dynamic hydrological parameters in coal mines, resulting in unsatisfactory accuracy for multi-parameter classification. Traditional hydrological monitoring relies on manual experience analysis, making it difficult to handle multi-source heterogeneous data (such as water level, temperature, and flow velocity), leading to delayed early warnings. Conventional clustering methods (such as K-means) are sensitive to noise and cannot adapt to dynamic data changes. The invention patent "Dynamic Optimal Self-Consistent Clustering Method Driven by Course Learning and Reinforcement Learning" (Publication No. CN120372315A, Publication Date: July 25, 2025) mentions that dynamic clustering requires manual parameter adjustment, which is inefficient. The invention patent "A Program Running Method, Device, and Related Equipment" (Publication No. CN117931415A, Publication Date: April 26, 2024) proposes dynamically configuring program parameters through clustering, but does not address hydrological applications. Hydrological parameter classification largely relies on statistical methods, lacking the ability to explore nonlinear relationships. Summary of the Invention

[0007] To overcome the problems existing in related technologies, the present invention discloses an embodiment of a method and system for classifying dynamic parameters of hydrology in coal mines based on a clustering algorithm.

[0008] The technical solution is as follows: A classification method for dynamic parameters of hydrology in coal mines based on clustering algorithms, comprising the following steps:

[0009] S1, real-time acquisition of multi-source hydrological data and wavelet noise reduction;

[0010] S2, a feature matrix is ​​constructed using PCA dimensionality reduction and sliding window feature extraction;

[0011] S3 uses a hybrid clustering algorithm, DBSCAN, and K-means to dynamically divide parameter categories;

[0012] S4, optimizing cluster centers based on silhouette coefficient and time decay factor;

[0013] S5 provides visualization and decision-making output; generates dynamic hydrological zoning maps and marks high-risk areas; outputs classification reports to the coal mine safety system and triggers graded early warnings.

[0014] In step S1, the multi-source hydrological data includes: real-time acquisition of water level, water temperature, flow velocity, water quality, and rainfall parameters by the downhole sensor network;

[0015] In step S2, the sliding window feature extraction and feature matrix construction includes: calculating the statistical features and time-domain / frequency-domain indices within the sliding window; the statistical features include mean, variance, and extreme values; the specific steps are as follows:

[0016] Step 1, data preprocessing, including Z-score normalization and sliding window segmentation;

[0017] Step 2, Statistical Feature Calculation: Calculate the mean, variance, extreme values, and peak-to-peak value for each data window; and perform higher-order statistics, including skewness and kurtosis.

[0018] Step 3, time-domain feature extraction, including: extraction of the autocorrelation function reflecting short-time energy fluctuations in signal strength, zero-crossing rate (ZCR), and fundamental frequency estimation;

[0019] Step 4, frequency domain feature extraction, including Fourier transform (FFT) to convert the signal to the frequency domain, including extraction of key frequency domain indicators such as spectral centroid, spectral entropy, and band energy ratio, as well as extraction of Mel frequency cepstral coefficients (MFCC).

[0020] Step 5, Feature matrix construction; including:

[0021] (5.1) Feature vector assembly: one feature vector is generated for each window.

[0022]

[0023] In the formula, For feature vector groups, The mean, For variance, For skewness, For short-term energy, For zero-crossing rate, For the spectral centroid, For spectral entropy, For transpose

[0024] (5.2) Matrix integration; The feature vectors of the windows are stacked into a matrix, expressed as follows:

[0025]

[0026] In the formula, The eigenvector matrix, These are the feature vectors of the first window and the feature vectors of the second window, respectively. Feature vectors of each window for A window and A matrix with 1 feature dimension For the first One window, For feature dimensions.

[0027] In step S3, the dynamic classification of parameter categories includes: hydrological parameter classification, and anomaly detection of hydrological parameter classification;

[0028] The category is defined as:

[0029] Normal category: Parameter fluctuations are within the historical range;

[0030] Risk category: Outliers outside the cluster boundaries, including sudden increases in flow velocity and sudden changes in water level;

[0031] Anomaly detection: Identify local anomalous clusters by combining Isolation Forest.

[0032] In step S3, the hybrid clustering algorithms DBSCAN and K-means include:

[0033] S301, DBSCAN density pre-clustering;

[0034] S302, K-means cluster refinement;

[0035] S303, Dynamic Boundary Point Assignment;

[0036] S304 adapts to the parameter updates and iterations of dynamic hydrological data, repeating the above steps as the time window slides.

[0037] In step S301, DBSCAN density pre-clustering includes:

[0038] S3011, Parameter Settings; Neighborhood Radius The minimum number of points, MinPts, is determined using a k-distance plot and set empirically based on data density.

[0039] S3012, Core Object Recognition; for each data point The number of points in its ε-neighborhood is calculated as follows:

[0040]

[0041] In the formula, Let be the set of points in the ε-neighborhood. For eigenvalues, The distribution function, The neighborhood radius;

[0042] like Then mark As the core object; The minimum number of points;

[0043] S3013, cluster expansion and noise separation;

[0044] Merging density reachable points to form initial clusters Non-density reachable points are marked as noise.

[0045] In step S302, K-means cluster refinement includes:

[0046] S3021, Initialize centroid; use the cluster center generated by DBSCAN. As the initial centroid of K-means This represents the number of DBSCAN clusters.

[0047] S3022, iterative optimization;

[0048] Assignment: Assign each point to the cluster of the nearest centroid, expressed as:

[0049]

[0050] In the formula, For iteration The next set of clusters assigned to the nearest centroid. For the first The mean of the points, For the first The mean of the points, For the number of iterations, for Any one of the points;

[0051] Updated, the centroid has been recalculated as follows:

[0052]

[0053] In the formula, For the first Point iteration The mean of the times, The set of clusters assigned to the nearest centroid;

[0054] Until the change in centroid is less than the threshold Or it may reach the maximum number of iterations.

[0055] In step S303, dynamic boundary point allocation includes:

[0056] Attribution determination: Boundary points marked by DBSCAN The distance to each K-means centroid and the density weight are calculated as follows:

[0057]

[0058] In the formula, The number of clusters, For clusters The average point density.

[0059] In step S3, when using the hybrid clustering algorithms DBSCAN and K-means to dynamically divide the parameter categories, it is also necessary to automatically adjust the number of clusters based on the silhouette coefficient and optimize the process.

[0060] Profile coefficient is used to comprehensively evaluate the intra-cluster compactness of samples. and inter-cluster separation The expression is:

[0061]

[0062] In the formula, As a sample, The closer the value is to 1, the better the clustering effect.

[0063] Overall assessment: Take all samples The average value is used as the silhouette coefficient of the model, which is used for cross-sectional comparison of different cluster numbers. The effect;

[0064] The steps for automatically adjusting the number of clusters include:

[0065] Step (1) Set the number of clusters The search range; the traversal interval of k is set according to the data size;

[0066] Step (2) Traverse the number of clusters Values ​​and calculates the profile coefficients, including:

[0067] (2.1) Clustering model training: The K-Means clustering algorithm is used to fit the data and generate sample labels;

[0068] (2.2) Calculation of silhouette coefficient: The silhouette_score function is called to calculate the current profile coefficient. The mean of the profile coefficients;

[0069] (2.3) Store the results, recording each The corresponding contour coefficient value;

[0070] Step (3) Select the optimal number of clusters This includes: visual analysis, plotting the profile coefficient as... The changing curve helps identify peak points; it aids in judgment, especially when multiple peaks are present. If the scores are close, choose based on business needs;

[0071] Step (4) Verify clustering quality; In the dynamic classification of parameter categories using the hybrid clustering algorithms DBSCAN and K-means, a time decay factor needs to be introduced to give higher weight to recent data, and the decay factor needs to be optimized, including:

[0072] (I) Linear decay, expressed as:

[0073]

[0074] In the formula, The value is a linear decay value. As the attenuation factor, Generates the time difference between the current time and the data.

[0075] (II) Data preprocessing and weight calculation, including timestamp standardization; calculating the weight of each data point, applying a decay function to each data point, and generating a weight column;

[0076] (III) Clustering algorithm weight integration; different clustering algorithms require customized integration of weights, such as K-means;

[0077] Distance calculation modification: Weighted Euclidean distance is:

[0078]

[0079] In the formula, For weighted Euclidean distance, For data point weights, For eigenvalues;

[0080] Center point update: Weighted average:

[0081]

[0082] Density clustering (DBSCAN), including density calculation optimization, is expressed as follows:

[0083]

[0084] In the formula, This involves summing the weights of all data points.

[0085] In step S4, optimizing cluster centers based on silhouette coefficient and time decay factor includes: optimizing cluster centers based on silhouette coefficient and time decay factor through data weighting, multi-K value clustering, silhouette coefficient evaluation, and dynamic center update.

[0086] Another objective of this invention is to provide a coal mine hydrological dynamic parameter classification system based on a clustering algorithm. This system implements the coal mine hydrological dynamic parameter classification method based on the clustering algorithm, and includes:

[0087] The multi-source hydrological data acquisition and preprocessing module is used to acquire multi-source hydrological data in real time and perform wavelet noise reduction.

[0088] The feature matrix construction module is used to construct a feature matrix through PCA dimensionality reduction and sliding window feature extraction.

[0089] The hybrid clustering algorithm module is used to dynamically divide parameter categories using the hybrid clustering algorithms DBSCAN and K-means;

[0090] The cluster center optimization module is used to optimize cluster centers based on the silhouette coefficient and the time decay factor.

[0091] The visualization and decision output module is used to generate dynamic hydrological zoning maps and mark high-risk areas; it also outputs classification reports to the coal mine safety system to trigger graded early warnings.

[0092] Combining all the above technical solutions, the beneficial effects of this invention are as follows: This invention targets the goaf area of ​​the 5-20303 working face in Qinglongsi Coal Mine, covering a width of 350m and a length of 1000m. It proposes a coal mine hydrological dynamic parameter classification method based on clustering algorithms to monitor the dynamics of underground coal mine hydrology, and to dynamically monitor the deformation process of the three zones (bending and subsidence zone, fracture zone, and caving zone) in the goaf area. This achieves monitoring of the dynamic deformation parameters of the underground coal mine goaf at any time with high monitoring accuracy. This invention solves the problems of low real-time classification accuracy and poor noise resistance of coal mine hydrological data, and improves the accuracy of water inrush early warning by optimizing dynamic parameters through an adaptive clustering algorithm. Attached Figure Description

[0093] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure;

[0094] Figure 1 This is a flowchart of a coal mine hydrological dynamic parameter classification method based on clustering algorithm provided in an embodiment of the present invention. Detailed Implementation

[0095] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0096] Examples, such as Figure 1 As shown, the classification method for dynamic parameters of coal mine hydrology based on clustering algorithm includes:

[0097] S1, real-time acquisition of multi-source hydrological data and wavelet noise reduction;

[0098] Data source: Real-time acquisition of parameters such as water level, water temperature, flow velocity, water quality (pH value, turbidity), and rainfall by downhole sensor network. Missing value imputation: Wavelet transform is used for noise reduction and interpolation; Standardization: Z-score normalization is used to eliminate the influence of dimensions; S2, a feature matrix is ​​constructed through PCA dimensionality reduction and sliding window feature extraction;

[0099] Feature extraction: Calculate statistical features (mean, variance, extreme values) and time-domain and frequency-domain indices within the sliding window.

[0100] Dimensionality reduction: Principal component analysis (PCA) retains 95% of the variance contribution rate, reducing redundancy;

[0101] For example, calculating statistical characteristics (mean, variance, extreme values) and time-domain and frequency-domain indices within a sliding window includes:

[0102] Step 1, Data Preprocessing;

[0103] (1.1) Data standardization; Z-score normalization: eliminating the influence of dimensions:

[0104]

[0105] In the formula, μ is the mean and σ is the standard deviation.

[0106] (1.2) Sliding window segmentation: Divide the time series data into segments of length N, with the window overlap rate typically set at 50%;

[0107] Step 2, Statistical Feature Calculation; Calculate for each data window:

[0108] (2.1) Basic statistics;

[0109] The mean is:

[0110]

[0111] The variance is:

[0112]

[0113] The extreme values ​​are:

[0114]

[0115] Peak-to-peak value is:

[0116]

[0117] (2.2) Higher-order statistics;

[0118] Skewness (distribution asymmetry):

[0119]

[0120] Kurtosis (sharpness of distribution):

[0121]

[0122] Step 3, temporal feature extraction, extracting periodicity through peak positions.

[0123] (3.1) Short-time energy:

[0124]

[0125] It reflects fluctuations in signal strength.

[0126] Zero crossing rate (ZCR):

[0127]

[0128] In the formula, This is an indicator function used to detect the oscillation frequency of a signal.

[0129] Autocorrelation function (fundamental frequency estimation);

[0130]

[0131] In the formula, This is the fundamental frequency.

[0132] Step 4, frequency domain feature extraction;

[0133] (4.1) Fourier Transform (FFT);

[0134]

[0135] Convert the signal to the frequency domain.

[0136] (4.2) Key frequency domain indicators:

[0137] Spectral centroid: Energy distribution center:

[0138]

[0139] In the formula, For frequency The corresponding Hz value.

[0140] Spectral entropy: Frequency complexity:

[0141]

[0142] Frequency band energy ratio: Divide the frequency bands (e.g., δ: 0.5–4Hz, θ: 4–8Hz) and calculate the energy ratio of each band.

[0143] (4.3) Mel frequency cepstral coefficients (MFCC);

[0144] Steps: Pre-emphasis → Framing → FFT → Mel filter bank → DCT transform;

[0145] Step 5, Feature matrix construction;

[0146] (5.1) Eigenvector assembly:

[0147] Each window generates a feature vector:

[0148]

[0149] In the formula, For feature vector groups, The mean, For variance, For skewness, For short-term energy, For zero-crossing rate, For the spectral centroid, For spectral entropy, For transpose;

[0150] For example: if 20 features are extracted, then .

[0151] (5.2) Matrix integration;

[0152] Will The feature vectors of the windows are stacked into a matrix:

[0153]

[0154] In the formula, The eigenvector matrix, These are the feature vectors of the first window and the feature vectors of the second window, respectively. Feature vectors of each window for A window and A matrix with 1 feature dimension For the first One window, For feature dimensions.

[0155] (5.3) Post-processing; Normalization: Standardize each column of features using Min-Max or Z-score. Dimensionality reduction: Use PCA or LDA to reduce redundancy.

[0156] S3 employs a hybrid clustering algorithm, DBSCAN, and K-means to dynamically classify parameter categories. Algorithm selection: DBSCAN (density clustering) and K-means (partitioning clustering) are combined to address noise sensitivity and initial center dependency issues. Adaptive optimization: The number of clusters is automatically adjusted based on the silhouette score; a time decay factor is introduced to assign higher weight to recent data; the dynamic classification of parameter categories includes hydrological parameter classification, and anomaly detection is performed on the hydrological parameter classification.

[0157] Category definitions: Normal category: parameter fluctuations within the historical range; Risk category: outliers outside the cluster boundaries (such as sudden increases in flow velocity or sudden changes in water level); Anomaly detection: identify local anomalous clusters by combining isolation forest.

[0158] For example, hybrid clustering algorithms (DBSCAN and K-means) include:

[0159] S301, DBSCAN density pre-clustering (noise filtering and initial cluster generation);

[0160] S3011, parameter settings;

[0161] Neighborhood radius (ε): Determined by a k-distance graph, for example, by taking the inflection point value of the distance from all sample points to their k-th nearest neighbor.

[0162] Minimum number of points (MinPts): Set based on data density experience (usually ≥ dimension + 1), such as 5% of the number of hydrological stations × the length of the time series.

[0163] S3012, Core Object Recognition;

[0164] For each data point (For example, a multidimensional parameter vector of a hydrological station), calculate the number of points in its ε-neighborhood:

[0165]

[0166] In the formula, Let be the set of points in the ε-neighborhood. For eigenvalues, The distribution function, The neighborhood radius;

[0167] like Then mark As the core object; The minimum number of points;

[0168] S3013, cluster expansion and noise separation;

[0169] Starting from the core object, merge density-reachable points to form an initial cluster. (e.g., clusters of events with small hydrological volumes).

[0170] Non-density reachable points are marked as noise (such as anomalous hydrological stations).

[0171] S302, K-means cluster refinement (optimization of centroids and partitioning);

[0172] S3021, initialize the centroid;

[0173] Cluster center generated by DBSCAN Used as the initial centroid of K-means (m is the number of DBSCAN clusters).

[0174] S3022, iterative optimization;

[0175] Assignment: Assign each point to the cluster of the nearest centroid, expressed as:

[0176]

[0177] In the formula, For iteration The next set of clusters assigned to the nearest centroid. For the first The mean of the points, For the first The mean of the points, For the number of iterations, for Any one of the points;

[0178] Updated, the centroid has been recalculated as follows:

[0179]

[0180] In the formula, For the first Point iteration The mean of the times, The set of clusters assigned to the nearest centroid;

[0181] Until the change in centroid is less than the threshold (like (or reach the maximum number of iterations.)

[0182] S303, Dynamic Boundary Point Allocation (Fusion Strategy);

[0183] Attribution determination: Boundary points marked by DBSCAN Calculate the distance to each K-means centroid and its density weight:

[0184]

[0185] In the formula, The number of clusters, For clusters The average point density.

[0186] S304, Parameter Update and Iteration (Adapting to Dynamic Hydrological Data);

[0187] Repeat the above steps as the time window slides (e.g., by month / quarter), using historical cluster centers to hot-start new calculations and reduce the number of iterations. A summary of key calculation formulas is shown in Table 1.

[0188] Table 1 Key Calculation Formulas

[0189]

[0190] It can be seen that the direct positive effects of the above methods are:

[0191] Improve clustering accuracy: DBSCAN filters noise (such as abnormal rainfall records), K-means optimizes spherical cluster partitioning, and the hybrid model improves the silhouette coefficient by 15-30% in complex hydrological data.

[0192] Case study: The accuracy of dynamic hydrological identification in coal mines increased by 22%, while the false alarm rate decreased by 18%.

[0193] Adapting to complex hydrological structures: Identifying clusters of arbitrary shapes (such as discontinuous hydrological regions) and dynamic evolution patterns (such as hydrological flow propagation paths).

[0194] Optimize computational efficiency: DBSCAN pre-clustering reduces the number of samples required for K-means iterations, reducing computation time by 40% (compared to pure K-means).

[0195] Enhance decision support: Dynamic partitioning supports real-time hydrological risk assessment (such as hydrological early warning zoning) and resource allocation (such as joint optimization of hydrological groups).

[0196] For example, the number of clusters is automatically adjusted and optimized based on the silhouette score;

[0197] Profile coefficient principle and calculation:

[0198] Profile coefficient is used to comprehensively evaluate the intra-cluster compactness of samples. and inter-cluster separation :

[0199]

[0200] In the formula, As a sample, The closer the value is to 1, the better the clustering effect.

[0201] The steps for automatically adjusting the number of clusters include:

[0202] Step (1) Set the search range for the number of clusters k; Range selection: Set the traversal interval of k according to the data size (e.g., k=2 to k=10), which needs to cover a reasonable number of possible clusters. Among them, too large a k may lead to overfitting, while too small a k will ignore the data structure. The initial range can be estimated by business requirements or data size.

[0203] Step (2) Iterate through the k values ​​and calculate the profile coefficient; perform the following operations for each k:

[0204] 1) Clustering model training: Use a clustering algorithm (such as K-Means) to fit the data and generate sample labels. The code is as follows:

[0205] from sklearn.cluster import KMeans

[0206] kmeans = KMeans(n_clusters=k, random_state=42)

[0207] labels = kmeans.fit_predict(X);

[0208] 2) Silhouette coefficient calculation: The silhouette_score function is called to calculate the mean silhouette coefficient of the current k. The code is as follows:

[0209] from sklearn.metrics import silhouette_score

[0210] score = silhouette_score(X, labels, metric='euclidean') # Default Euclidean distance;

[0211] Key parameters: metric: for high-dimensional data, choose cosine or Manhattan. sample_size: for large datasets, sample to accelerate computation.

[0212] 3) Store the results: Record the contour coefficient value corresponding to each k.

[0213] Step (3) Select the optimal number of clusters k;

[0214] i) Visual analysis: Plot the profile coefficient as a function of kk, and identify peak points. The code is as follows:

[0215] import matplotlib.pyplot as plt

[0216] plt.plot(k_range, scores, marker='o')

[0217] plt.xlabel('Number of Clusters (k)')

[0218] plt.ylabel('Silhouette Score')

[0219] plt.title('Optimal k Selection')

[0220] plt.show();

[0221] The peak value corresponds to the optimal k: for example, if the curve reaches its peak value when k=4, then choose 4.

[0222] ii) Auxiliary judgment: If multiple k scores are close, select one based on business needs. Check whether the silhouette coefficient is significantly higher than other kk (e.g., difference > 0.05).

[0223] Step (4) In-depth verification of cluster quality (optional); Silhouette Plot analysis; Observe the sample distribution of each cluster: Ideal case: all clusters have high silhouette coefficients and similar widths (sample sizes). Anomaly diagnosis: Samples with negative values ​​may be misclassified and parameters need to be adjusted. Multi-index cross-validation: Combine elbow method (SSE), Calinski-Harabasz index, etc. to avoid bias from a single index.

[0224] Optimization strategies for automatically adjusting the number of clusters include: Data preprocessing: Standardizing features (e.g., Z-score) to avoid the influence of dimensions on distance calculation. Algorithm stability: K-Means is sensitive to initial centers; multiple runs are used to obtain the average silhouette coefficient. For complex data, DBSCAN equal-density clustering can be tried to avoid the spherical cluster assumption. High-dimensional data challenges: Silhouette coefficients may become ineffective in high-dimensional spaces; dimensionality reduction (e.g., PCA) is recommended first.

[0225] Automated implementation: Encapsulated as a function to automatically return the optimal k; the code is as follows:

[0226] def auto_select_k(X, k_max=10):

[0227] best_k, best_score = 2, -1

[0228] for k in range(2, k_max+1):

[0229] model = KMeans(n_clusters=k).fit(X)

[0230] score = silhouette_score(X, model.labels_)

[0231] if score > best_score:

[0232] best_k, best_score = k, score

[0233] return best_k.

[0234] Example results: For the Iris dataset, the silhouette coefficient reaches 0.55 at k=3, which is higher than k=2 (0.48) and k=4 (0.50), confirming that the optimal number of clusters is 3.

[0235] The core of automatically adjusting the number of clusters using silhouette coefficients is the system's iteration through k values ​​→ quantitative evaluation → selection of the optimal solution. This method is efficient and reliable in unlabeled scenarios, but data characteristics and algorithm limitations must be considered. Practical recommendations suggest combining visualization and multi-metric verification to improve the robustness of the results.

[0236] For example, introducing a time decay factor, giving more weight to recent data, and optimizing the decay factor includes:

[0237] (I) Define the time decay function (core foundation);

[0238] The exponential decay formula is:

[0239]

[0240] In the formula, The value is a linear decay value. λ is a decay factor that controls the rate at which the weights decrease (the larger λ is, the higher the weight of recent data). This generates the time difference between the current time and the data (unit: days / second).

[0241] Calculated based on half-life (the time required for the weight to decay by half). : ;

[0242] (II) Data preprocessing and weight calculation;

[0243] 1) Timestamp standardization; convert the timestamps of the data into numerical differences (such as the number of days since the current time) to ensure that Δt can be calculated;

[0244] 2) Calculate the weight of each data point; apply a decay function to each data point to generate a weight column, as shown in the code below:

[0245] import numpy as np

[0246] # Assuming df is a dataset and 'timestamp' is the timestamp column

[0247] current_time = datetime.now()

[0248]

[0249]

[0250] The weights need to be normalized so that the sum is 1, to avoid the influence of the dimensions on the clustering.

[0251] (III) Clustering algorithm weight integration; different clustering algorithms require customized weight integration: K-means / K-medoids; distance calculation modification: weighted Euclidean distance:

[0252]

[0253] In the formula, For weighted Euclidean distance, For data point weights, For eigenvalues;

[0254] Center point update: Weighted average:

[0255]

[0256] Density clustering (DBSCAN), including density calculation optimization, is expressed as follows:

[0257]

[0258] In the formula, This involves summing the weights of all data points.

[0259] High-weighted data points contribute more to density and influence the determination of core points. Examples include attenuation factor optimization and verification; parameter selection strategies; business-driven approaches: setting half-life based on data timeliness requirements; and grid search. Cross-validation is performed in the interval [0.05, 0.3], selecting the profile coefficient with the highest profile coefficient. Dynamic decay (advanced applications); introducing adaptive... When the data distribution changes abruptly, increase Strengthen the impact of recent data.

[0260] S4, optimizing cluster centers based on silhouette coefficient and time decay factor;

[0261] Optimizing cluster centers based on silhouette coefficient and time decay factor requires four steps: "data weighting → multi-K value clustering → silhouette coefficient evaluation → dynamic center update". The core is to combine time weight to enhance the influence of recent data, while using silhouette coefficient to verify cluster quality.

[0262] Time decay factor: By using an exponential or linear function, more weight is given to recent data, which solves the problem that traditional clustering is not sensitive to time-sensitive data.

[0263] Silhouette coefficient: ranging from -1 to 1, combining intra-cluster compactness (a(i)) and inter-cluster separation (b(i)) to evaluate the effectiveness of different cluster centers.

[0264] Optimization objective: To dynamically adjust cluster centers so that the results not only closely reflect the latest data distribution but also possess good intra-cluster cohesion and inter-cluster separation.

[0265] Core steps:

[0266] (a) Data preprocessing and time weight calculation; timestamp conversion: calculating the time difference between each data point and the current time. (Unit: Day), Weighting Formula Selection (Commonly Used Exponential Decay): ,in, This is the decay factor (the larger λ is, the higher the weight of recent data). Normalization: Ensures the sum of weights is 1, avoiding the influence of dimensions on cluster distance calculation.

[0267] (b) Weighted clustering and multi-K-value silhouette coefficient evaluation; weighted K-Means clustering:

[0268] Distance calculation: Weighted Euclidean distance is used. Center point update: That is, the weighted average.

[0269] Multi-K value test: Traverse K=2~10, perform weighted clustering for each K, and calculate the average silhouette coefficient, see Table 2;

[0270] Table 2 Average Profile Coefficient

[0271] K value Profile coefficient (unweighted) Profile coefficient (weighted λ=0.1) 2 0.42 0.58 3 0.51 0.65 4 0.48 0.60

[0272] In Table 2, when λ=0.1, the silhouette coefficient of K=3 is the highest, and it is initially selected as the optimal number of clusters.

[0273] (c) Cluster center optimization based on silhouette coefficient; Plotting silhouette coefficient curves: Using K as the horizontal axis and silhouette coefficient as the vertical axis, select the K value corresponding to the peak of the curve (e.g., K=3 in Table 2 above); Silhouette plot analysis: Generate a silhouette plot for the optimal K value and check for the existence of low-coefficient samples. If an outlier exists, adjust the cluster center or filter outliers.

[0274] Dynamic center adjustment: Based on the distribution characteristics of recent high-weight data, fine-tune the position of the center point, for example:

[0275] Original center (x=10, y=20) → Weighted center (x=12, y=23) (due to recent data clustering on the right).

[0276] (d) Iterative verification and parameter tuning; λ value grid search: cross-validate within the range of λ∈[0.05,0.3] and select the λ with the highest silhouette coefficient (e.g., λ=0.1 is the best); business adaptability check: if the clustering results need to reflect the latest trends (e.g., e-commerce user grouping), λ can be appropriately increased (e.g., λ=0.2) to strengthen the influence of recent data.

[0277] (e) Key Output; Final Cluster Centers: Weighted center points determined based on the optimal K and λ values, which must satisfy a silhouette coefficient > 0.6 and a recent data percentage > 60%. High-dimensional data should be dimensionality-reduced first (e.g., using PCA) to avoid silhouette coefficient evaluation bias. If concept drift exists, λ can be dynamically adjusted (e.g., temporarily increasing λ when a distribution change is detected).

[0278] S5 provides visualization and decision-making output; generates dynamic hydrological zoning maps and marks high-risk areas; outputs classification reports to the coal mine safety system and triggers graded early warnings.

[0279] A dynamic hydrological zoning map is generated, marking high-risk areas; a classification report is output to the coal mine safety system, triggering graded early warnings. It can be seen that the dynamic parameter optimization mechanism of this invention adjusts the sensor sampling frequency in real time through clustering result feedback. A hybrid clustering model combines the advantages of density and partitioning clusters, improving adaptability to non-spherical data distributions; interpretability is enhanced by analyzing the contribution of key parameters to the classification results based on SHAP values, such as "flow velocity mutations dominate 80% of abnormal classifications". Anomaly detection uses the isolated forest algorithm to identify outlier clusters.

[0280] This invention discloses a classification method for dynamic parameters of coal mine hydrology based on clustering algorithms. By fusing density clustering and partitioning clustering models and incorporating an adaptive parameter optimization mechanism, it achieves real-time classification and anomaly early warning of mine hydrological data. This solves the problem of poor adaptability to dynamic data in traditional methods and improves the intelligent level of coal mine water hazard prevention and control.

[0281] Example 2: A coal mine hydrological dynamic parameter classification system based on clustering algorithm, comprising:

[0282] The multi-source hydrological data acquisition and preprocessing module is used to acquire multi-source hydrological data in real time and perform wavelet noise reduction.

[0283] The feature matrix construction module is used to construct a feature matrix through PCA dimensionality reduction and sliding window feature extraction.

[0284] The hybrid clustering algorithm module is used to dynamically divide parameter categories using the hybrid clustering algorithms DBSCAN and K-means;

[0285] The cluster center optimization module is used to optimize cluster centers based on the silhouette coefficient and the time decay factor.

[0286] The visualization and decision output module is used to generate dynamic hydrological zoning maps and mark high-risk areas; it also outputs classification reports to the coal mine safety system to trigger graded early warnings.

[0287] Application Example: For the goaf area of ​​the 5-20303 working face in Qinglongsi Coal Mine, covering a range of 350m wide and 1000m long, a coal mine hydrological dynamic parameter classification method based on clustering algorithms will be used to monitor the dynamics of underground coal mine hydrology, and to dynamically monitor the deformation process of the three zones (bending subsidence zone, fracture zone, and caving zone) in the goaf area. This achieves dynamic monitoring of deformation in the underground coal mine goaf at any time.

[0288] Taking underground monitoring in a coal mine as an example: Data input: 10 hydrological sensors, collecting data once per second, with a window size of 60 minutes; Clustering parameters: DBSCAN (ε=0.5, MinPts=10), K-means (k=4); Result verification: Classification accuracy was 92.3%, which is 18% higher than that of traditional SVM.

[0289] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention and within the spirit and principles of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for classifying dynamic hydrological parameters in coal mines based on clustering algorithms, characterized in that, The method includes the following steps: S1, real-time acquisition of multi-source hydrological data and wavelet noise reduction; S2, a feature matrix is ​​constructed using PCA dimensionality reduction and sliding window feature extraction; S3 uses a hybrid clustering algorithm, DBSCAN, and K-means to dynamically divide the parameter categories; S4, optimizing cluster centers based on silhouette coefficient and time decay factor; S5 provides visualization and decision-making output; generates dynamic hydrological zoning maps and marks high-risk areas; outputs classification reports to the coal mine safety system and triggers graded early warnings.

2. The coal mine hydrological dynamic parameter classification method based on clustering algorithm according to claim 1, characterized in that, In step S1, the multi-source hydrological data includes: real-time acquisition of water level, water temperature, flow velocity, water quality, and rainfall parameters by the downhole sensor network; In step S2, the sliding window feature extraction and feature matrix construction includes: calculating the statistical features and time-domain / frequency-domain indices within the sliding window; the statistical features include mean, variance, and extreme values; the specific steps are as follows: Step 1, data preprocessing, including Z-score normalization and sliding window segmentation; Step 2, Statistical Feature Calculation: Calculate the mean, variance, extreme values, and peak-to-peak values ​​for each data window; and perform higher-order statistics, including skewness and kurtosis. Step 3, time-domain feature extraction, including: extraction of the autocorrelation function reflecting short-time energy fluctuations in signal strength, zero-crossing rate (ZCR), and fundamental frequency estimation; Step 4, frequency domain feature extraction, including Fourier transform (FFT) to convert the signal to the frequency domain, including extraction of key frequency domain indicators such as spectral centroid, spectral entropy, and band energy ratio, as well as extraction of Mel frequency cepstral coefficients (MFCC). Step 5, Feature matrix construction; including: (5.1) Feature vector assembly: Each window generates one feature vector. In the formula, For feature vector groups, The mean, For variance, For skewness, For short-term energy, For zero-crossing rate, For the spectral centroid, For spectral entropy, For transpose; (5.2) Matrix integration; The feature vectors of the windows are stacked into a matrix, expressed as follows: In the formula, The eigenvector matrix, These are the feature vectors of the first window and the feature vectors of the second window, respectively. Feature vectors of each window for A window and A matrix with 1 feature dimension For the first One window, For feature dimensions.

3. The coal mine hydrological dynamic parameter classification method based on clustering algorithm according to claim 1, characterized in that, In step S3, the dynamic classification of parameter categories includes: hydrological parameter classification, and anomaly detection of hydrological parameter classification; The category is defined as: Normal category: Parameter fluctuations are within the historical range; Risk category: Outliers outside the cluster boundaries, including sudden increases in flow velocity and sudden changes in water level; Anomaly detection: Identify local anomalous clusters by combining Isolation Forest.

4. The coal mine hydrological dynamic parameter classification method based on clustering algorithm according to claim 1, characterized in that, In step S3, the hybrid clustering algorithms DBSCAN and K-means include: S301, DBSCAN density pre-clustering; S302, K-means cluster refinement; S303, Dynamic Boundary Point Assignment; S304 adapts to the parameter updates and iterations of dynamic hydrological data, repeating the above steps as the time window slides.

5. The coal mine hydrological dynamic parameter classification method based on clustering algorithm according to claim 4, characterized in that, In step S301, DBSCAN density pre-clustering includes: S3011, Parameter Settings; Neighborhood Radius The minimum number of points, MinPts, is determined using a k-distance plot and set empirically based on data density. S3012, Core Object Recognition; for each data point The number of points in its ε-neighborhood is calculated as follows: In the formula, Let be the set of points in the ε-neighborhood. For eigenvalues, The distribution function, The neighborhood radius; like Then mark As the core object; The minimum number of points; S3013, cluster expansion and noise separation; Merging density reachable points to form initial clusters Non-density reachable points are marked as noise.

6. The coal mine hydrological dynamic parameter classification method based on clustering algorithm according to claim 5, characterized in that, In step S302, K-means cluster refinement includes: S3021, Initialize centroid; use the cluster center generated by DBSCAN. As the initial centroid of K-means This represents the number of DBSCAN clusters. S3022, iterative optimization; Assignment: Assign each point to the cluster of the nearest centroid, expressed as: In the formula, For iteration The next cluster set assigned to the nearest centroid For the first The mean of the points, For the first The mean of the points, For the number of iterations, for Any one of the points; Updated, the centroid has been recalculated as follows: In the formula, For the first Point iteration The mean of the times, The set of clusters assigned to the nearest centroid; Until the change in centroid is less than the threshold Or it may reach the maximum number of iterations.

7. The coal mine hydrological dynamic parameter classification method based on clustering algorithm according to claim 6, characterized in that, In step S303, dynamic boundary point allocation includes: Attribution determination: Boundary points marked by DBSCAN The distance to each K-means centroid and the density weight are calculated as follows: In the formula, The number of clusters, For clusters The average point density.

8. The coal mine hydrological dynamic parameter classification method based on clustering algorithm according to claim 7, characterized in that, In step S3, when using the hybrid clustering algorithms DBSCAN and K-means to dynamically divide the parameter categories, it is also necessary to automatically adjust the number of clusters based on the silhouette coefficient and optimize the process. Profile coefficients comprehensively evaluate the intra-cluster compactness of samples. and inter-cluster separation The expression is: In the formula, As a sample, The closer the value is to 1, the better the clustering effect. Overall assessment: Take all samples The average value is used as the silhouette coefficient of the model, which is used for cross-sectional comparison of different cluster numbers. The effect; The steps for automatically adjusting the number of clusters include: Step (1) Set the number of clusters The search range; the traversal interval of k is set according to the data size; Step (2) Traverse the number of clusters Values ​​and calculates the profile coefficients, including: (2.1) Clustering model training: The K-Means clustering algorithm is used to fit the data and generate sample labels; (2.2) Calculation of silhouette coefficient: The silhouette_score function is called to calculate the current profile coefficient. The mean of the profile coefficients; (2.3) Store the results, recording each The corresponding profile coefficient value; Step (3) Select the optimal number of clusters This includes: visual analysis, plotting the profile coefficient as... The changing curve helps identify peak points; it aids in judgment, especially when multiple peaks are present. If the scores are close, choose based on business needs; Step (4) Verify clustering quality; In the dynamic classification of parameter categories using the hybrid clustering algorithms DBSCAN and K-means, a time decay factor needs to be introduced to give higher weight to recent data, and the decay factor needs to be optimized, including: (I) Linear decay, expressed as: In the formula, It is a linear decay value. As the attenuation factor, Generates the time difference between the current time and the data. (II) Data preprocessing and weight calculation, including timestamp standardization; calculating the weight of each data point, applying a decay function to each data point, and generating a weight column; (III) Clustering algorithm weight integration; different clustering algorithms require customized integration of weights, such as K-means; Distance calculation modification: Weighted Euclidean distance is: In the formula, For weighted Euclidean distance, For data point weights, For eigenvalues; Center point update: Weighted average: Density clustering (DBSCAN), including density calculation optimization, is expressed as follows: In the formula, This involves summing the weights of all data points.

9. The coal mine hydrological dynamic parameter classification method based on clustering algorithm according to claim 1, characterized in that, In step S4, optimizing cluster centers based on silhouette coefficient and time decay factor includes: optimizing cluster centers based on silhouette coefficient and time decay factor through data weighting, multi-K value clustering, silhouette coefficient evaluation, and dynamic center update.

10. A coal mine hydrological dynamic parameter classification system based on clustering algorithm, characterized in that, The system implements the coal mine hydrological dynamic parameter classification method based on clustering algorithm as described in any one of claims 1-9, and the system includes: The multi-source hydrological data acquisition and preprocessing module is used to acquire multi-source hydrological data in real time and perform wavelet noise reduction. The feature matrix construction module is used to construct a feature matrix through PCA dimensionality reduction and sliding window feature extraction. The hybrid clustering algorithm module is used to dynamically divide parameter categories using the hybrid clustering algorithms DBSCAN and K-means; The cluster center optimization module is used to optimize cluster centers based on the silhouette coefficient and the time decay factor. The visualization and decision output module is used to generate dynamic hydrological zoning maps and mark high-risk areas; it also outputs classification reports to the coal mine safety system to trigger graded early warnings.

Citation Information

Patent Citations

  • Program running method and device and related equipment

    CN117931415A

  • Course learning and reinforcement learning driven dynamic optimal self-consistent clustering method

    CN120372315A