A gas concentration anomaly classification method and system based on a deep learning model
Patent Information
- Application Number
- CN202610922313.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]本发明的目的在于提供一种基于深度学习模型的气体浓度异常分类方法及系统,以解决现有技术难以有效处理煤矿井下气体浓度监测数据中非均匀采样、序列长度不一和异常形态交叠的问题,并解决深度学习模型对气体浓度序列长程依赖关系捕获不足以及模型超参数易陷入局部最优,导致气体浓度曲线分类及异常诊断准确性不足的问题
针对气体浓度数据非均匀采样、长程依赖难以捕捉及模型超参数易陷入局部最优的问题,本发明通过数据预处理步骤对待分类样本序列进行标准化处理,克服了原始序列长度不一、间隔随机的缺陷;通过特征提取步骤同时获得人工特征向量和Transformer编码器输出的深度特征向量,并在特征融合步骤中将两者拼接形成联合特征向量,既保留了局部突变特性的物理可解释性,又捕获了浓度序列的长程依赖关系;通过浓度异常分类步骤中的KAN分类器进行决策,并结合参数优化步骤中融入Sine混沌映射初始化策略和黄金正弦搜索机制的SGKO算法对Transformer编码器和KAN分类器的超参数进行全局优化,有效突破了传统参数调优易陷入局部最优的瓶颈,从而显著提升了气体浓度异常分类的准确性和可靠性。
Smart Images

