Improved knn interpolation method for coal dust concentration time series data

By using an improved K-nearest neighbor interpolation method that combines time and historical similarity distance for interpolation, the problems of nonlinearity and periodic fluctuations in coal dust concentration data are solved, thereby improving the accuracy and reliability of coal mine safety monitoring data.

CN122153625APending Publication Date: 2026-06-05CHINA COAL TECH & ENG GRP CHONGQING RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA COAL TECH & ENG GRP CHONGQING RES INST CO LTD
Filing Date
2026-02-11
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Traditional data interpolation methods cannot effectively handle the nonlinear and periodic fluctuations in coal dust concentration data, resulting in insufficient accuracy and reliability of risk warning models in coal mine safety monitoring.

Method used

An improved K-nearest neighbor interpolation method is adopted, which combines temporal distance and historical similarity distance for interpolation calculation. The final result is obtained by weighted averaging, including recent KNN based on temporal distance and KNN interpolation based on historical similarity distance.

Benefits of technology

It significantly improves the accuracy and reliability of coal dust concentration data interpolation, can handle data with complex spatiotemporal characteristics, adapts to the special needs of the coal mine environment, and enhances the data continuity and integrity of safety monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153625A_ABST
    Figure CN122153625A_ABST
Patent Text Reader

Abstract

The present application relates to an improved KNN interpolation method for coal dust concentration time series data, belonging to the technical field of coal mine safety monitoring. The method solves the problem of missing values of coal dust concentration time series data caused by sensor failure, transmission interruption or environmental interference, analyzes the missing situation of coal dust concentration time series data based on the sensor sampling period, determines the timestamp position of the missing data, establishes the K nearest neighbors based on the time distance from the recent data set and calculates the interpolation result based on the time distance, establishes the K nearest neighbors based on the historical similarity distance from the historical data set and calculates the interpolation result based on the historical similarity, and finally calculates the final interpolation result by weighted average through the comprehensive time distance interpolation and historical similarity interpolation. The present application can effectively improve the accuracy and reliability of data completion, guarantee the integrity of coal dust concentration data, and provide solid data support for the prediction and early warning of coal dust disaster and safety production management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of coal mine safety monitoring technology and relates to an improved KNN interpolation method for coal dust concentration time series data. Background Technology

[0002] Time-series data on coal dust concentration is crucial information in coal mine safety monitoring systems, playing a vital role in the prediction and prevention of dust hazards. In the coal mine production environment, due to factors such as sensor failure, transmission interruptions, or harsh environmental interference, coal dust concentration data often contains missing values. These missing values ​​directly affect the accuracy and reliability of risk warning models, thus threatening safe coal mine production. Therefore, developing reliable data interpolation methods has become a significant technical challenge in improving coal mine safety monitoring capabilities.

[0003] Traditional data interpolation methods, such as mean interpolation or linear interpolation, while simple and easy to use, have significant limitations. Mean interpolation cannot capture the dynamic characteristics of the data over time, while linear interpolation assumes a linear relationship in data changes, making it difficult to handle the nonlinear and periodic fluctuations in coal dust concentration data. Coal dust concentration changes are influenced by multiple factors, including the location of the working face, ventilation conditions, and mining rhythm, exhibiting complex local similarity patterns. Traditional methods often fail to effectively reconstruct the true structure of the data.

[0004] K-Nearest Neighbor interpolation, as a similarity-based nonparametric method, exhibits unique advantages in this application context. The core idea of ​​the K-Nearest Neighbor method is to find the K nearest complete samples to the missing point in historical time-series data and estimate the missing value using a distance-weighted average. This method not only considers temporal continuity but also captures the local structural relationships within the data's feature space. By selecting appropriate distance metrics and the value of K, K-Nearest Neighbor can effectively handle the nonlinear fluctuations and periodic characteristics of coal dust concentration data, significantly improving interpolation accuracy.

[0005] However, the standard K-nearest neighbor method still has room for improvement in coal dust concentration data interpolation. Especially when dealing with data with complex spatiotemporal characteristics, further improvements are needed in similarity measurement methods and weight calculation strategies to better adapt to the specific needs of the coal mine environment. Therefore, this invention aims to further improve the accuracy and reliability of coal dust concentration time-series data interpolation through an improved K-nearest neighbor interpolation algorithm. Summary of the Invention

