Well descending abnormity identification method and device based on dynamic time warping
Through dynamic time regulation technology, the monitoring data of downhole wells is processed to identify abnormal situations, solving the problem of insufficient accuracy of downhole abnormalities recognition in the existing technology, and achieving higher recognition accuracy and safety guarantees.
Patent Information
- Application Number
- CN202411746867.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
The prior art has problems with insufficient accuracy in the identification of downhole abnormalities, especially the impact of environmental factors and data problems caused by poor signal, which leads to inaccurate identification.
A dynamic time regulation method is used to obtain monitoring data of miners going down the well, extract personnel step numbers and vital signs data, perform clustering and similarity calculations, and identify abnormal data from going down the well.
It significantly improves the accuracy of abnormal identification, and can more reliably identify abnormal situations in the well downward, including punch-in behavior, and improves the monitoring and early warning capabilities of downward safety.
Smart Images

Figure CN119669782A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for identifying downhole anomalies based on dynamic time regularization. Background Art
[0002] In the mining industry, the identification of underground anomalies requires comprehensive analysis of multiple aspects of data, including miners' clock-in records, vital signs monitoring (such as heart rate, blood oxygen saturation, etc.), underground environmental parameters (such as temperature, harmful gas concentration, etc.), personnel behavior and activity pattern analysis, real-time positioning tracking, work and rest time management, historical data comparison, equipment status monitoring and communication record review, so as to promptly detect safety hazards and abnormal situations.
[0003] However, existing technologies face some challenges. First, although biometrics can be used to identify anomalies underground, its accuracy is easily affected by environmental factors (such as light, temperature, humidity, etc.), which may lead to inaccurate clocking results underground. Secondly, when using cosine values to judge underground anomalies, if miners cannot generate data due to poor signals, the relevant data will be recorded as 0, which will lead to an increase in numerical differences, thereby affecting the calculation accuracy of the cosine value and reducing the similarity of detection. Therefore, this method is not completely reliable.
[0004] Therefore, there is currently no comprehensive and effective method to identify abnormal conditions in the well. Summary of the invention
[0005] The technical problem to be solved by the present invention is to address the above-mentioned deficiencies in the prior art and propose a method and device for identifying anomalies in a well based on dynamic time warping. The method can comprehensively and effectively identify abnormal conditions in the well, significantly improve the accuracy of anomaly identification, and thus provide a more reliable guarantee for safety in the well.
[0006] In a first aspect, the present invention provides a method for identifying downhole anomalies based on dynamic time warping, the method comprising the following steps:
[0007] Step S1: Acquire monitoring data of miners going down the mine;
[0008] Step S3: extracting the number of steps and vital signs data of the person from the monitoring data;
[0009] Step S4: clustering the miners according to the number of steps of the personnel to obtain multiple miner clusters;
[0010] Step S5: Based on the clustering of the same miner, the similarity of vital signs between any two miners is obtained according to dynamic time warping;
[0011] Step S6: According to the similarity of the vital signs of the personnel, the abnormal data of going downhole is identified, thereby completing the identification of downhole abnormalities based on dynamic time warping.
[0012] Further, before step S3, the method further includes step S2;
[0013] Step S2: preprocessing the monitoring data of the miners going down the mine to obtain preprocessed monitoring data;
[0014] The step S1 specifically includes the following steps:
[0015] Replace the missing values in the monitoring data of the miner going down the mine with 0 to obtain 0 data;
[0016] Calculate the proportion of 0 data in the monitoring data of the same group of miners going down the mine;
[0017] According to the preset abnormal ratio threshold, it is determined whether the monitoring data of the miner going down the mine is abnormal:
[0018] If the 0 data ratio exceeds the abnormal ratio threshold, it is determined that the monitoring data of the miner going down the mine is abnormal, and the process ends at the same time; if the 0 data ratio does not exceed the abnormal ratio threshold, it is determined that the monitoring data of the miner going down the mine is not abnormal, and the process goes to step S2 at the same time;
[0019] Step S3 specifically includes: extracting the number of steps and vital signs data of the person from the preprocessed monitoring data.
[0020] Furthermore, the step S4 specifically includes the following steps:
[0021] Step S41: Input data set F = {O n}, set the minimum object parameter MinPts and radius parameter ε;
[0022] Among them, O n Represents the number of steps taken by the miner at a preset time node. The minimum object parameter MinPts is used to determine the domain range of the core object, and the radius parameter ε is used to define the scope of the search domain. The core object refers to an object in the data set that is within the given radius parameter ε and has at least MinPts neighbors.
[0023] Step S42: Mark all objects in the data set as unread;
[0024] Step S43: randomly select an unread object p from the data set F;
[0025] Step S44: Check whether the unread object p is a core object:
[0026] If the unread object p is a core object, search all density-reachable objects and mark them as read;
[0027] Wherein, the density-reachable object refers to the reachable object located within the ε radius of the core object;
[0028] Step S45: repeating steps S43 and S44 until all objects in the data set F are marked as read;
[0029] Step S46: Select a core object as a seed, and classify all objects with density-reachable points into one category;
[0030] Step S47: Select another unclassified core object as a seed, and classify all objects with density-reachable points thereof into another category;
[0031] Step S48: Repeat step S47 until there are no unclassified core objects, thereby obtaining multiple miner clusters.
[0032] Furthermore, the step S5 specifically includes the following steps:
[0033] Step S51: Obtaining the life characteristic time series data of two miners in the same miner cluster;
[0034] The mathematical expression of the time series data of the life characteristics of the two miners is as follows:
[0035]
[0036] In formula (1), x represents the first miner among the two miners, y represents the second miner among the two miners, and ZS x Represents the time series data of the life characteristics of the first miner, ZS y represents the time series data of the second miner’s life characteristics, and e represents ZS x The data length, f represents ZS y The data length is α∈[1,e], β∈[1,f];
[0037] represents the normalized value of the life characteristic of the first miner at the αth time series, that is, the normalized value of the life characteristic of the xα element;
[0038] represents the normalized value of the life characteristic of the second miner at the βth time series, that is, the normalized value of the life characteristic of the yβ element;
[0039] Step S52: Calculate the distance between the xα element and the yβ element in the life feature time series data;
[0040] The distance between the xα element and the yβ element is measured using the Euclidean distance, and its calculation formula is as follows:
[0041]
[0042] Step S53: constructing a regular distance matrix according to the distance between the xα element and the yβ element;
[0043] The expression of the regularized distance matrix is as follows:
[0044]
[0045] In formula (3), D exf is the regularized distance matrix;
[0046] Step S54: Calculate the initial minimum regularization distance according to the regularization distance matrix;
[0047] The initial minimum regularization distance W d The calculation formula is as follows:
[0048] W d =w1+w2+…+w k (4);
[0049] In formula (4), k∈[max(e,f),e+f-1], w k is the cumulative regularized distance between the xαth element and the yβth element;
[0050] Step S55: setting constraints to determine the shortest dynamic regularization path; and, based on the shortest dynamic regularization path, starting from the initial minimum regularization distance W d Determine the minimum regular distance of the target, that is, obtain the minimum regular distance W;
[0051] The expression of the shortest dynamic regularization path is as follows:
[0052]
[0053] Among them, DTW(Z SX , Z SY ) represents Z SX and Z SY The shortest dynamically regularized path between
[0054] Step S56: Calculate the similarity of vital signs between two miners according to the minimum regularized distance W, and the calculation formula is as follows:
[0055] Similarity = 1 / (1+W) (6);
[0056] Among them, Similarity represents the similarity of vital signs between two miners;
[0057] Step S57: Repeat steps S51 to S56 until the similarity between the vital signs time series data of any two miners in the same miner cluster has been calculated, thereby obtaining the similarity of vital signs between any two miners.
[0058] Further, the life characteristic time series data in step S51 is formed by arranging the life characteristic data in chronological order;
[0059] The vital sign data is obtained based on body temperature data, heart rate data, and blood oxygen data, and specifically includes the following steps:
[0060] Step S511: acquiring body temperature data, heart rate data and blood oxygen data respectively;
[0061] Step S512: preprocessing and standardizing the body temperature data, the heart rate data, and the blood oxygen data respectively to obtain standardized body temperature data, standardized heart rate data, and standardized blood oxygen data;
[0062] Step S513: combining the standardized body temperature data, the standardized heart rate data and the standardized blood oxygen data to form a life characteristic matrix to obtain life characteristic data.
[0063] Furthermore, the downhole abnormal data includes abnormal data of punching in on behalf of others;
[0064] In the step S6, according to the similarity between the vital signs of the personnel, the abnormal data of going down the well is identified, which specifically includes the following steps:
[0065] Step S61: Based on the similarity threshold, determine whether the similarity of the vital signs of the two miners is highly consistent:
[0066] If the similarity of the vital characteristics of any two miners exceeds the preset similarity threshold, the vital characteristics of the two miners are determined to be highly consistent;
[0067] Wherein, the similarity threshold is preset according to historical data or business requirements;
[0068] Step S62: Based on the miners' clock-in records, when it is determined that the vital characteristics of two miners are highly consistent, it is determined that there is abnormal clock-in behavior on behalf of others, thereby identifying abnormal data going down the mine.
[0069] In a second aspect, the present invention provides a downhole anomaly identification device based on dynamic time warping, the device comprising:
[0070] An acquisition unit, used to acquire monitoring data of miners going down the mine;
[0071] An extraction unit, connected to the acquisition unit, for extracting the number of steps and vital signs data of the personnel from the monitoring data;
[0072] A clustering unit, connected to the extraction unit, for clustering the miners according to the number of steps of the personnel to obtain a plurality of miner clusters;
[0073] A warping unit connected to the clustering unit, for obtaining the similarity of vital signs between any two miners based on the same miner cluster according to dynamic time warping;
[0074] The identification unit is connected to the regularization unit and is used to identify the downhole abnormal data according to the similarity of the vital signs of the personnel, thereby completing the downhole abnormality identification based on dynamic time regularization.
[0075] Furthermore, the regularization unit comprises:
[0076] An acquisition module is used to obtain the time series data of life characteristics of two miners in the same miner cluster;
[0077] The mathematical expression of the time series data of the life characteristics of the two miners is as follows:
[0078]
[0079] In the formula, x represents the first miner among the two miners, y represents the second miner among the two miners, and ZS x Represents the time series data of the life characteristics of the first miner, ZS y represents the time series data of the second miner’s life characteristics, and e represents ZS x The data length, f represents ZS y The data length is α∈[1,e], β∈[1,f];
[0080] represents the normalized value of the life characteristic of the first miner at the αth time series, that is, the normalized value of the life characteristic of the xα element;
[0081] represents the normalized value of the life characteristic of the second miner at the βth time series, that is, the normalized value of the life characteristic of the yβ element;
[0082] A first calculation module, connected to the acquisition unit, for calculating the distance between the xα element and the yβ element in the life feature time series data;
[0083] The distance between the xα element and the yβ element is measured using the Euclidean distance, which is calculated as follows:
[0084]
[0085] A construction module, connected to the first calculation, for constructing a regular distance matrix according to the distance between the xα element and the yβ element;
[0086] The expression of the regularized distance matrix is as follows:
[0087]
[0088] Where D exf is the regularized distance matrix;
[0089] A second calculation module, connected to the construction module, is used to calculate the initial minimum regularization distance according to the regularization distance matrix;
[0090] The initial minimum regularization distance W d The calculation formula is as follows:
[0091] W d =w1+w2+…+w k ;
[0092] Where k∈[max(e,f),e+f-1],w k is the cumulative regularized distance between the xαth element and the yβth element;
[0093] A processing module connected to the second calculation module is used to set constraints and determine the shortest dynamic regularization path; and, according to the shortest dynamic regularization path, from the initial minimum regularization distance W d Determine the minimum regular distance of the target, that is, obtain the minimum regular distance W;
[0094] The expression of the shortest dynamic regularized path is as follows:
[0095]
[0096] Among them, DTW(Z SX , Z SY ) represents Z SX and Z SY The shortest dynamically regularized path between
[0097] The third calculation module is connected to the processing module and is used to calculate the similarity of the vital signs of two miners according to the minimum regularized distance W. The calculation formula is as follows:
[0098] Similarity = 1 / (1+W);
[0099] Among them, Similarity represents the similarity of vital signs between two miners;
[0100] A first determination module, connected to the third calculation module, is used to determine whether the similarity between the life feature time series data of any two miners in the same miner cluster has been calculated;
[0101] Among them, the acquisition module is connected to the first determination module, and is used to re-acquire the life feature time series data of other two miners in the same miner cluster when the first determination module determines that the similarity between the life feature time series data of any two miners in the same miner cluster has not been calculated.
[0102] Furthermore, the acquisition module includes:
[0103] The first acquisition submodule is used to acquire body temperature data;
[0104] The second acquisition submodule is used to acquire heart rate data;
[0105] The third acquisition submodule is used to acquire blood oxygen data;
[0106] a processing submodule, connected to the first acquisition submodule, the second acquisition submodule, and the third acquisition submodule, respectively, and used to preprocess and standardize the body temperature data, the heart rate data, and the blood oxygen data, respectively, to obtain standardized body temperature data, standardized heart rate data, and standardized blood oxygen data;
[0107] The combining submodule is connected to the processing submodule and is used to combine the standardized body temperature data, the standardized heart rate data and the standardized blood oxygen data to form a life characteristic matrix to obtain life characteristic data.
[0108] Furthermore, the identification unit includes:
[0109] The second determination module is used to determine whether the similarity of the vital signs of two miners is highly consistent according to the similarity threshold;
[0110] If the similarity between the vital characteristics of any two miners exceeds a preset similarity threshold, the second determination module determines that the vital characteristics of the two miners are highly consistent; the similarity threshold is preset according to historical data or business requirements;
[0111] A third determination module is connected to the second determination module, and is used to determine whether there is abnormal behavior of punching in on behalf of others when the second determination module determines that the vital characteristics of the two miners are highly consistent;
[0112] Among them, if there are miners' vital characteristics that are highly consistent in the clock-in records, the third determination module determines that there is abnormal clock-in behavior on behalf of others;
[0113] The identification module is connected to the third determination module and is used to identify abnormal data of going down the well when the third determination module determines that it is an abnormal behavior of punching in on behalf of others.
[0114] The present invention can comprehensively and effectively identify abnormal conditions underground, significantly improving the accuracy of abnormality identification, thereby providing a more reliable guarantee for underground safety. The specific beneficial effects are as follows:
[0115] 1. High accuracy: The present invention adopts dynamic time warping (DTW) technology to make the comparison of time series data more accurate, effectively reducing the recognition error caused by environmental changes or signal noise.
[0116] 2. Real-time monitoring: The present invention can analyze the life characteristics and behavior patterns of miners in real time, detect abnormal situations in time, significantly shorten the response time, and improve the emergency handling capabilities.
[0117] 3. Comprehensive data integration: The present invention can integrate multiple data sources, including clock-in records, vital signs data and environmental parameters, to comprehensively assess downhole safety and provide richer information support.
[0118] 4. Strong adaptability: The present invention has good adaptability to different types of anomalies and can be dynamically adjusted according to real-time data, thereby improving the system's ability to respond to new situations and emergencies.
[0119] 5. Safety warning mechanism: The present invention can issue safety warnings in advance to prevent accidents by identifying and analyzing abnormal situations. BRIEF DESCRIPTION OF THE DRAWINGS
[0120] Figure 1 This is a flow chart of downhole anomaly identification based on dynamic time warping in an embodiment of the present invention;
[0121] Figure 2 A schematic diagram of the shortest distance of a dynamic regularization algorithm in an embodiment of the present invention;
[0122] Figure 3 Schematic diagram of a method for identifying downhole anomalies based on dynamic time warping in an embodiment of the present invention;
[0123] Figure 4 Schematic diagram of a downhole anomaly identification device based on dynamic time warping in an embodiment of the present invention;
[0124] Among them, the figure numbers are: 10, acquisition unit, 20, preprocessing unit, 30, extraction unit, 40, clustering unit, 50, regularization unit, 60, identification unit. DETAILED DESCRIPTION
[0125] In order to enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0126] It should be understood that the specific embodiments and drawings described herein are only used to explain the present invention rather than to limit the present invention.
[0127] It can be understood that, in the absence of conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other.
[0128] It can be understood that, for the convenience of description, the drawings of the present invention only show the parts related to the present invention, while the parts irrelevant to the present invention are not shown in the drawings.
[0129] It can be understood that each unit and module involved in the embodiments of the present invention may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.
[0130] It can be understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of the present invention may occur in an order different from that marked in the drawings.
[0131] It is understood that the flowcharts and block diagrams of the present invention illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present invention. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or may be implemented by a combination of hardware and computer instructions.
[0132] It can be understood that the units and modules involved in the embodiments of the present invention can be implemented by software or hardware. For example, the units and modules can be located in a processor.
[0133] Embodiment 1:
[0134] like Figure 1 and Figure 3As shown, this embodiment provides a method for identifying anomalies in underground mines based on dynamic time warping. This method can be applied to mine safety management, and by real-time monitoring of the vital characteristics and behavior patterns of miners, potential health crises and safety hazards can be identified in a timely manner. At the same time, the method can effectively identify the behavior of punching in on behalf of others, analyze the similarity between the punching in time series and historical data, and thus prevent colleagues from borrowing equipment to punch in instead. In addition, for environmental parameters, this method not only improves the accuracy of abnormal behavior detection, but also enhances emergency response capabilities, providing comprehensive protection for the safety of miners. The method comprises the following steps:
[0135] Step S1: Acquire monitoring data of miners going down the mine.
[0136] The step S1 specifically includes the following steps:
[0137] Replace the missing values in the monitoring data of the miner going down the mine with 0 to obtain 0 data;
[0138] Calculate the proportion of 0 data in the monitoring data of the same group of miners going down the mine;
[0139] According to the preset abnormal ratio threshold, it is determined whether the monitoring data of the miner going down the mine is abnormal:
[0140] If the proportion of 0 data exceeds the abnormal proportion threshold, it is determined that the monitoring data of the miner going down the mine is abnormal, and the process ends; if the proportion of 0 data does not exceed the abnormal proportion threshold, it is determined that the monitoring data of the miner going down the mine is not abnormal, and step S2 is entered.
[0141] Step S2: pre-processing the monitoring data of the miners going down the mine to obtain pre-processed monitoring data.
[0142] Step S3: extracting the number of steps and vital signs data of the person from the preprocessed monitoring data.
[0143] Step S4: clustering the miners according to the number of steps taken by the miners to obtain a plurality of miner clusters.
[0144] As a specific implementation, the step S4 specifically includes the following steps:
[0145] Step S41: Input data set F = {O n}, set the minimum object parameter MinPts and radius parameter ε;
[0146] Among them, O nRepresents the number of steps taken by the miner at a preset time node. The minimum object parameter MinPts is used to determine the domain range of the core object, and the radius parameter ε is used to define the scope of the search domain. The core object refers to an object in the data set that is within the given radius parameter ε and has at least MinPts neighbors.
[0147] Step S42: Mark all objects in data set F as unread;
[0148] Step S43: randomly select an unread object p from the data set F;
[0149] Step S44: Check whether the unread object p is a core object:
[0150] If the unread object p is a core object, search all density-reachable objects and mark them as read; form the current data set F based on the core objects q , and F q Mark as read;
[0151] Wherein, the density-reachable object refers to the reachable object located within the ε radius of the core object;
[0152] Step S45: repeating steps S43 and S44 until all objects are marked as read;
[0153] Step S46: Select a core object as a seed, and classify all objects with density-reachable points into one category;
[0154] Step S47: Select another unclassified core object as a seed, and classify all objects with density-reachable points thereof into another category;
[0155] Step S48: Repeat step S47 until there are no unclassified core objects, thereby obtaining multiple miner clusters.
[0156] Step S5: Based on the same miner cluster, the similarity of vital signs between any two miners is obtained according to dynamic time warping.
[0157] As a specific implementation, step S5 specifically includes the following steps:
[0158] Step S51: Obtaining the life characteristic time series data of two miners in the same miner cluster;
[0159] The mathematical expression of the time series data of the life characteristics of the two miners is as follows:
[0160]
[0161] In the formula, x represents the first miner among the two miners, y represents the second miner among the two miners, and ZSx Represents the time series data of the life characteristics of the first miner, ZS y represents the time series data of the second miner’s life characteristics, and e represents ZS x The data length, f represents ZS y The data length is α∈[1,e], β∈[1,f];
[0162] represents the normalized value of the life characteristic of the first miner at the αth time series, that is, the normalized value of the life characteristic of the xα element;
[0163] represents the normalized value of the life characteristic of the second miner at the βth time series, that is, the normalized value of the life characteristic of the yβ element;
[0164] Step S52: Calculate the distance between the xα element and the yβ element in the life feature time series data;
[0165] The distance between the xα element and the yβ element is measured using the Euclidean distance, which is calculated as follows:
[0166]
[0167] Step S53: constructing a regular distance matrix according to the distance between the xα element and the yβ element;
[0168] The expression of the regularized distance matrix is as follows:
[0169]
[0170] Where D exf is the regularized distance matrix;
[0171] Step S54: Calculate the initial minimum regularization distance according to the regularization distance matrix;
[0172] The initial minimum regularization distance W d The calculation formula is as follows:
[0173] W d =w1+w2+…+w k ;
[0174] Where k∈[max(e,f),e+f-1],w k is the cumulative regularized distance between the xαth element and the yβth element;
[0175] Step S55: setting constraints to determine the shortest dynamic regularization path; and, based on the shortest dynamic regularization path, starting from the initial minimum regularization distance W dDetermine the minimum regular distance of the target, that is, obtain the minimum regular distance W;
[0176] The expression of the shortest dynamic regularized path is as follows:
[0177]
[0178] Among them, DTW(Z SX , Z SY ) represents Z SX and Z SY The shortest dynamically regularized path between
[0179] Step S56: Calculate the similarity of vital signs between two miners according to the minimum regularized distance W, and the calculation formula is as follows:
[0180] Similarity = 1 / (1+W);
[0181] Among them, Similarity represents the similarity of vital signs between two miners;
[0182] Step S57: Repeat steps S51 to S56 until the similarity between the vital signs time series data of any two miners in the same miner cluster has been calculated, thereby obtaining the similarity of vital signs between any two miners.
[0183] As a specific implementation, the life characteristic time series data in step S51 is formed by arranging the life characteristic data in chronological order;
[0184] The vital sign data is obtained based on body temperature data, heart rate data, and blood oxygen data, and specifically includes the following steps:
[0185] Step S511: acquiring body temperature data, heart rate data and blood oxygen data respectively;
[0186] Step S512: preprocessing and standardizing the body temperature data, the heart rate data, and the blood oxygen data respectively to obtain standardized body temperature data, standardized heart rate data, and standardized blood oxygen data;
[0187] Step S513: combining the standardized body temperature data, the standardized heart rate data and the standardized blood oxygen data to form a life characteristic matrix to obtain life characteristic data.
[0188] Step S6: According to the similarity of the vital signs of the personnel, the abnormal data of going downhole is identified, thereby completing the identification of downhole abnormalities based on dynamic time warping.
[0189] Specifically, the downhole abnormal data includes abnormal data of punching in for others;
[0190] In the step S6, according to the similarity between the vital signs of the personnel, the abnormal data of going down the well is identified, which specifically includes the following steps:
[0191] Step S61: Based on the similarity threshold, determine whether the similarity of the vital signs of the two miners is highly consistent:
[0192] If the similarity of the vital characteristics of any two miners exceeds the preset similarity threshold, the vital characteristics of the two miners are determined to be highly consistent;
[0193] Wherein, the similarity threshold is preset according to historical data or business requirements;
[0194] Step S62: Based on the miners' clock-in records, when it is determined that the vital characteristics of two miners are highly consistent, it is determined that there is abnormal clock-in behavior on behalf of others, thereby identifying abnormal data going down the mine.
[0195] In order to more clearly illustrate the process of this embodiment, the specific implementation method is as follows:
[0196] 1. Data collection: The smart watches worn by miners when going down the mine are embedded with three-axis acceleration sensors, blood oxygen collection sensors, body temperature sensors, and heart rate sensors. These sensors can monitor the number of steps and vital signs data of the monitored personnel in real time.
[0197] 2. Data screening: Integrate all monitoring values of the same group of monitored persons, record the missing values as 0, and then check the monitoring values of each monitored person. If the amount of data with a monitoring value of 0 exceeds the pre-set ratio threshold, it is recorded as an abnormality.
[0198] 3. Data feature extraction: four types of indicators, namely, the number of steps, body temperature, heart rate, and blood oxygen, that is, four types of feature data, among which the number of steps of the nth miner at the i-th time node is recorded as o ni , the column vector composed of the combination of step count and vital sign data is as follows:
[0199] Ani=[O ni ,h ni , l ni , v ni ] T
[0200] Where O ni ,h ni , l ni , v ni They are respectively represented as the number of steps, body temperature, heart rate, and blood oxygen of the nth miner at the i-th time node.
[0201] At m time nodes, the complete time series matrix of the nth miner is as follows:
[0202] Sn=[A n1 , A n2 , …, A ni , …, A nm ]
[0203] 4. Data processing: Since the minimum regularization needs to be calculated when measuring the similarity between time series later, the time data in this embodiment is a relative quantity. This embodiment adopts standardization to process the data, and the specific formula is as follows:
[0204]
[0205] Where O, H, L, and V represent the complete time series of steps, body temperature, heart rate, and blood oxygen, respectively. They represent the means of the complete time series of step number, body temperature, heart rate, and blood oxygen, respectively. std(O), std(H), std(L), and std(V) represent the standard deviations of the complete time series of step number, body temperature, heart rate, and blood oxygen, respectively.
[0206] Therefore, the complete time series matrix of the nth miner after normalization is as follows:
[0207]
[0208] Where ZSn represents the complete time series matrix of the nth miner after standardization. 5. Structure construction and clustering:
[0209] The density-based DBSCAN clustering algorithm is used to process the step data oni, and the data set of n miners is divided into periods based on the step data to reduce the amount of calculation for subsequent analysis. At m time nodes, the expression of the data set of n miners is:
[0210]
[0211] Step 1: Input data set F = {on}, MinPts is the minimum object parameter, ε is the radius parameter, and mark all objects in data set F as unread.
[0212] Step 2: Take a number of data objects p from the data set F to form a data set F q , where F q ∈F, q=1, 2, ..., and mark Fq as read.
[0213] Step 3: Analyze p through ε and MinPts parameters. If p is a core object, search all density-reachable data objects of p and mark them as read. If p is not a core object and no object is density-reachable to p, mark p as noise data.
[0214] Step 4: After meeting Repeat steps 2 and 3 until all data are marked as read.
[0215] Step 5: Select one of the core objects as a seed, classify all density-reachable points of the object into one category, and construct a larger set of data objects, which is called a cluster.
[0216] Step 6: Repeat step 5 until all core objects are traversed and the remaining unclassified data are noise points.
[0217] 6. Similarity detection:
[0218] Based on structure construction and clustering, n miners are divided according to their step data, and the miners' data sets that have been classified into the same cluster are further similarly judged based on their body temperature, heart rate, and blood oxygen. This embodiment uses the dynamic time warping (DTW) algorithm to measure the similarity between the body temperature, heart rate, and blood oxygen, i.e., vital sign data, between miners.
[0219] Assume that the normalized time series data of vital signs of two miners in the same cluster are x and y, with lengths e and f respectively, expressed as:
[0220]
[0221] In the formula, α∈[1,e], β∈[1,f], and the distance between the elements of xα and yβ is measured using the Euclidean distance.
[0222]
[0223] Where d(xα, yβ) represents the regular distance between the elements of xα and yβ, thus obtaining the following regular distance matrix, the specific formula is as follows:
[0224]
[0225] Where D exf is a regularized distance matrix.
[0226] Specific as Figure 2 As shown, the minimum regularization distance is from the first point in the lower left corner to the last point in the upper right corner. Find the minimum W. The specific formula is as follows:
[0227] W=w1+w2+…+w k
[0228] Where k∈[max(e,f),e+f-1],w k is the regularized distance between the two elements in xα and yβ, expressed as the cumulative regularized distance.
[0229] According to the three constraints, the constraints are pre-set. 1) Boundary condition: The direction of the shortest dynamic regularization path must follow from the first point in the lower left corner to the last point in the upper right corner. 2) Continuity: The midpoint of the shortest dynamic regularization path can only match with adjacent points. 3) Monotonicity: That is, the shortest dynamic regularization path can only be carried out in chronological order.
[0230] Determine the shortest dynamic regularization path. The specific formula is as follows:
[0231]
[0232] The sample data of miners in the same cluster are similarly judged pairwise in the above manner.
[0233] 7. Abnormal identification and judgment:
[0234] The similarity calculated by the dynamic time warping algorithm can identify abnormal data patterns. When the shortest dynamic time warping path DTW value of the vital signs data of two miners is less than the preset threshold, and there is obvious consistency in multiple dimensions, that is, the similarity is high, it is determined that there is abnormal behavior between the miners, that is, there is a situation of punching in for others.
[0235] This embodiment can comprehensively and effectively identify abnormal conditions underground, significantly improve the accuracy of abnormality identification, and thus provide a more reliable guarantee for abnormality identification underground.
[0236] Embodiment 2:
[0237] like Figure 4 As shown, this embodiment provides a downhole anomaly identification device based on dynamic time warping, the device comprising:
[0238] An acquisition unit 10 is used to acquire monitoring data of miners going down the mine;
[0239] The preprocessing unit 20 is connected to the acquisition unit 10 and is used to preprocess the monitoring data of the miner going down the mine to obtain the preprocessed monitoring data;
[0240] An extraction unit 30, connected to the preprocessing unit 20, for extracting the number of steps and vital signs of the personnel from the preprocessed monitoring data;
[0241] A clustering unit 40, connected to the extraction unit 30, is used to cluster the miners according to the number of steps of the personnel to obtain a plurality of miner clusters;
[0242] The warping unit 50 is connected to the clustering unit 40 and is used to obtain the similarity of vital signs between any two miners based on the same miner cluster according to dynamic time warping;
[0243] The identification unit 60 is connected to the regularization unit 50 and is used to identify the downhole abnormal data according to the similarity of the vital signs of the personnel, thereby completing the downhole abnormality identification based on dynamic time regularization.
[0244] As a specific implementation, the regularization unit 50 includes:
[0245] An acquisition module is used to obtain the time series data of life characteristics of two miners in the same miner cluster;
[0246] The mathematical expression of the time series data of the life characteristics of the two miners is as follows:
[0247]
[0248] In the formula, x represents the first miner among the two miners, y represents the second miner among the two miners, and ZS x Represents the time series data of the life characteristics of the first miner, ZS y represents the time series data of the second miner’s life characteristics, and e represents ZS x The data length, f represents ZS y The data length is α∈[1,e], β∈[1,f];
[0249] represents the normalized value of the life characteristic of the first miner at the αth time series, that is, the normalized value of the life characteristic of the xα element;
[0250] represents the normalized value of the life characteristic of the second miner at the βth time series, that is, the normalized value of the life characteristic of the yβ element;
[0251] A first calculation module, connected to the acquisition unit, for calculating the distance between the xα element and the yβ element in the life feature time series data;
[0252] The distance between the xα element and the yβ element is measured using the Euclidean distance, which is calculated as follows:
[0253]
[0254] A construction module, connected to the first calculation, for constructing a regular distance matrix according to the distance between the xα element and the yβ element;
[0255] The expression of the regularized distance matrix is as follows:
[0256]
[0257] Where D exf is the regularized distance matrix;
[0258] A second calculation module, connected to the construction module, is used to calculate the initial minimum regularization distance according to the regularization distance matrix;
[0259] The initial minimum regularization distance W d The calculation formula is as follows:
[0260] W d =w1+w2+…+w k ;
[0261] Where k∈[max(e,f),e+f-1],w k is the cumulative regularized distance between the xαth element and the yβth element;
[0262] A processing module connected to the second calculation module is used to set constraints and determine the shortest dynamic regularization path; and, according to the shortest dynamic regularization path, from the initial minimum regularization distance W d Determine the minimum regular distance of the target, that is, obtain the minimum regular distance W;
[0263] The expression of the shortest dynamic regularized path is as follows:
[0264]
[0265] Among them, DTW(Z SX , Z SY ) represents Z SX and Z SY The shortest dynamically regularized path between
[0266] The third calculation module is connected to the processing module and is used to calculate the similarity of the vital signs of two miners according to the minimum regularized distance W. The calculation formula is as follows:
[0267] Similarity = 1 / (1+W);
[0268] Among them, Similarity represents the similarity of vital signs between two miners;
[0269] A first determination module, connected to the third calculation module, is used to determine whether the similarity between the life feature time series data of any two miners in the same miner cluster has been calculated;
[0270] Among them, the acquisition module is connected to the first determination module, and is used to re-acquire the life feature time series data of other two miners in the same miner cluster when the first determination module determines that the similarity between the life feature time series data of any two miners in the same miner cluster has not been calculated.
[0271] As a specific implementation, the acquisition module includes:
[0272] The first acquisition submodule is used to acquire body temperature data;
[0273] The second acquisition submodule is used to acquire heart rate data;
[0274] The third acquisition submodule is used to acquire blood oxygen data;
[0275] a processing submodule, connected to the first acquisition submodule, the second acquisition submodule, and the third acquisition submodule, respectively, and used to preprocess and standardize the body temperature data, the heart rate data, and the blood oxygen data, respectively, to obtain standardized body temperature data, standardized heart rate data, and standardized blood oxygen data;
[0276] The combining submodule is connected to the processing submodule and is used to combine the standardized body temperature data, the standardized heart rate data and the standardized blood oxygen data to form a life characteristic matrix to obtain life characteristic data.
[0277] As a specific implementation, the identification unit 60 includes:
[0278] The second determination module is used to determine whether the similarity of the vital signs of two miners is highly consistent according to the similarity threshold;
[0279] If the similarity between the vital characteristics of any two miners exceeds a preset similarity threshold, the second determination module determines that the vital characteristics of the two miners are highly consistent; the similarity threshold is preset according to historical data or business requirements;
[0280] A third determination module is connected to the second determination module, and is used to determine whether there is abnormal behavior of punching in on behalf of others when the second determination module determines that the vital characteristics of the two miners are highly consistent;
[0281] Among them, if there are miners' vital characteristics that are highly consistent in the clock-in records, the third determination module determines that there is abnormal clock-in behavior on behalf of others;
[0282] The identification module is connected to the third determination module and is used to identify abnormal data of going down the well when the third determination module determines that it is an abnormal behavior of punching in on behalf of others.
[0283] The device in this embodiment can execute the method in embodiment 1.
[0284] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A method for identifying downhole anomalies based on dynamic time warping, characterized in that: The method comprises the following steps: Step S1: Acquire monitoring data of miners going down the mine; Step S3: extracting the number of steps and vital signs data of the personnel from the monitoring data; Step S4: clustering the miners according to the number of steps of the personnel to obtain multiple miner clusters; Step S5: Based on the clustering of the same miner, the similarity of vital signs between any two miners is obtained according to dynamic time warping; Step S6: According to the similarity of the vital signs of the personnel, the abnormal data of going downhole is identified, thereby completing the identification of downhole abnormalities based on dynamic time warping.
2. The method for identifying downhole anomalies based on dynamic time warping according to claim 1 is characterized in that: Before step S3, the method further includes step S2; Step S2: preprocessing the monitoring data of the miners going down the mine to obtain preprocessed monitoring data; The step S1 specifically includes the following steps: Replace the missing values in the monitoring data of the miner going down the mine with 0 to obtain 0 data; Calculate the proportion of 0 data in the monitoring data of the same group of miners going down the mine; According to the preset abnormal ratio threshold, it is determined whether the monitoring data of the miner going down the mine is abnormal: If the 0 data ratio exceeds the abnormal ratio threshold, it is determined that the monitoring data of the miner going down the mine is abnormal, and the process ends at the same time; if the 0 data ratio does not exceed the abnormal ratio threshold, it is determined that the monitoring data of the miner going down the mine is not abnormal, and the process goes to step S2 at the same time; Step S3 specifically includes: extracting the number of steps and vital signs data of the person from the preprocessed monitoring data.
3. The method for identifying downhole anomalies based on dynamic time warping according to claim 1 is characterized in that: The step S4 specifically includes the following steps: Step S41: Input data set F = {O n }, set the minimum object parameter MinPts and radius parameter ε; Among them, O n Represents the number of steps taken by the miner at a preset time node. The minimum object parameter MinPts is used to determine the domain range of the core object, and the radius parameter ε is used to define the scope of the search domain. The core object refers to an object in the data set that is within the given radius parameter ε and has at least MinPts neighbors. Step S42: Mark all objects in data set F as unread; Step S43: randomly select an unread object p from the data set F; Step S44: Check whether the unread object p is a core object: If the unread object p is a core object, search all density-reachable objects and mark them as read; Wherein, the density-reachable object refers to the reachable object located within the ε radius of the core object; Step S45: repeating steps S43 and S44 until all objects in the data set F are marked as read; Step S46: Select a core object as a seed, and classify all objects with density-reachable points into one category; Step S47: Select another unclassified core object as a seed, and classify all objects with density-reachable points thereof into another category; Step S48: Repeat step S47 until there are no unclassified core objects, thereby obtaining multiple miner clusters.
4. The method for identifying downhole anomalies based on dynamic time warping according to claim 1, characterized in that: The step S5 specifically includes the following steps: Step S51: Obtaining the life characteristic time series data of two miners in the same miner cluster; The mathematical expression of the time series data of the life characteristics of the two miners is as follows: In formula (1), x represents the first miner among the two miners, y represents the second miner among the two miners, and ZS x Represents the time series data of the life characteristics of the first miner, ZS y represents the time series data of the second miner’s life characteristics, and e represents ZS x The data length, f represents ZS y The data length is α∈[1,e], β∈[1,f]; represents the normalized value of the life characteristic of the first miner at the αth time series, that is, the normalized value of the life characteristic of the xα element; represents the normalized value of the life characteristic of the second miner at the βth time series, that is, the normalized value of the life characteristic of the yβ element; Step S52: Calculate the distance between the xα element and the yβ element in the life feature time series data; The distance between the xα element and the yβ element is measured using the Euclidean distance, and its calculation formula is as follows: Step S53: constructing a regular distance matrix according to the distance between the xα element and the yβ element; The expression of the regularized distance matrix is as follows: In formula (3), D exf is the regularized distance matrix; Step S54: Calculate the initial minimum regularization distance according to the regularization distance matrix; The initial minimum regularization distance W d The calculation formula is as follows: IN d =w1+w2+…+w k (4); In formula (4), k∈[max(e,f),e+f-1], w k is the cumulative regularized distance between the xαth element and the yβth element; Step S55: setting constraints to determine the shortest dynamic regularization path; and, based on the shortest dynamic regularization path, starting from the initial minimum regularization distance W d Determine the minimum regular distance of the target, that is, obtain the minimum regular distance W; The expression of the shortest dynamic regularization path is as follows: Among them, DTW(Z SX , Z SY ) represents Z SX and Z SY The shortest dynamically regularized path between Step S56: Calculate the similarity of vital signs between two miners according to the minimum regularized distance W, and the calculation formula is as follows: Similarity = 1 / (1+W) (6); Among them, Similarity represents the similarity of vital signs between two miners; Step S57: Repeat steps S51 to S56 until the similarity between the vital signs time series data of any two miners in the same miner cluster has been calculated, thereby obtaining the similarity of vital signs between any two miners.
5. The method for identifying downhole anomalies based on dynamic time warping according to claim 4 is characterized in that: The life characteristic time series data in step S51 is formed by arranging the life characteristic data in chronological order; The vital sign data is obtained based on body temperature data, heart rate data, and blood oxygen data, and specifically includes the following steps: Step S511: acquiring body temperature data, heart rate data and blood oxygen data respectively; Step S512: preprocessing and standardizing the body temperature data, the heart rate data, and the blood oxygen data respectively to obtain standardized body temperature data, standardized heart rate data, and standardized blood oxygen data; Step S513: combining the standardized body temperature data, the standardized heart rate data and the standardized blood oxygen data to form a life characteristic matrix to obtain life characteristic data.
6. The method for identifying downhole anomalies based on dynamic time warping according to any one of claims 1 to 5, characterized in that: The abnormal data of going down the well includes abnormal data of punching in on behalf of others; In the step S6, according to the similarity between the vital signs of the personnel, the abnormal data of going down the well is identified, which specifically includes the following steps: Step S61: Based on the similarity threshold, determine whether the similarity of the vital signs of the two miners is highly consistent: If the similarity of the vital characteristics of any two miners exceeds the preset similarity threshold, the vital characteristics of the two miners are determined to be highly consistent; Wherein, the similarity threshold is preset according to historical data or business requirements; Step S62: Based on the miners' clock-in records, when it is determined that the vital characteristics of two miners are highly consistent, it is determined that there is abnormal clock-in behavior on behalf of others, thereby identifying abnormal data going down the mine.
7. A downhole anomaly identification device based on dynamic time warping, characterized in that: The device comprises: An acquisition unit, used to acquire monitoring data of miners going down the mine; An extraction unit, connected to the acquisition unit, for extracting the number of steps and vital signs data of the personnel from the monitoring data; A clustering unit, connected to the extraction unit, for clustering the miners according to the number of steps of the personnel to obtain a plurality of miner clusters; A warping unit connected to the clustering unit, for obtaining the similarity of vital signs between any two miners based on the same miner cluster according to dynamic time warping; The identification unit is connected to the regularization unit and is used to identify the downhole abnormal data according to the similarity of the vital signs of the personnel, thereby completing the downhole abnormality identification based on dynamic time regularization.
8. The device for identifying downhole anomalies based on dynamic time warping according to claim 7 is characterized in that: The regularization unit comprises: An acquisition module is used to obtain the time series data of life characteristics of two miners in the same miner cluster; The mathematical expression of the time series data of the life characteristics of the two miners is as follows: In the formula, x represents the first miner among the two miners, y represents the second miner among the two miners, and ZS x Represents the time series data of the life characteristics of the first miner, ZS y represents the time series data of the second miner’s life characteristics, and e represents ZS x The data length, f represents ZS y The data length is α∈[1,e], β∈[1,f]; represents the normalized value of the life characteristic of the first miner at the αth time series, that is, the normalized value of the life characteristic of the xα element; represents the normalized value of the life characteristic of the second miner at the βth time series, that is, the normalized value of the life characteristic of the yβ element; A first calculation module, connected to the acquisition unit, for calculating the distance between the xα element and the yβ element in the life feature time series data; The distance between the xα element and the yβ element is measured using the Euclidean distance, which is calculated as follows: A construction module, connected to the first calculation, for constructing a regular distance matrix according to the distance between the xα element and the yβ element; The expression of the regularized distance matrix is as follows: Where D exf is the regularized distance matrix; A second calculation module, connected to the construction module, is used to calculate the initial minimum regularization distance according to the regularization distance matrix; The initial minimum regularization distance W d The calculation formula is as follows: IN d =w1+w2+…+w k ; Where k∈[max(e,f),e+f-1],w k is the cumulative regularized distance between the xαth element and the yβth element; A processing module connected to the second calculation module is used to set constraints and determine the shortest dynamic regularization path; and, according to the shortest dynamic regularization path, from the initial minimum regularization distance W d Determine the minimum regular distance of the target, that is, obtain the minimum regular distance W; The expression of the shortest dynamic regularized path is as follows: Among them, DTW(Z SX , Z SY ) represents Z SX and Z SY The shortest dynamically regularized path between The third calculation module is connected to the processing module and is used to calculate the similarity of the vital signs of two miners according to the minimum regularized distance W. The calculation formula is as follows: Similarity = 1 / (1+W); Among them, Similarity represents the similarity of vital signs between two miners; A first determination module, connected to the third calculation module, is used to determine whether the similarity between the life feature time series data of any two miners in the same miner cluster has been calculated; Among them, the acquisition module is connected to the first determination module, and is used to re-acquire the life feature time series data of other two miners in the same miner cluster when the first determination module determines that the similarity between the life feature time series data of any two miners in the same miner cluster has not been calculated.
9. The device for identifying downhole anomalies based on dynamic time warping according to claim 8, characterized in that: The acquisition module comprises: The first acquisition submodule is used to acquire body temperature data; The second acquisition submodule is used to acquire heart rate data; The third acquisition submodule is used to acquire blood oxygen data; a processing submodule, connected to the first acquisition submodule, the second acquisition submodule, and the third acquisition submodule, respectively, and used to preprocess and standardize the body temperature data, the heart rate data, and the blood oxygen data, respectively, to obtain standardized body temperature data, standardized heart rate data, and standardized blood oxygen data; The combining submodule is connected to the processing submodule and is used to combine the standardized body temperature data, the standardized heart rate data and the standardized blood oxygen data to form a life characteristic matrix to obtain life characteristic data.
10. The downhole anomaly identification device based on dynamic time warping according to any one of claims 7 to 9, characterized in that: The identification unit comprises: The second determination module is used to determine whether the similarity of the vital signs of two miners is highly consistent according to the similarity threshold; If the similarity between the vital characteristics of any two miners exceeds a preset similarity threshold, the second determination module determines that the vital characteristics of the two miners are highly consistent; the similarity threshold is preset according to historical data or business requirements; A third determination module is connected to the second determination module, and is used to determine whether there is abnormal behavior of punching in on behalf of others when the second determination module determines that the vital characteristics of the two miners are highly consistent; Among them, if there are miners' vital characteristics that are highly consistent in the clock-in records, the third determination module determines that there is abnormal clock-in behavior on behalf of others; The identification module is connected to the third determination module and is used to identify abnormal data of going down the well when the third determination module determines that it is an abnormal behavior of punching in on behalf of others.