Figure CN122926104A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of coal mine safety monitoring technology, specifically relating to a gas concentration anomaly classification method and system based on a deep learning model. Background Technology
[0002] As a core pillar of global primary energy consumption, the stable supply of coal profoundly impacts the operation of world industry. Coal mining activities are generally conducted in complex geological environments, and the accuracy and reliability of underground methane concentration monitoring data are directly related to the effectiveness of early warning systems. With the continuous development of machine learning technology, neural networks and optimization algorithms are gradually being introduced into this field to improve the detection accuracy of methane concentration.
[0003] However, the complex downhole environment results in non-uniform sampling characteristics in the data collected by sensors. The original gas concentration sequences vary in length and have random time intervals, making it difficult for existing methods to effectively process such data. Furthermore, existing methods lack the ability to capture long-range dependencies in concentration sequences, failing to accurately identify the characteristic patterns of various anomaly modes such as sensor impact failures and borehole gas outbursts. Simultaneously, the hyperparameter tuning process of deep learning models is prone to getting trapped in local optima, with significant overlap in features between different anomaly types. Traditional thresholding methods struggle to distinguish between different gas concentration types, severely impacting the accuracy and reliability of gas concentration anomaly classification results.
[0004] Therefore, how to standardize gas concentration sequences from non-uniform sampling, effectively capture long-range dependencies in the sequences, avoid hyperparameter tuning from getting trapped in local optima, and classify various types of gas anomaly patterns are technical problems that urgently need to be solved in this field. Summary of the Invention
[0005] The purpose of this invention is to provide a gas concentration anomaly classification method and system based on a deep learning model, in order to solve the problems of non-uniform sampling, inconsistent sequence lengths and overlapping anomaly patterns in underground coal mine gas concentration monitoring data, which are difficult to effectively handle in existing technologies. It also solves the problems of insufficient capture of long-range dependencies of gas concentration sequences by deep learning models and the easy trapping of model hyperparameters in local optima, resulting in insufficient accuracy of gas concentration curve classification and anomaly diagnosis.
[0006] To achieve the above objectives, this invention provides a gas concentration anomaly classification method based on a deep learning model, comprising the following steps: Data preprocessing steps: Obtain the raw data sequence of gas concentration; perform initial screening and sample segmentation on the raw data sequence according to the preset threshold to obtain the sample sequence to be classified; use an interpolation algorithm to map the sample sequence to be classified to the target uniform time grid, so that the sequence length and sampling time interval of the sample sequence to be classified are consistent, and obtain the standardized sequence. Feature extraction steps: Statistical feature extraction is performed on the sequence of samples to be classified to obtain artificial feature vectors; the standardized sequence is input into the Transformer encoder to obtain deep feature vectors; Feature fusion step: Concatenate the artificial feature vector with the deep feature vector to form a joint feature vector; Concentration anomaly classification steps: Input the joint feature vector into the KAN classifier, and output the gas concentration curve category label and the corresponding monitoring status result; Parameter optimization steps: Using the classification performance index of the gas concentration curve category label as the fitness value, the hyperparameters of the Transformer encoder and KAN classifier are optimized by the SGKO algorithm. The SGKO algorithm is obtained by incorporating the Sine chaotic mapping initialization strategy and the golden sine search mechanism into the K-means optimization algorithm.
[0007] By employing the aforementioned technical solution, this invention performs threshold screening, sample segmentation, and interpolation standardization on the raw data sequences collected by gas concentration monitoring equipment through a data preprocessing step. This maps the raw sequences, which exhibit non-uniform sampling timestamps, inconsistent sequence lengths, and random sampling time intervals, to a target uniform time grid, resulting in standardized sequences with consistent lengths and sampling time intervals. This provides input data with a unified structure and consistent time scale for subsequent deep learning models. Based on this, the feature extraction step simultaneously acquires manually calculated statistical features and deep feature vectors output by the Transformer encoder. The feature fusion step concatenates these two features to form a joint feature vector, preserving the physical interpretability of local abrupt changes such as peak values and differential variations, while also capturing the long-range dependencies of the gas concentration sequences. The concentration anomaly classification step utilizes a KAN classifier to output gas concentration curve category labels and corresponding monitoring status results. When the classification label indicates an anomaly category, further anomaly diagnostic results or alarm information can be generated. The parameter optimization step uses the SGKO algorithm to globally optimize the hyperparameters of the Transformer encoder and KAN classifier, enhancing the initial diversity and local escape capability of the hyperparameter search, reducing the risk of the model tuning getting stuck in local optima, and thus improving the accuracy and reliability of gas concentration curve classification and abnormal alarm diagnosis.
[0008] Furthermore, the parameter optimization step includes the following steps: Population initialization steps: The SGKO algorithm's search agent population is initialized using Sine chaotic mapping. Each search agent corresponds to a set of candidate hyperparameters to generate the initial population. Fitness evaluation steps: Substitute each group of candidate hyperparameters into the Transformer-KAN model for training or validation, calculate the corresponding fitness value, and determine the current best solution and the current worst solution based on the fitness value; the fitness value is determined by classification accuracy, F1 score, or a weighted combination of the two; Location density probability generation steps: Generate normalized distance based on the Euclidean distance between the search agent and the current best solution and the Euclidean distance between the current best solution and the current worst solution. Then combine the normalized distance with the sinusoidal modulation factor to generate the location density probability. Decision-making steps: Set a preset threshold. If the location density probability is greater than the preset threshold, use the development strategy to update the location of the search agent; otherwise, execute the global exploration strategy. Development strategy steps: The development strategy includes a centroid space interaction mechanism, a multi-centroid fusion mechanism, and an optimal region focusing mechanism; among them, the centroid space interaction mechanism dynamically adjusts the search step size through time-varying drift control parameters and combines random weights to achieve search direction diversity; the multi-centroid fusion mechanism balances the contribution of each centroid vector by adjusting coefficients; the optimal region focusing mechanism explores the direction of difference between the weighted average centroid and the historical best solution. The search agent's position update steps are as follows: The position of the search agent is updated using a golden sine search mechanism to escape local optima; The optimal hyperparameter output steps are: repeating the location density probability generation step, decision step, development strategy step, and search agent location update step until the iteration termination condition is met, and outputting the optimal hyperparameter combination.
[0009] By employing the aforementioned technical solutions, this invention initializes the population through Sine chaotic mapping in the parameter optimization step, leveraging the randomness and ergodicity of chaotic motion to enhance the diversity of the initial population and avoid the problem of traditional random initialization easily getting trapped in local optima. The position density probability generation step combines normalized distance and sinusoidal modulation factor to dynamically determine the search phase. The decision-making step adaptively selects either development or exploration strategies based on preset thresholds, achieving a balance between global exploration and local development. The centroid space interaction mechanism, multi-centroid fusion mechanism, and optimal region focusing mechanism in the development strategy step guide the search agent to converge towards the optimal region from multiple angles through time-varying drift control parameters, adjustment coefficients, and weighted average centroids. Finally, the golden sine search mechanism updates the search agent's position, adaptively adjusting the step size using the fluctuation characteristics of the sine function and the golden ratio, effectively escaping local optima and outputting the optimal hyperparameter combination, significantly improving the performance of the Transformer encoder and KAN classifier in the gas concentration anomaly pattern classification task.
[0010] Furthermore, the expression for the Sine chaotic map is as follows:
[0011] in, This is the value of the nth chaotic sequence; This is the value of the (n+1)th chaotic sequence; The expression for the golden sine search is as follows:
[0012] in, Represents the golden ratio; ; Represents a random number within the range (0,1); ; The value represents the probability threshold; z represents the current iteration number. This represents the position vector of the i-th individual at the z-th iteration; This represents the position vector of the i-th individual at the (z+1)-th iteration. This represents the globally optimal solution.
[0013] By employing the aforementioned technical solution, this invention generates a chaotic sequence through a specific expression of the Sine chaotic mapping. Its nonlinearity, ergodicity, and randomness are used to initialize the search agent population for the SGKO algorithm, overcoming the sensitivity of the K-means optimization algorithm to the initial population and providing a high-quality initial solution distribution for subsequent iterations. Simultaneously, the expression for the golden sine search combines the periodic fluctuations of the sine function with the adaptive scaling of the golden ratio. By dynamically adjusting the step size and direction of individual position updates using random numbers r1 and r2 and golden coefficients y1 and y2, the search agent can effectively escape local optima even in the later stages of iteration, accelerating convergence and improving solution accuracy. This results in a better global solution when optimizing the hyperparameters of the Transformer encoder and the KAN classifier.
[0014] Furthermore, in the data preprocessing step, an interpolation algorithm is used to standardize the sequences of samples to be classified; the interpolation algorithm used is piecewise cubic spline interpolation, and the formula is as follows:
[0015] in, Let i be the i-th time point on the target uniform time grid. and The p-th and p+1-th timestamps in the original data sequence form an interpolation sub-interval; To achieve uniform time grid points at the target The gas concentration value obtained by up-interpolation; j is the index; The coefficient of the j-th term of the cubic polynomial over the p-th subinterval is determined by the boundary continuity condition.
[0016] By employing the aforementioned technical solution, this invention uses a piecewise cubic spline interpolation algorithm in the data preprocessing step to standardize the sequence of samples to be classified. A cubic polynomial is used to fit the concentration curve over each sub-interval, and boundary continuity conditions are utilized to ensure the overall smoothness of the interpolation curve. Compared to linear interpolation, this method avoids step distortion; compared to quadratic interpolation, it suppresses over-smoothing. Thus, while preserving key morphological features of the original concentration sequence, such as the instantaneous spikes of impact faults and the gradual upward trend of gas outbursts, it effectively eliminates sequence length fluctuations and non-uniform time intervals caused by differences in sensor sampling rates. This provides a standardized sequence with uniform length, regular distribution, and morphological fidelity for the subsequent Transformer encoder, significantly improving the deep learning model's ability to capture abnormal gas concentration patterns.
[0017] Furthermore, in the feature extraction step, the extracted statistical features include the maximum value, mean, standard deviation, and kurtosis of the sample sequence to be classified, as well as the first-order difference mean, first-order difference standard deviation, and first-order difference kurtosis extracted from the first-order difference sequence of the sample sequence to be classified. The statistical features constitute a 7-dimensional artificial feature vector.
[0018] By employing the aforementioned technical solution, this invention, in its feature extraction step, not only extracts the overall distribution characteristics of the sample sequence to be classified, such as the maximum value, mean, standard deviation, and kurtosis, but also effectively characterizes the kurtosis of the data distribution and drastic local changes such as jumps and abrupt changes in the sequence by performing first-order differencing on the sequence and extracting the first-order differencing mean, standard deviation, and kurtosis. These artificially statistical features focus on the physical interpretability of local abrupt changes, complementing the subsequent deep feature vectors, enhancing the model's ability to distinguish different anomaly patterns, and solving the problem of existing methods struggling to accurately classify due to significant feature overlap.
[0019] Furthermore, in the feature extraction step, the Transformer encoder includes an input embedding layer, a position encoding layer, an encoder layer, and a feature compression layer. The long-range dependencies of the normalized sequence are captured through the multi-head attention mechanism in the encoder layer, and a 7-dimensional deep feature vector is output through the feature compression layer.
[0020] By employing the aforementioned technical solution, the Transformer encoder in this invention converts the standardized sequence into a temporal vector with positional information through an input embedding layer and a positional encoding layer. Then, a multi-head attention mechanism in the encoder layer calculates the correlation weights between different positions in the sequence in parallel, effectively capturing the long-range dependencies of the gas concentration sequence. Compared to recurrent neural networks, the Transformer abandons the recursive structure, enabling it to process information from all positions in the sequence simultaneously, avoiding gradient vanishing or exploding problems. It is particularly suitable for mining the long-term evolution patterns of methane concentration in mines caused by ventilation disturbances, geological activities, etc., outputting a deep feature vector with periodic evolution characteristics, providing a powerful deep feature representation for anomaly classification.
[0021] Furthermore, the position coding layer uses a frequency combination of sine and cosine functions to generate position codes. The calculation formula for the position codes is as follows:
[0022]
[0023] in, This represents a positional encoding function, used to generate a dimension-1 for each position in the sequence. The encoded vector; This represents the total dimension of the position encoding vector; Indicates the first position in the sequence Index of each position; Indicates a dimension index; The multi-head self-attention mechanism captures the correlations at different positions in the normalized sequence by computing multiple attention heads in parallel. Each attention head learns a different representation subspace, and the outputs of all attention heads are aggregated through a linear transformation. The computation process is as follows:
[0024]
[0025] in, , and These represent the query matrix, key matrix, and value matrix, respectively. Indicates the dimension of the key vector; to express One point of attention; This represents the concatenation function for the attention head output; The parameter matrix represents the final linear transformation of the multi-head attention mechanism; The encoder layer also includes a feedforward neural network, which employs residual connections and layer normalization to stabilize the training process.
[0026] By employing the aforementioned technical solutions, the position encoding layer of this invention utilizes different frequency combinations of sine and cosine functions to generate a unique position code for each position in the standardized sequence, enabling the Transformer model to perceive the temporal order of gas concentration data. The multi-head self-attention mechanism computes in parallel through multiple attention heads, each learning a different representation subspace. This captures the dependencies between different positions in the sequence from multiple perspectives. A linear transformation aggregates the outputs of all heads, greatly enhancing the expressive power for complex temporal patterns. The feedforward neural network in the encoder layer performs a nonlinear transformation on the attention output. Combined with residual connections and layer normalization, this stabilizes the training process of the deep network, avoiding gradient vanishing or exploding, thereby ensuring that the Transformer encoder can efficiently and stably output high-quality deep feature vectors.
[0027] Furthermore, in the concentration anomaly classification step, the artificial feature vector is 7-dimensional, the deep feature vector is 7-dimensional, and the joint feature vector is 14-dimensional. The KAN classifier maps the 14-dimensional joint feature vector to a category probability vector, and normalizes it using the softmax function to obtain the probability of each gas concentration curve category. The gas concentration curve category with the highest probability is used as the classification label. The gas concentration curve categories include normal curve, sensor impact failure, non-standard calibration, roof collapse, local ventilation stoppage, reverse ventilation drill, and borehole gas outburst. When the classification label is normal curve, the normal monitoring status result is output; when the classification label is an anomaly category, the anomaly diagnosis result or alarm information corresponding to the anomaly category is output.
[0028] By employing the aforementioned technical solution, this invention, in the concentration anomaly classification step, concatenates 7-dimensional manual statistical features with 7-dimensional Transformer deep features into a 14-dimensional joint feature vector, achieving complementary enhancement of local catastrophe physical information and global temporal evolution information. The KAN classifier makes decisions based on this joint feature and outputs the probability distribution of 7 typical mine gas concentration curves through the softmax function. This invention can not only distinguish between normal and abnormal conditions but also further subdivide anomalies into 6 categories with clear physical causes, such as sensor impact failure, roof collapse, and borehole gas outbursts. Based on this, it outputs differentiated diagnostic results or alarm information, overcoming the shortcomings of traditional methods that can only perform binary anomaly detection and cannot identify specific anomaly types. This provides a more targeted decision-making basis for mine ventilation scheduling and disaster emergency response.
[0029] Furthermore, in the concentration anomaly classification step, the KAN classifier is constructed based on the Kolmogorov-Arnold theorem, and the activation function on its network connection edge is a learnable univariate function. The learnable univariate function is formed by a weighted combination of basis functions and B-spline functions. At least one of the network layer number, spline grid number, and spline order of the KAN classifier is optimized and determined by the SGKO algorithm.
[0030] By employing the aforementioned technical solution, the KAN classifier in this invention places learnable activation functions on the network connection edges. Through a weighted combination of basis functions and B-spline functions, it achieves adaptive approximation of complex nonlinear mappings. Compared to the fixed activation functions in traditional MLP classifiers, KAN has higher parameter efficiency and stronger nonlinear expression capabilities. It can construct highly flexible decision boundaries in a 14-dimensional joint feature space, distinguishing subtle morphological differences between different anomaly patterns. At the same time, key structural parameters of the KAN classifier, such as the number of network layers, the number of spline grids, and the spline order, are globally optimized and determined by the SGKO algorithm, avoiding performance loss caused by manual experience settings. This allows the classifier to maintain optimal discrimination ability under different mine working conditions, thereby significantly improving the classification accuracy and generalization performance of multiple types of gas concentration anomaly patterns.
[0031] A gas concentration anomaly classification system based on a deep learning model includes a data acquisition module, a preprocessing module, a feature extraction module, a feature fusion module, a classification output module, and a parameter optimization module. The data acquisition module is used to acquire the raw data sequence collected by the gas concentration monitoring equipment; The preprocessing module is used to perform threshold screening, sample segmentation, and interpolation standardization on the original data sequence to obtain a standardized sequence; The feature extraction module is used to extract artificial feature vectors and deep feature vectors; The feature fusion module is used to concatenate artificial feature vectors and deep feature vectors into a joint feature vector; The classification output module is used to output the category label of the gas concentration curve and the corresponding monitoring status result based on the joint feature vector; The parameter optimization module is used to optimize the hyperparameters of the Transformer encoder and KAN classifier using the SGKO algorithm; The system is used to implement any of the above-mentioned gas concentration anomaly classification methods based on deep learning models.
[0032] By adopting the above technical solutions, the gas concentration anomaly classification system provided by this invention accesses the real-time data stream from downhole sensors through the data acquisition module. The preprocessing module completes threshold screening, sample segmentation, and interpolation standardization, eliminating data quality problems caused by non-uniform sampling and inconsistent sequence lengths. The feature extraction module outputs manual statistical features and Transformer deep features in parallel, and the feature fusion module concatenates the two into a joint feature vector, enabling local mutation physical information and global temporal evolution information to work synergistically in classification decisions. The classification output module not only outputs the category label of the gas concentration curve, but also simultaneously provides the monitoring status result or alarm information corresponding to the anomaly category, realizing full automation from data acquisition to diagnostic output. The parameter optimization module uses the SGKO algorithm to globally optimize the hyperparameters of the Transformer encoder and KAN classifier, ensuring that the system maintains optimal performance under different mine operating conditions.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows: To address the challenges of non-uniform sampling of gas concentration data, difficulty in capturing long-range dependencies, and the tendency of model hyperparameters to get trapped in local optima, this invention standardizes the sample sequences to be classified through a data preprocessing step, overcoming the shortcomings of inconsistent original sequence lengths and random intervals. A feature extraction step simultaneously obtains artificial feature vectors and deep feature vectors output by the Transformer encoder, and the two are concatenated into a joint feature vector in the feature fusion step. This preserves the physical interpretability of local mutation characteristics while capturing the long-range dependencies of the concentration sequences. The KAN classifier in the concentration anomaly classification step makes decisions, and the SGKO algorithm, which incorporates a Sine chaotic mapping initialization strategy and a golden sine search mechanism in the parameter optimization step, globally optimizes the hyperparameters of the Transformer encoder and the KAN classifier. This effectively overcomes the bottleneck of traditional parameter tuning easily getting trapped in local optima, thus significantly improving the accuracy and reliability of gas concentration anomaly classification.
[0034] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0035] Figure 1 This is a flowchart of a gas concentration anomaly classification method based on a deep learning model provided in an embodiment of the present invention; Figure 2 This is a flowchart of the hyperparameter optimization steps provided in the embodiments of the present invention; Figure 3 This is a partial CH4 concentration line graph provided in an embodiment of the present invention; Figure 4 These are example diagrams and interpolated diagrams of example samples provided in embodiments of the present invention; Figure 5 This is a line chart of example sample feature indicators provided in an embodiment of the present invention; Figure 6 This is a line graph showing the various algorithms provided in the embodiments of the present invention running on CEC 2022; Figure 7 This is an iterative convergence graph of the hyperparameters of the optimized Transformer-KAN model provided in this embodiment of the invention; Figure 8 This is a radar chart showing the performance indicators of different classification models provided in the embodiments of the present invention; Figure 9 This is a classification error distribution diagram of SGKO-Transformer-KAN provided in an embodiment of the present invention. Detailed Implementation
[0036] To further illustrate the technical means and effects adopted by the present invention to achieve the intended purpose, the following detailed description of the solution according to the present invention is provided in conjunction with the accompanying drawings and specific embodiments.
[0037] The foregoing and other technical contents, features, and effects of the present invention will be clearly presented in the following detailed description of specific embodiments in conjunction with the accompanying drawings. Through the description of the specific embodiments, a more in-depth and concrete understanding can be gained of the technical means and effects adopted by the present invention to achieve its intended purpose. However, the accompanying drawings are for reference and illustration only and are not intended to limit the technical solutions of the present invention.
[0038] Example 1 like Figure 1 The diagram shows the flowchart of the gas concentration anomaly classification method based on a deep learning model according to this application. It mainly includes data preprocessing, feature extraction, feature fusion, concentration anomaly classification, parameter optimization, and model performance evaluation. It should be noted that this invention uses methane concentration anomaly detection in coal mines as an example, but those skilled in the art should understand that the technical solution provided by this invention is also applicable to the concentration anomaly detection of other gases, such as carbon monoxide, carbon dioxide, hydrogen sulfide, oxygen, and sulfur dioxide. As long as the gas concentration monitoring data has non-uniform sampling characteristics and multiple anomaly patterns, the technical solution of this invention can be used for anomaly diagnosis.
[0039] I. Data Preprocessing Steps: The process involves acquiring raw gas concentration data sequences from downhole monitoring equipment, including sampling timestamps and corresponding gas concentration values. The raw data sequences are then pre-screened and segmented according to preset thresholds. Sequences not exceeding the preset threshold are designated as normal candidate sequences, while sequences exceeding the preset threshold are designated as abnormal candidate sequences. These normal and abnormal candidate sequences together constitute the sample sequences to be classified. An interpolation algorithm is then used to map the sample sequences to be classified onto a target uniform time grid, ensuring that the sequence length and sampling time interval of the sample sequences are consistent, thus obtaining standardized sequences. Specifically, the preset threshold Calculated from labeled normal curves in historical normal reference sample sets or training sets, this threshold is used for rapid initial screening of the currently collected raw data sequences. The threshold calculation formula is as follows:
[0040] In the formula, Indicates the first in the historical normal reference sample set The first CH4 concentration curve Each concentration value, This represents the number of normal curves in the historical normal reference sample set. The current maximum value of the methane concentration curve. If the condition is met, the curve is classified as an abnormal candidate sequence; otherwise, the curve is classified as a normal candidate sequence.
[0041] Since methane concentration monitoring data usually exhibits significant non-uniform temporal distribution characteristics, the sample sequences to be classified as determined above still exhibit characteristics of varying lengths and random time intervals, making them difficult to directly use as input for deep learning models. To address this issue, this application employs an interpolation algorithm to standardize the sample sequences to be classified, effectively maintaining curve smoothness while approximating the true concentration change trend.
[0042] As one specific implementation, the interpolation algorithm of this application adopts a piecewise cubic spline interpolation algorithm, which can effectively overcome the step distortion of linear interpolation and the oversmoothing defects of quadratic interpolation, and provide input data with uniform length and regular distribution for subsequent deep learning models.
[0043] Specifically, for any sequence of samples to be classified, the interpolation on the target uniform time grid... for:
[0044] in, Let i be the i-th time point on the target uniform time grid. and The p-th and p+1-th timestamps in the original data sequence form an interpolation sub-interval; To achieve uniform time grid points at the target The gas concentration value obtained by up-interpolation; j is the index; Let be the coefficient of the j-th term of the cubic polynomial over the p-th subinterval.
[0045] Those skilled in the art should understand that piecewise cubic spline interpolation, linear interpolation, and Lagrange polynomial interpolation are all specific implementations of interpolation processing. Furthermore, sequence normalization methods based on neural networks, such as autoencoders, can also be used to achieve the same function. Any sequence length normalization processing can be applied to this invention and falls within the scope of protection of this invention, as long as it can convert the non-uniformly sampled original sequence into a standardized sequence with uniform length and time intervals.
[0046] II. Feature Extraction Steps: Perform statistical feature extraction on the sequence of samples to be classified to obtain artificial feature vectors; input the standardized sequence obtained in the previous step into the Transformer encoder to obtain deep feature vectors; Specifically, Artificial feature vector acquisition: Statistical features are extracted from the sequences of samples to be classified. The extracted statistical features include the maximum value of the sequences. mean Standard deviation kurtosis To further characterize the sharpness of the data distribution and detect drastic changes such as jumps and abrupt changes in the sequence of samples to be classified, this application also performs first-order differencing on the sequence of samples to be classified and extracts the mean of the first-order differencing. First-order difference standard deviation and first-order difference kurtosis The three indicators and their corresponding formulas are as follows:
[0047] In the formula, Indicates the first element in the sequence of samples to be classified. Individual gas concentration values; Indicates the length of the sample sequence to be classified; The standard deviation of the sample sequence to be classified; It is the first-order difference mean; The first difference standard deviation; The above calculations yield 7-dimensional statistical features as 7-dimensional artificial feature vectors, focusing on the physical interpretability of local mutation characteristics.
[0048] Deep feature vector acquisition: The deep feature vectors in this application are obtained through a Transformer encoder, which consists of an input embedding layer, a position encoding layer, an encoder layer and a feature compression layer connected in series. It can effectively capture long-range dependencies in normalized sequences (hereinafter referred to as sequences).
[0049] Specifically, for the methane concentration sequence, the feature matrix is flattened into a time-series vector and positional information is injected. The positional encoding uses different frequency combinations of sine and cosine functions to provide the model with relative or absolute positional information for each position in the sequence. The calculation formula can be simplified as follows:
[0050]
[0051] In the formula, This represents a positional encoding function, used to generate a dimension-1 for each position in the sequence. The encoded vector; This represents the total dimension of the position encoding vector; Indicates the first position in the sequence Index of each position; This indicates a dimension index.
[0052] The multi-head self-attention (MSA) mechanism in the encoder layer is a core component of the Transformer. It captures the correlations between different positions in the sequence by computing multiple attention heads in parallel, thereby mining the long-range dependency of methane concentration evolution. Each attention head learns a different representation subspace, and finally, the outputs of all heads are aggregated through a linear transformation. Its computational process can be represented as follows:
[0053]
[0054] in, , and These represent the query matrix, key matrix, and value matrix, respectively. Indicates the dimension of the key vector; to express One point of attention; This represents the concatenation function for the attention head output; The parameter matrix represents the final linear transformation of the multi-head attention mechanism; Finally, the high-dimensional output is reduced to a 7-dimensional deep feature vector through the feature compression layer, preserving the periodic evolution pattern.
[0055] The encoder layer of this application also includes a feedforward neural network for nonlinear transformation of the attention output, and stabilizes the training process through residual connections and layer normalization. This design enables the Transformer to effectively handle complex temporal patterns in sequences and provide powerful feature representations for subsequent anomaly detection.
[0056] III. Feature Fusion Steps: The artificial feature vector and the deep feature vector are concatenated to form a joint feature vector; The 7-dimensional artificial feature vector and the 7-dimensional deep feature vector obtained in the above steps are concatenated in the feature fusion layer to form a 14-dimensional joint feature vector, forming a complementary and enhanced feature representation.
[0057] IV. Concentration Anomaly Classification Steps: Input the joint feature vector into the KAN classifier, and output the gas concentration curve category label and the corresponding monitoring status result; The 14-dimensional joint feature vector obtained in the above steps is input into the KAN classifier for decision-making, and the gas concentration curve category probability is generated through a softmax layer. Specifically, the output of the KAN classifier is normalized by the softmax function to obtain the probability distribution of each gas concentration curve category, and the category with the highest probability is taken as the category label of the gas concentration curve; when the category label is a normal curve, the normal monitoring status result is output; when the category label is an abnormal category, the abnormal diagnosis result or alarm information corresponding to the abnormal category is output.
[0058] In this embodiment, the KAN classifier has a three-layer structure: the input layer receives a 14-dimensional joint feature vector; the hidden layer maps the 14-dimensional features to 32 dimensions; and the output layer maps the 32-dimensional features to 7 dimensions, corresponding to 7 gas concentration curve categories. Each layer uses a learnable univariate function instead of a traditional fixed activation function.
[0059] It should be noted that the seven gas concentration curve categories in this embodiment specifically include: normal curve, sensor impact failure, non-standard calibration, roof collapse, local ventilation stoppage, reverse ventilation drill, and borehole gas outburst, corresponding to dimensions 0 to 6 of the output vector, respectively. Those skilled in the art will understand that the above categories are based on typical abnormal patterns in underground methane concentration monitoring scenarios in coal mines. In other application scenarios or for different gas types, the number and specific definitions of abnormal categories can be adjusted according to actual monitoring needs.
[0060] Specifically, for the input vector In this invention, it is a 14-dimensional joint feature vector, wherein Output function It can be represented as:
[0061] In the formula, and All are learnable univariate functions; Let p represent the input vector, from 1 to n.
[0062] For the KAN classifier, the first Layer Output value of each neuron The expression is as follows:
[0063] In the formula, Indicates the first Number of neurons in a layer; Indicates the first Layer The output value of each neuron; The learnable activation function typically consists of basis functions and spline functions:
[0064] In the formula, It is a learnable activation function; These are basis functions; in this embodiment, linear functions can be used. ; It is the i-th B-spline basis function; This represents the number of B-spline basis functions, i.e., the number of grid cells. and These are the learnable coefficients, which are optimized synchronously with other network parameters through the backpropagation algorithm.
[0065] In this embodiment, at least one of the following parameters of the KAN classifier—the number of network layers, the number of spline grids, and the spline order—can be used as hyperparameters to be optimized. These parameters are determined by the SGKO algorithm in conjunction with the relevant hyperparameters of the Transformer encoder. Through this setup, the KAN classifier can construct a nonlinear decision boundary in the joint feature space and, by combining the temporal depth features extracted by the Transformer encoder with manually calculated statistical features, distinguish between normal curves and different abnormal curve categories, thereby improving the accuracy of gas concentration curve classification and anomaly diagnosis output.
[0066] V. Parameter Optimization Steps: Using the classification performance index of the gas concentration curve category label as the fitness value, the hyperparameters of the Transformer encoder and KAN classifier are optimized using the Sine-Golden K-means Optimization (SGKO) algorithm. The SGKO algorithm is based on the K-means Optimization algorithm (KO) and incorporates a Sine chaotic mapping initialization strategy and a golden sine search mechanism. Specifically, the KO algorithm uses K-means clustering to cluster the search agent and guides the position update of the search agent based on the cluster centroid, thus providing a basic framework for subsequent improvements.
[0067] The SGKO algorithm in this embodiment initializes the population through Sine chaotic mapping to enhance the exploration of diversity in the parameter space, and adaptively adjusts the step size by combining the golden sine search mechanism to avoid the local optimum trap caused by the traditional KO algorithm.
[0068] like Figure 2 The flowchart shown is a hyperparameter optimization process of this application, which mainly includes: population initialization step, location density probability generation step, decision step, development strategy step, search agent location update step, and optimal hyperparameter output step.
[0069] Specifically, (1) Population initialization steps: The Sine chaotic mapping is used to initialize the search agent population of the SGKO algorithm. Each search agent corresponds to a set of candidate hyperparameters to generate the initial population; The expression for the Sine chaotic map is as follows:
[0070] In the formula, For the first A chaotic sequence value, Population size. Value of each chaotic sequence. Each search agent corresponds to a search agent (i.e., a set of candidate hyperparameters), and all search agents constitute the initial population.
[0071] After initializing the population, the algorithm dynamically adjusts the population size using a linear reduction strategy. In each iteration, K-means clustering is used to divide high-quality solutions into three clusters, and the centroid vectors in each dimension are calculated. and mean centroid Among them, the centroid vector Using the standard definition of K-means clustering, which is the arithmetic mean of all data points within the cluster, the formula for calculating the mean centroid is as follows:
[0072] In the formula, Indicates the number of iterations; It is the first The centroid vector of each cluster.
[0073] (2) Fitness evaluation steps: Substitute each group of candidate hyperparameters into the Transformer-KAN model for training or validation, calculate the corresponding fitness value, and determine the current best solution and the current worst solution based on the fitness value; the fitness value is determined by classification accuracy, F1 score or a weighted combination of the two. (3) Location density probability generation step: Generate normalized distance based on the Euclidean distance between the search agent and the current best solution and the Euclidean distance between the current best solution and the current worst solution, and then combine the normalized distance with the sinusoidal modulation factor to generate location density probability; Specifically, the normalized distance of the search agent The calculation formula is:
[0074] In the formula, Represents a search agent; This represents the optimal solution; Represents the worst solution; i represents the index of the search agent; t represents the current iteration number; Location density probability The calculation formula is:
[0075] In the formula Indicates the maximum number of iterations; (4) Decision-making steps: Set a preset threshold. If the location density probability is greater than the preset threshold, use the development strategy to update the location of the search agent; otherwise, continue to execute the global exploration strategy. Specifically, the preset threshold is set to 0.5, when If the development strategy is executed, then the global exploration strategy will continue.
[0076] (5) Development strategy steps: The development strategy includes centroid space interaction mechanism, multi-centroid fusion mechanism and optimal region focusing mechanism; among them, the centroid space interaction mechanism dynamically adjusts the search step size by time-varying drift control parameters and combines random weights to achieve search direction diversity; the multi-centroid fusion mechanism balances the contribution of each centroid vector by adjusting coefficients; the optimal region focusing mechanism explores the difference direction between the weighted average centroid and the historical best solution. Specifically, the expression for the centroid space interaction mechanism is as follows:
[0077] In the formula, the average centroid is used. High-precision mining is achieved by identifying the differences between the solution and the historical best solution. , and These are random weighting coefficients.
[0078] (6) Search agent position update steps: The position of the search agent is updated through the golden sine search mechanism to escape the local optimum; The golden sine search mechanism uses a sine function for iterative optimization, approximating the optimal solution by gradually narrowing the search space. The expression for the golden sine search is as follows:
[0079] In the formula, Represents the golden ratio; ; Represents a random number within the range (0,1); ; Indicates the probability threshold; Representing the The individual in the first The position vector at the next iteration; Representing the The individual in the first The position vector at the next iteration; This represents the position vector of the current global optimal solution.
[0080] (7) Optimal hyperparameter output steps: repeat the location density probability generation step, decision step, development strategy step and search agent location update step until the iteration termination condition is met, and output the optimal hyperparameter combination; in this embodiment, the iteration termination condition refers to reaching the maximum number of iterations.
[0081] VI. Model Performance Evaluation Steps To comprehensively evaluate the model's performance, this application uses four core metrics: accuracy, precision, recall, and F1 score. The calculation formulas for each metric are shown below:
[0082] In the formula, This indicates the number of correctly predicted samples and the total number of samples; This indicates that it was correctly predicted as a category. Quantity; Indicates the category of incorrectly predicted bits. Quantity; Representing reality as a category However, the number of cases incorrectly predicted as other categories; F1 is the harmonic mean of Precision and Recall; c is the total number of gas concentration anomaly categories.
[0083] Example 2 A gas concentration anomaly classification system based on a deep learning model includes a data acquisition module, a preprocessing module, a feature extraction module, a feature fusion module, a classification output module, and a parameter optimization module. The data acquisition module is used to acquire the raw data sequence collected by the gas concentration monitoring equipment; The preprocessing module is used to perform threshold screening, sample segmentation, and interpolation standardization on the original data sequence to obtain a standardized sequence; The feature extraction module is used to extract artificial feature vectors and deep feature vectors; The feature fusion module is used to concatenate artificial feature vectors and deep feature vectors into a joint feature vector; The classification output module is used to output the category label of the gas concentration curve and the corresponding monitoring status result based on the joint feature vector; The parameter optimization module is used to optimize the hyperparameters of the Transformer encoder and KAN classifier using the SGKO algorithm; The system is used to implement a gas concentration anomaly classification method based on a deep learning model, as shown in Example 1, which will not be described in detail here.
[0084] Verification Experiment I. Original Sample Analysis and Sample Classification This experiment utilized the underground safety monitoring system of 12 coal mines in a mining area of Shaanxi Province to collect nearly three years of CH4 concentration time-series data. CH4 concentration is easily affected by environmental disturbances such as ventilation disturbances and mechanical vibrations, exhibiting non-uniform sampling characteristics, resulting in highly heterogeneous concentration curve shapes. For example... Figure 3 As shown, methane concentration fluctuates relatively smoothly under normal operating conditions, concentrating within the low-risk range, while under abnormal operating conditions, it deviates significantly from the baseline. Based on extreme value statistical analysis of normal samples, it was found that the peak methane concentration was generally below 0.6%. According to the measured gas emission rate, gas emission form, actual gas dynamic phenomena, and measured outburst hazard parameters, the coal mines in this area are determined to be low-gas mines, with a set gas over-limit alarm threshold of 0.5-0.8%. This study uses extreme value statistical methods to set the threshold. The value was 0.6%, serving as the primary dividing line between normal and abnormal curves, laying the foundation for hierarchical diagnosis.
[0085] To achieve the learnable classification task of gas concentration curves, this embodiment assigns labels to different gas concentration curve categories. According to Table 1, One-Hot coding is used to label samples of different categories. Each type of curve corresponds to a downhole monitoring status or anomaly trigger. Specifically, a normal curve corresponds to a stable monitoring status; sensor impact failure corresponds to instantaneous pulses or baseline drift caused by equipment failure; non-standard calibration corresponds to local abnormal fluctuations caused by sensor calibration; roof collapse and borehole gas outburst respectively characterize concentration mutations and continuous fluctuations caused by geological disturbances or gas release processes; local ventilation shutdowns and reversal drills correspond to gradually rising, step-like, or low-frequency oscillation curves caused by changes in ventilation status. These label settings provide supervisory signals with monitoring meaning and physical interpretability for model training.
[0086] Table 1. Methane Anomaly Curve Type Label Settings Tab.1Label Settings for Types of Methane Anomaly Curves Curve type Normal curve Sensor impact failure Non-standard calibration Roof collapse Partial ventilation shutdown Anti-wind drill Gas erupted from the borehole Curve Label 0 1 2 3 4 5 6 II. Reconstruction based on sample features like Figure 4 As shown, the piecewise cubic spline interpolation algorithm can effectively eliminate sequence length fluctuations caused by differences in sensor sampling rates, generating standardized input data. The interpolation curve, while preserving key features of the original morphology (such as the instantaneous spikes of impact-type faults and the gradual upward trend of gas outbursts), significantly improves the local distortion problem caused by uneven sampling intervals. Comparison before and after interpolation shows that this algorithm has superior morphology preservation capabilities for smoothing oscillating anomalies: it avoids the step-like artifacts of linear interpolation and suppresses the over-smoothing effect of quadratic interpolation.
[0087] like Figure 5 As shown in Table 2, after unifying the sequence length, further sample features were extracted to distinguish the essential characteristics of various types of samples. The sensor-type impact fault, at its peak value (… =14.24) and overall concentration level ( =9.84) is significantly higher than other types, indicating a risk of continuous high concentration accumulation; although the sensor calibration is abnormal in the peak value ( =4.0), but its mean ( =0.41) is close to the normal level (0.29), reflecting abnormal characteristics of local equipment. Among the local abrupt change indicators, the differential kurtosis of borehole gas emission ( =69.49) is extremely high, revealing the continuous fluctuation characteristics of the outflow process; while the various indicators of the reverse wind exercise and local wind stoppage (such as The values <0.01 are all close to normal values, which is consistent with the pattern of low-risk, slow-changing disturbances.
[0088] Table 2 Example Sample Features Tab.2Feature Descriptions of Example Samples
[0089] The study also constructed a dataset containing seven types of samples (Table 2). The specific distribution of the dataset is shown in the table. Among them, the abnormal samples accounted for 82.44% (634 cases), covering six typical downhole gas concentration anomaly patterns such as impact failure and local ventilation stoppage, providing a balanced and physically meaningful data foundation for subsequent model training.
[0090] Table 3 shows the number of samples of different types in the dataset.
[0091] Table 3. Number of samples of different types in the dataset Tab.3Sample Counts of Different Categories in the Dataset normal Sensor impact failure Non-standard calibration Roof collapse Partial ventilation shutdown Anti-wind drill Gas erupted from the borehole quantity 135 112 78 94 89 146 115 III. Classification Results Analysis Based on the SGKO-Transformer-KAN Model (1) Comparison of algorithm performance based on IEEE CEC 2022 To verify the effectiveness of the enhancement strategy and evaluate the global optimization capability of the SGKO algorithm, this experiment introduced the KO, WOA (Whale Optimization Algorithm), SSA (Salp Swarm Algorithm), and DBO (Dung Beetle Optimizer) algorithms, and tested them using the IEEE CEC 2022 standard test set. To ensure the fairness of the simulation experiment, all algorithms were run on the same test platform with the same experimental parameters. The processor used was a 12th generation Intel(R) Core(TM) i5-12600KF (3.70 GHz), and all experiments were implemented using MATLAB 2024a. The population size of the four algorithms was set to 50, the number of iterations to 200, the dimension of the test function to 10, and the number of runs to 100. Finally, the experimental results of the other algorithms were compared with those of SSA, and the convergence results of the different algorithms on different test functions were obtained using the Wilcoxon signed-rank test and rank-sum test.
[0092] Figure 6The convergence curves of each algorithm on the CEC 2022 test functions are presented. SGKO demonstrates a significant convergence advantage in the unimodal functions F1-F6, rapidly approaching the optimal region in the early iterations, maintaining a stable downward trend in the mid-term using the golden sine search mechanism, and achieving better convergence accuracy in the final stage. Particularly in the multimodal functions F7-F12, SGKO can still break through local optima in the later stages of iteration, while the comparison algorithms experience convergence stagnation earlier. In summary, in most test set functions, SGKO ultimately achieves a better fitness value than other algorithms, and its convergence curve is smooth and oscillating, reflecting a good balance between global exploration and local exploitation.
[0093] Table 4 shows that SGKO achieved a significant advantage (p-value < 0.05) in the vast majority of test functions. In the signed-rank test, SGKO's p-values were all lower than 10^-9 in functions F1-F6 compared to KO, DBO, and WOA, indicating statistical significance of the optimization effect. In the rank-sum test, SGKO also showed a stable advantage in multimodal functions such as F7-F12 (p-value < 10^-10), verifying its robustness in handling complex optimization problems. Notably, in the F11 function with complex ill-conditioned characteristics, SGKO's rank-sum test p-value reached the order of 10^-15, significantly outperforming the comparison algorithms.
[0094] Experimental results show that the SGKO algorithm enhances population diversity through Sine chaotic mapping and achieves adaptive step size adjustment by combining golden sine search, exhibiting faster convergence speed and higher solution accuracy in multiple test functions. Its superior performance is demonstrated in single-modal function optimization by its precise local exploitation capability, and in multi-modal function optimization by its powerful global exploration characteristics. Statistical test results and convergence curve analysis corroborate each other, jointly proving the effectiveness and stability of SGKO in solving high-dimensional, multimodal optimization problems, providing a reliable foundation for subsequent hyperparameter optimization of the Transformer-KAN model.
[0095] Table 4.10D Wilcoxon sign test results and rank sum test results Tab.4Results of the 10D Wilcoxon Signed-Rank Test and Rank-Sum Test
[0096] (2) Results of hyperparameter optimization This experiment used a 7:3 ratio to evenly divide the sample set into training and test sets, ensuring consistent distribution of various outlier samples. Based on this division, the performance of the SGKO and KO algorithms in optimizing the Transformer-KAN model was systematically evaluated. The convergence characteristics of the algorithms were measured by the accuracy on the test set, and the results are as follows: Figure 7 As shown, the SGKO algorithm exhibits significant advantages during the optimization process. In the first iteration, the initial accuracy of the SGKO algorithm reaches 0.767, while the basic KO algorithm only achieves 0.678. This difference directly demonstrates the effectiveness of the Sine chaotic mapping initialization strategy in enhancing population diversity. This strategy, through the randomness and ergodicity of the chaotic sequence, effectively avoids the initial population from getting trapped in local optima, laying a solid foundation for subsequent optimization. During the iteration process, the SGKO algorithm further incorporates the golden sine search mechanism, achieving a balance between global exploration and local exploitation. Specifically, the accuracy of SGKO reaches 0.926 by the 39th iteration, while the accuracy of the KO algorithm is only 0.904 by the 42nd iteration. This result indicates that SGKO not only converges faster but also achieves better final optimization results, fully demonstrating the synergistic advantages of the hybrid improvement strategy.
[0097] The hyperparameter combination obtained through SGKO optimization is: 12 filters, 6 attention heads, initial learning rate of 0.006, 3 network layers, 34 grids, and 3 spline order. The optimized Transformer-KAN model achieves an accuracy of 0.926 on the test set, significantly improving the reliability of methane concentration anomaly detection. This result verifies the effectiveness of the hybrid improvement strategy: Sine chaotic mapping initialization enhances population diversity, and golden sine search improves fine-tuning capabilities. The synergistic effect of these two approaches effectively overcomes the local convergence bottleneck of traditional algorithms.
[0098] (3) Model performance comparison To systematically verify the effectiveness of the Transformer-KAN model architecture, this experiment set up multiple control experiments. These included comparisons between MLP and KAN, RNN and Transformer, and Transformer-KAN with individual Transformer and KAN models.
[0099] Figure 8Table 5 visually presents the performance of different models. KAN's accuracy on the test set is 0.707, which is better than MLP's accuracy of 0.554, revealing that KAN performs better on classification and prediction tasks. KAN, through mathematical adjustments, significantly reduces the complexity of the MLP model and improves its generalization ability. The Transformer's accuracy is 18.89% higher than RNN's, indicating that the Transformer, with its parallel feature extraction mechanism, is better suited to the need for global dependency resolution in complex temporal anomaly detection.
[0100] In addition, Figure 8 The connection line of Transformer-KAN is closest to the outermost edge on all four coordinate axes: Accuracy (0.926), Precision (0.913), Recall (0.939), and F1-Score (0.919), forming a rectangle with the largest enclosing area. In contrast, RNN shows a significant inward contraction on the Recall axis (0.750), and MLP shows a severe dip on the F1 axis (0.522). Transformer-KAN's prediction accuracy on the test set is 7.93% higher than Transformer (0.858) and 23.65% higher than KAN (0.707), indicating that the fusion model has a stronger overall discriminative ability for samples. Its Recall = 0.939 demonstrates better control over the risk of missed reports (such as unidentified gas anomalies); its F1-Score = 0.919 shows that its ability to balance precision and recall is superior to all baseline models.
[0101] Table 5 Performance metrics of different classification models Tab.5Performance Metrics of Different Classification Models
[0102] Figure 9 The classification error distribution reveals the model's confusion patterns regarding specific anomaly types. Among the 21 incorrect samples in the training set, the highest proportion of misclassifications occurred between label 3 (roof collapse) and label 6 (breach gas outburst), reaching 7 instances; similarly, the 17 incorrect samples in the test set showed 5 misclassifications between the two. This error pattern... Figure 4(a) The original CH4 concentration curves clearly show that the label 3 curve exhibits a steep, single-peak pulse, while the label 6, although also pulse-like, has a longer peak duration and a gradual decline. Despite their similar morphology, their physical causes are quite different: roof collapse stems from a sudden release of geological stress, resulting in a steep and short pulse; borehole gas outbursts originate from the decompression process of the coal seam, with a relatively continuous outburst. While the model can capture the pulse characteristics, it struggles to distinguish these subtle differences on the time scale.
[0103] Meanwhile, the misjudgment rates for tag 4 (partial wind stoppage) and tag 5 (reverse wind drill) were the second highest, with 5 items in the training set and 4 items in the test set. From Figure 4 (b) As can be seen from the interpolated curves, both exhibit a low-frequency oscillation mode. The curve for label 4 shows a smaller fluctuation amplitude, reflecting the gradual process of local ventilation obstruction; the curve for label 5 shows a larger fluctuation range, corresponding to the systemic disturbance caused by human-induced reverse ventilation. The model treats this amplitude difference as noise rather than a feature, leading to confusion between equipment failure and human-induced drills. In addition, the normal curve for label 0 shows stable fluctuations, while the sensor impact failure curve for label 1 exhibits a typical needle-like spike, which is distinctive and allows the model to accurately identify it. The calibration non-standard error rate for label 2 is lower because its pulse shape is smoother than that of labels 3 and 6, making it easier to distinguish.
[0104] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that an article or apparatus comprising a list of elements includes not only those elements but also other elements not expressly listed. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or apparatus that includes said element.
[0105] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A gas concentration anomaly classification method based on a deep learning model, characterized in that, Includes the following steps: Data preprocessing steps: Obtain the raw data sequence of gas concentration; perform initial screening and sample segmentation on the raw data sequence according to a preset threshold to obtain the sample sequence to be classified; use an interpolation algorithm to map the sample sequence to be classified to a target uniform time grid, so that the sequence length and sampling time interval of the sample sequence to be classified are consistent, and obtain a standardized sequence. Feature extraction steps: Statistical feature extraction is performed on the sequence of samples to be classified to obtain artificial feature vectors; the standardized sequence is input into the Transformer encoder to obtain deep feature vectors; Feature fusion step: The artificial feature vector is concatenated with the deep feature vector to form a joint feature vector; Concentration anomaly classification steps: Input the joint feature vector into the KAN classifier, and output the gas concentration curve category label and the corresponding monitoring status result; Parameter optimization steps: Using the classification performance index of the gas concentration curve category label as the fitness value, the hyperparameters of the Transformer encoder and the KAN classifier are optimized by the SGKO algorithm. The SGKO algorithm is obtained by incorporating the Sine chaotic mapping initialization strategy and the golden sine search mechanism into the K-means optimization algorithm.
2. The gas concentration anomaly classification method based on a deep learning model according to claim 1, characterized in that, The parameter optimization process includes the following steps: Population initialization steps: The SGKO algorithm's search agent population is initialized using Sine chaotic mapping. Each search agent corresponds to a set of candidate hyperparameters to generate the initial population. Fitness evaluation steps: Substitute each group of candidate hyperparameters into the Transformer-KAN model for training or validation, calculate the corresponding fitness value, and determine the current best solution and the current worst solution based on the fitness value; the fitness value is determined by classification accuracy, F1 score, or a weighted combination of the two; Location density probability generation steps: Generate a normalized distance based on the Euclidean distance between the search agent and the current best solution, and the Euclidean distance between the current best solution and the current worst solution. Then, combine the normalized distance with the sinusoidal modulation factor to generate the location density probability. Decision-making steps: Set a preset threshold. If the location density probability is greater than the preset threshold, then use the development strategy to update the location of the search agent; otherwise, execute the global exploration strategy. Development strategy steps: The development strategy includes a centroid space interaction mechanism, a multi-centroid fusion mechanism, and an optimal region focusing mechanism; wherein, the centroid space interaction mechanism dynamically adjusts the search step size through time-varying drift control parameters and combines random weights to achieve search direction diversity; the multi-centroid fusion mechanism balances the contribution of each centroid vector by adjusting coefficients; the optimal region focusing mechanism achieves local search by the difference direction between the weighted average centroid and the historical best solution; The search agent's position update steps are as follows: The position of the search agent is updated using the golden sine search mechanism to escape local optima; The optimal hyperparameter output steps are: repeating the location density probability generation step, decision step, development strategy step, and search agent location update step until the iteration termination condition is met, and outputting the optimal hyperparameter combination.
3. The gas concentration anomaly classification method based on a deep learning model according to claim 1 or 2, characterized in that, The expression for the Sine chaotic map is as follows: in, For the first A chaotic sequence value; For the first A chaotic sequence value; The expression for the golden sine search is as follows: in, , Represents the golden ratio; ; express Random numbers within; express Random numbers within; express Random numbers within; Indicates the probability threshold; Indicates the current iteration number; Indicates the first The individual in the first The position vector at the next iteration; Indicates the first The individual in the first The position vector at the next iteration; This represents the globally optimal solution.
4. The gas concentration anomaly classification method based on a deep learning model according to claim 1, characterized in that, In the data preprocessing step, an interpolation algorithm is used to standardize the sample sequences to be classified; the interpolation algorithm is a piecewise cubic spline interpolation algorithm, and the formula is as follows: in, For the target uniform time grid, the first A point in time; and For the first data sequence in the original data sequence The and the first Each timestamp forms an interpolation sub-interval; To achieve uniform time grid points at the target Gas concentration values obtained by up-interpolation; For indexing; In the first The cubic polynomial over subintervals of the th The coefficients of the secondary terms are determined by the boundary continuity conditions.
5. The gas concentration anomaly classification method based on a deep learning model according to claim 1, characterized in that, In the feature extraction step, the extracted statistical features include the maximum value, mean, standard deviation, and kurtosis of the sample sequence to be classified, as well as the first-order difference mean, first-order difference standard deviation, and first-order difference kurtosis extracted from the first-order difference sequence of the sample sequence to be classified. The statistical features constitute a 7-dimensional artificial feature vector.
6. The gas concentration anomaly classification method based on a deep learning model according to claim 1, characterized in that, In the feature extraction step, the Transformer encoder includes an input embedding layer, a position encoding layer, an encoder layer, and a feature compression layer. The long-range dependencies of the normalized sequence are captured by the multi-head attention mechanism in the encoder layer, and a 7-dimensional deep feature vector is output by the feature compression layer.
7. The gas concentration anomaly classification method based on a deep learning model according to claim 6, characterized in that, The position coding layer generates position codes using a frequency combination of sine and cosine functions. The calculation formula for the position codes is as follows: in, This represents a positional encoding function, used to generate a dimension-1 for each position in the sequence. The encoded vector; This represents the total dimension of the position encoding vector; Indicates the first in the sequence Index of each position; Indicates a dimension index; The multi-head self-attention mechanism captures the correlations at different positions in the normalized sequence by computing multiple attention heads in parallel. Each attention head learns a different representation subspace, and the outputs of all attention heads are aggregated through a linear transformation. The computation process is as follows: in, , and These represent the query matrix, key matrix, and value matrix, respectively. Indicates the dimension of the key vector; to express One point of attention; This represents the concatenation function for the attention head output; The parameter matrix represents the final linear transformation of the multi-head attention mechanism; The encoder layer also includes a feedforward neural network, and the encoder layer employs a residual connection and layer normalization stable training process.
8. The gas concentration anomaly classification method based on a deep learning model according to claim 1, characterized in that, In the concentration anomaly classification step, the artificial feature vector is 7-dimensional, the deep feature vector is 7-dimensional, and the joint feature vector is 14-dimensional. The KAN classifier maps the 14-dimensional joint feature vector to a category probability vector, and normalizes it using the softmax function to obtain the probability of each gas concentration curve category. The gas concentration curve category with the highest probability is used as the classification label. The gas concentration curve categories include normal curves, sensor impact failure, non-standard calibration, roof collapse, local ventilation stoppage, reverse ventilation drill, and borehole gas outburst. When the classification label is a normal curve, the normal monitoring status result is output. When the classification label is an anomaly category, the anomaly diagnosis result or alarm information corresponding to the anomaly category is output.
9. The gas concentration anomaly classification method based on a deep learning model according to claim 1, characterized in that, In the concentration anomaly classification step, the KAN classifier is constructed based on the Kolmogorov-Arnold theorem, and the activation function on its network connection edge is a learnable univariate function; the learnable univariate function is formed by a weighted combination of basis functions and B-spline functions, and at least one of the number of network layers, the number of spline grids, and the spline order of the KAN classifier is optimized and determined by the SGKO algorithm.
10. A gas concentration anomaly classification system based on a deep learning model, characterized in that, It includes a data acquisition module, a preprocessing module, a feature extraction module, a feature fusion module, a classification output module, and a parameter optimization module; The data acquisition module is used to acquire the raw data sequence collected by the gas concentration monitoring device; The preprocessing module is used to perform threshold screening, sample segmentation, and interpolation standardization on the original data sequence to obtain a standardized sequence. The feature extraction module is used to extract artificial feature vectors and deep feature vectors; The feature fusion module is used to concatenate the artificial feature vector and the deep feature vector into a joint feature vector; The classification output module is used to output the gas concentration curve category label and the corresponding monitoring status result based on the joint feature vector. The parameter optimization module is used to optimize the hyperparameters of the Transformer encoder and the KAN classifier using the SGKO algorithm. The system is used to implement the gas concentration anomaly classification method based on a deep learning model as described in any one of claims 1 to 9.