[0006] In view of this, the purpose of the present invention is to provide an improved KNN interpolation method for coal dust concentration time series data.

[0007] To achieve the above objectives, the present invention provides the following technical solution: An improved KNN interpolation method for coal dust concentration time series data includes the following steps: S1: Analyze the missing data of coal dust concentration time series data based on sensor sampling period and determine the timestamp position of the missing data; S2: Build K-Nearest Neighbors (KNN) from recent datasets based on temporal distance and calculate the interpolation results based on temporal distance; S3: Build a KNN based on historical similarity distance from the historical dataset and calculate the interpolation results based on historical similarity; S4: The final interpolation result is obtained by combining the interpolation results of S2 and S3 through weighted average calculation.

[0008] S1: Analyze the missing data of coal dust concentration time series based on the sensor sampling period and determine the timestamp position of the missing data.

[0009] The process includes the following steps: S101: Set time interval T ,in T satisfy;

[0010] in, , T s This is the sampling period of the sensor.

[0011] S102: Traversing the time series data S When timestamps exist t 1 and timestamp t 2. Satisfies:

[0012] This indicates the timestamp. t 1 and timestamp t There are missing values ​​between 2, and the number of missing values ​​satisfies:

[0013] By timestamp t 1 and timestamp t The number of missing values ​​between 2 and 3 allows us to obtain the timestamps of the missing data. By iterating through the data using the logic described above, we can find the timestamp positions of the missing data in the time series.

[0014] S2: Build K-Nearest Neighbors (KNN) from recent datasets based on temporal distance and calculate the interpolation results based on temporal distance.

[0015] It includes the following steps: S201: For the timestamp positions of missing data, iterate through recent datasets and find the one with the smallest time distance. k A single data point forms the K-nearest neighbors. First, define the time distance as:

[0016] Among these, the time distance needs to be normalized to the day.

[0017] S202: In the recent K-nearest neighbors, the reciprocal of the time distance is used as the weight to obtain the interpolation result in the time dimension. The weight definition and interpolation result are as follows:

[0018] in, For very small values, avoid division by zero in reciprocal calculations. Based on the weight values, calculate the interpolation results corresponding to the K nearest neighbors in the time dimension using a weighted average.

[0019]

[0020] in, c i The coal dust concentration value corresponding to the K nearest neighbor timestamp.

[0021] S3: Build K nearest neighbors from the historical dataset based on historical similarity distance and calculate the interpolation results based on historical similarity.

[0022] It includes the following steps: S301: For the timestamp positions of missing data, iterate through the historical dataset and find the one with the smallest historical similarity distance. k Two data points form the K nearest neighbors. First, define the historical similarity distance as:

[0023] in, d hs For historical similarity distance, d dtw For historical curve shape similarity, d sr The similarity distance is based on historical statistical results; The historical distance coefficient satisfies ; S302: Due to the seasonality of coal dust concentration changes, for any timestamp position to be interpolated t 1. The selection range of historical data can be simplified to the set of similar moments in the historical data. T 2. Traversal T 2. Obtain the timestamp position t 2.

[0024] S303: In time series data S In the middle, a window is created with t1 as the center. T , T Time series S 1. The expression is:

[0025] Similarly, we can obtain the time series data S In China, with t Create a window centered on 2. T , T Time series S 2.

[0026] S304: Normalization S 1 and S 2, obtained The normalization method is the min-max normalization method, which means that for any element in the time series, the following transformation is performed:

[0027] in, c max This represents the maximum coal dust concentration in the sequence. c min This represents the minimum coal dust concentration in the sequence.

[0028] The similarity of the historical curve shapes between sequences can be calculated using the Dynamic Time Warping (DTW) algorithm. d dtw .

[0029] S305: Calculate the sequence S The mean, standard deviation, minimum, maximum, median, skewness, Pearson kurtosis, first quartile, third quartile, and range in 1 are used to construct the corresponding feature vector X( S 1); Similarly, sequences can be constructed. S 2 eigenvectors X( S 2).

[0030] Historical statistical similarity distance is defined as the Euclidean distance between the feature vectors of two sequences, expressed as:

[0031] S306: In the historical K-nearest neighbors, the interpolation result for the historical dimension is obtained through Gaussian kernel weights. The weight definitions and interpolation results are as follows:

[0032] in, For very small values, avoid division by zero in reciprocal calculations; L This represents the median distance among the historical K nearest neighbors. The interpolation results for the historical K nearest neighbors are calculated using weighted averages based on their respective weight values.

[0033]

[0034] S4: Combining temporal distance interpolation and historical similarity interpolation, the final interpolation result is calculated, expressed as:

[0035] in, The distance balance coefficient satisfies

[0036] The beneficial effects of this invention are as follows: First, the method of this invention effectively solves the problem of data loss caused by sensor failure or transmission interruption. Through an intelligent data completion mechanism, it ensures the continuity and integrity of monitoring data, providing a more reliable data foundation for coal mine safety monitoring.

[0037] Secondly, this invention innovatively combines temporal distance and historical similarity into interpolation calculations, considering not only the temporal proximity of data but also delving into similar patterns in historical data. This comprehensive interpolation strategy can more accurately capture the complex characteristics of coal dust concentration changes, including nonlinear fluctuations and periodic patterns, thereby significantly improving the accuracy and reliability of the interpolation results.

[0038] Furthermore, this method exhibits strong adaptability and robustness, effectively handling various data anomalies commonly encountered in coal mining environments. By combining dynamic time warping and statistical feature analysis, it can adapt to changes in data characteristics under different operating conditions, ensuring stable interpolation performance under varying production conditions.

[0039] In terms of practicality, this invention provides high-quality data support for subsequent dust prediction and early warning models. Complete time-series data helps establish more accurate risk assessment models, improves the early warning capabilities for coal mine dust disasters, and thus provides strong support for safe production decisions. At the same time, this method has high computational efficiency and is easy to deploy and apply in actual monitoring systems.

[0040] Finally, this invention optimizes the performance of the traditional K-nearest neighbor algorithm by improving the weighting mechanism and distance metric method, making the interpolation results more consistent with the actual distribution characteristics of coal dust concentration data. This improvement not only enhances the accuracy of single-point interpolation but also maintains the statistical characteristics of the overall data sequence, laying a solid foundation for long-term data analysis and trend research.

[0041] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0042] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This application provides a schematic flowchart of a KNN interpolation method for coal dust concentration time series data. Figure 2 This application provides a historical dataset for an improved KNN interpolation method for coal dust concentration time series data, as provided in this embodiment. Figure 3 This is a validation dataset for an improved KNN interpolation method for coal dust concentration time series data provided in this application embodiment. Detailed Implementation

[0043] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0044] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0045] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0046] Example 1 The method of this invention is applied to a coal mine safety monitoring system to process time-series data of coal dust concentration, with a sampling period of 20 seconds.

[0047] The workflow begins with the data input phase. The monitoring system receives raw data from the sensors and first executes S1 to analyze for missing data. Time intervals are then set based on the sensor sampling period. T ,in T Satisfying the formula:

[0048] The coefficient is and its value range is . In this embodiment k Take 1.2; The sampling period is 20 seconds. Therefore, the time interval is... T The calculation is 24 seconds. The system iterates through the time-series data, detecting timestamp gaps. When a timestamp exists... t 1 and timestamp t 2. Conditions are met: When a missing value is detected, it is determined that a missing value exists.

[0049] Missing quantity N Calculated using the formula:

[0050] For example, when the timestamp interval is 50 seconds, one data point is missing. The system records all missing timestamp locations.

[0051] After missing data detection, the system proceeds to the interpolation calculation phase. For each missing timestamp, S2 is executed to interpolate recent data. The system searches for the data with the smallest time distance from the recent dataset (e.g., data within the current date). k 1 data point k 1 is set to 5. Time distance Defined as:

[0052] Normalize the time difference to the day. Weight The calculation is as follows: +ε in The constant value is set to 0.001 to avoid division by zero errors. The time-dimension interpolation result is obtained based on the weighted average concentration values ​​of recent data points. : in Let K be the coal dust concentration value corresponding to the nearest neighbor timestamp.

[0053] Then, step S3 is executed to perform historical data interpolation. This involves finding the dataset with the smallest historical similarity distance from the historical dataset (e.g., data from the past 30 days). k 2 data points k 2 is set to 5. Historical similarity distance Defined as:

[0054] in For dynamic time-normalized distance, The similarity distance is based on historical statistical results. β This is the historical distance coefficient, set to 0.6. Weight Calculated using the Gaussian kernel function:

[0055] L The median distance among the historical K nearest neighbors. We set the value to 0.0001. The weighted average yields the historical dimension interpolation result. : c Finally, S4 is executed to combine the two interpolation results. Balance coefficient. α Taking 0.7, the final interpolation result is calculated as follows:

[0056] The system outputs complete time-series data for subsequent analysis. The workflow of this embodiment is as follows: Figure 1 As shown, it illustrates the complete sequence of steps of the method.

[0057] Example 2 Based on Example 1, this example refines the selection and optimization of key parameters.

[0058] In S1, the time interval T coefficient k Adjustable. When k When taking 1,T With a sampling period of 20 seconds, it can detect single-point missing points; k When taking 1.5, T The time limit is 30 seconds, balancing detection sensitivity and computational efficiency. The system supports dynamic adjustment. k value.

[0059] In S2, time distance calculations are normalized using days as the unit. The constants in the weight calculation... ε To prevent division by zero errors, a small value such as 0.0001 is usually set. k The value of 1 was optimized through experiments, and the range of values ​​is 3 to 7.

[0060] In S3, historical similarity distance calculation involves dynamic time warping and statistical features. Dynamic time warping distance... Through sequence normalization, the window size T Use 300 seconds. Statistical feature distance. The calculation is based on eigenvectors and includes 10 indicators such as mean and standard deviation. Balance coefficient. β By controlling the weights, tests showed that performance was stable when β was between 0.5 and 0.7.

[0061] In S4, the balance coefficient α The range is from 0.5 to 1. Optimal α is determined through cross-validation. The validation process uses historical and validation datasets. Figure 2 An example of a historical dataset is shown, presenting a sequence of coal dust concentration changes over time.

[0062] Figure 3 An example of a validation dataset is shown, which displays data points with simulated missing values ​​for method testing.

[0063] Example 3 This embodiment describes in detail the historical similarity calculation and feature extraction.

[0064] In S3, dynamic time warping distance Obtained through sequence normalization. Based on the timestamp to be interpolated. t 1. Create a window centered on [- T , T Time series S 1. Window size T The sequence is 300 seconds long and contains 31 points. Sequence normalization uses the min-max method.

[0065] in c The values ​​represent the coal dust concentration in the sequence. The maximum value in the sequence. Find the minimum value in the sequence. The same applies to historical points. tsequence of 2 S 2. Calculate the DTW distance of the normalized sequence.

[0066] Historical statistical results similarity distance Calculated using feature vectors. Sequence extraction. S Statistical eigenvectors of 1 This includes the mean, standard deviation, minimum, maximum, median, skewness, kurtosis, first quartile, third quartile, and range. The same applies to sequences. S 2 obtained . Defined as Euclidean distance:

[0067] The selection of historical datasets is limited to historical moments close to the missing points. For example, if the missing point occurred at 10:00, only data from 9:00 to 11:00 in the historical dataset will be considered. Distance coefficient. β Fixed at 0.5 to balance shape and statistical contribution.

[0068] This embodiment is implemented in a real-time monitoring system, automatically adjusting parameters when processing data streams. Interpolation results are fed back in real time, improving response speed.

[0069] Example 4 The data used in this embodiment is the measured coal dust time-series data of a coal mine from 00:00:00 on October 1, 2025 to 23:59:59 on October 3, 2025, with a data sampling period of 20 seconds. The period from 00:00:00 on October 1, 2025 to 23:59:59 on October 2, 2025 is designated as the historical dataset, and the period from 00:00:00 on October 3, 2025 to 23:59:59 on October 3, 2025 is designated as the acceptance dataset. Random deletions were made from the verification dataset. n We have 10 data points, which serve as the recent dataset. This recent dataset is also a time series dataset with interpolation.

[0070] S1: Based on a sensor sampling period of 20 seconds, analyze the missing data in recent datasets.

[0071] S2: From the recent dataset, establish the K nearest neighbors based on time distance, and calculate the interpolation result based on time distance by weighting the time distance.

[0072] S3: From the historical dataset, establish the K nearest neighbors based on historical similarity distance, and use historical similarity distance as the weight to calculate the interpolation result based on historical similarity.

[0073] S4: The final interpolation result is calculated by combining temporal distance interpolation and historical similarity interpolation. The regression index is compared with linear interpolation algorithms and traditional KNN algorithms.

[0074] Table 1

[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. An improved KNN interpolation method for time-series data of coal dust concentration, characterized in that: Includes the following steps: S1: Analyze the missing data of coal dust concentration time series data based on sensor sampling period and determine the timestamp position of the missing data; S2: Build the K nearest neighbors from the recent dataset based on time distance and calculate the interpolation results based on time distance; S3: Establish K nearest neighbors from the historical dataset based on historical similarity distance and calculate the interpolation results based on historical similarity; S4: The final interpolation result is obtained by combining the interpolation results of S2 and S3 through weighted average calculation.

2. The improved KNN interpolation method for coal dust concentration time series data according to claim 1, characterized in that: S1 includes: Set time interval T ,in T satisfy , k Coefficient and , T s The sampling period of the sensor; Traverse time-series data, when timestamps exist t 1 and timestamp t 2. Satisfy At that time, determine the timestamp t 1 and timestamp t 2. There are missing values ​​between them, the number of missing values ​​is... N satisfy .

3. The improved KNN interpolation method for coal dust concentration time series data according to claim 1, characterized in that: S2 includes: For missing data timestamps, find the one with the smallest time distance from the most recent dataset. k A KNN is formed from a single data point, with a time distance. Defined as ; Use the reciprocal of the time distance as the weight Weight Defined as ,in It is a very small value; Based on weight Weighted calculation of interpolation results , Defined as ,in This represents the coal dust concentration value corresponding to the timestamp within the KNN.

4. The improved KNN interpolation method for coal dust concentration time series data according to claim 1, characterized in that: S3 includes: For timestamp locations with missing data, find the one with the smallest historical similarity distance from the historical dataset. k Two data points form a KNN, and the historical similarity distance is calculated. Defined as ,in For historical similarity distance, For Dynamic Time Warped (DTW) distance, The similarity distance is based on historical statistical results. Historical distance coefficient and ; The Gaussian kernel function of historical similarity distance is used as the weight. Weight Defined as ,in It is a very small value. L The median distance in the historical KNN; Based on weight Weighted calculation of interpolation results , Defined as ,in This represents the coal dust concentration value corresponding to the timestamp within the KNN.

5. The improved KNN interpolation method for coal dust concentration time series data according to claim 4, characterized in that: In the historical similarity distance calculation, the dynamic time-normalized distance is used. Obtained through the following methods: Based on the timestamp position of missing data t 1. Create a window centered on [- T , T Time series S 1, and based on historical data timestamp positions t 2. Create a window centered on [- T , T Time series S 2; right S 1 and S 2. Perform max-min normalization to obtain the normalized sequence. and The normalization formula is ,in c The values ​​represent the coal dust concentration in the sequence. The maximum value in the sequence. It is the minimum value of the sequence; calculate and Dynamic time-warped distance between .

6. The improved KNN interpolation method for coal dust concentration time series data according to claim 4, characterized in that: The similarity distance of the historical statistical results Obtained through the following methods: Extracting time series S Statistical eigenvectors of 1 These include mean, standard deviation, minimum, maximum, median, skewness, Pearson kurtosis, first quartile, third quartile, and range; Similarly, extract the time series. S Statistical eigenvectors of 2 ; Defined as the Euclidean distance between feature vectors, i.e. .

7. The improved KNN interpolation method for coal dust concentration time series data according to claim 1, characterized in that: In S4, the final interpolation result Defined as ,in The distance balance coefficient and .

8. The improved KNN interpolation method for coal dust concentration time series data according to claim 3, characterized in that: The time distance In the calculation, the units of the timestamp difference are normalized to days.

9. The improved KNN interpolation method for coal dust concentration time series data according to claim 4, characterized in that: The selection of the historical dataset is limited to a set of historical moments that are close to the timestamp position to be interpolated.