A safety monitoring system for accurate positioning of personnel in a coal mine

By constructing an arrival time matrix and a difference vector sequence, and combining it with an attention-enhanced long short-term memory network model, the probability value of the identification card arriving at the electronic fence in the future is predicted. This solves the shortcomings of the existing technology in post-event response and instantaneous motion state prediction, and realizes accurate early warning of dangerous areas downhole.

CN122135540APending Publication Date: 2026-06-02BEIJING TANGBAI COMM TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING TANGBAI COMM TECH
Filing Date
2026-04-15
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing coal mine underground personnel positioning and safety monitoring systems, the early warning method based on real-time location comparison is a reactive response and cannot provide sufficient time for evacuation; trajectory prediction based on instantaneous motion state is not accurate enough in scenarios with sudden changes in direction, such as roadway intersections, and is prone to missed or false alarms.

Method used

An arrival time matrix for multiple consecutive upload cycles is constructed. The arrival time differences of each substation are extracted and stacked into a difference vector sequence. A long short-term memory network prediction model with attention mechanism enhancement is used to learn motion pattern features from historical trajectory data, predict the probability value of the identification card arriving at the electronic fence entrance in the future, and generate early warning instructions through probability threshold grading.

Benefits of technology

It enables the early identification of personnel's intention to enter dangerous areas before they do, allowing sufficient reaction time for evacuation, reducing the rate of missed and false alarms, and achieving accurate and early warning of dangerous areas in mines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122135540A_ABST
    Figure CN122135540A_ABST
Patent Text Reader

Abstract

This invention discloses a safety monitoring system for precise personnel positioning in coal mines, belonging to the field of personnel positioning technology. Specifically, it includes: a signal matrix construction module that organizes the arrival times of identification cards into an arrival time matrix according to cycles and substations; a difference vector construction module that extracts the arrival time differences between adjacent cycles for each substation and stacks them into a difference vector sequence; a trajectory prediction module that inputs the difference vector sequence into a prediction model and outputs the probability value of the identification card arriving at the coordinates of each electronic fence entrance; and an early warning generation module that generates an early warning command when the probability value is greater than a probability threshold, and a scheduling and sending module that sends the early warning command to a converged communication scheduling server, which then sends the early warning message to the wireless terminal. This invention achieves early warning through a combination of time series analysis and a prediction model, improving the timeliness of underground safety monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of personnel positioning technology, and specifically to a safety monitoring system for precise positioning of personnel in underground coal mines. Background Technology

[0002] The underground working environment in coal mines is complex, with numerous hazards such as gas, coal dust, and water inrush, placing extremely high demands on real-time location monitoring and early warning of dangerous areas for underground personnel. With the development of Internet of Things (IoT) technology, precise positioning systems for underground personnel in coal mines based on UWB technology have been widely applied. These systems utilize card reader substations deployed underground and identification cards carried by personnel to collect real-time pulse signal arrival times between the identification cards and each substation, thereby calculating the personnel's location coordinates and achieving continuous location tracking of underground personnel.

[0003] Currently, underground personnel positioning and safety monitoring systems in coal mines typically trigger early warnings by comparing real-time location with electronic fence boundaries. Specifically, the system pre-defines electronic fence boundaries for hazardous or restricted areas on the roadway map, calculates the location coordinates of identification tags in real time, and immediately sends an alarm to the dispatch center and an evacuation command to the personnel terminal when the current location coordinates of the identification tag fall within the electronic fence boundary. Some systems have added a trajectory prediction function, which calculates the tag's location over a future period based on its current speed and direction, and issues an early warning when the predicted location intersects with the electronic fence boundary.

[0004] However, existing technologies have limitations in their early warning triggering mechanisms. Early warning methods based on real-time location comparison are essentially reactive, triggering an alarm only after personnel have entered the danger zone boundary, failing to provide sufficient time for personnel to react and avoid danger. Trajectory prediction based on current movement speed and direction relies solely on the movement state at a single moment, neglecting the continuity and periodicity of personnel's movement trajectories over time. When a sudden change in movement direction occurs near an intersection, the prediction results deviate significantly, easily leading to missed or false alarms. Furthermore, existing systems do not fully utilize the temporal variation patterns of arrival time data collected from multiple card reader stations during the prediction process, failing to learn the movement patterns of personnel before entering the danger zone from historical trajectory data, resulting in a difficulty in simultaneously achieving both early warning lead time and accuracy. Summary of the Invention

[0005] The purpose of this invention is to provide a safety monitoring system for precise positioning of personnel underground in coal mines, and to solve the following technical problems: Existing technologies that rely on real-time location comparison for early warning are reactive and cannot provide sufficient time for personnel to take shelter. Meanwhile, trajectory prediction based on instantaneous motion states does not consider the temporal continuity of the trajectory and is not accurate enough in scenarios with sudden changes in direction, such as at alleyway intersections, which can easily lead to missed or false alarms.

[0006] The objective of this invention can be achieved through the following technical solutions: A safety monitoring system for precise positioning of personnel underground in coal mines includes: The signal matrix construction module is used to obtain the pulse signals received by each substation from the identification card in multiple consecutive upload cycles, parse the identification card code, substation number and arrival time from the pulse signals, and organize the arrival time into an arrival time matrix according to the cycle and substation. The difference vector construction module is used to extract the arrival time difference between adjacent periods of each station from the arrival time matrix, arrange the arrival time differences of all stations in the same period into a difference vector, and stack the difference vectors of multiple periods into a difference vector sequence. The electronic fence reading module is used to read the pre-stored electronic fence boundary coordinates and entrance coordinates in the lane map. Each electronic fence consists of multiple coordinate points forming a closed boundary and corresponding to an entrance coordinate sequence. The trajectory prediction module is used to input the difference vector sequence into the prediction model. The prediction model outputs the probability value of the identification card reaching the coordinates of each electronic fence entrance in the future period, and the electronic fence with the highest probability value is taken as the target electronic fence. The early warning generation module is used to generate an early warning instruction containing the identification card code, the current period timestamp, the target electronic fence code, and the probability value when the probability value corresponding to the target electronic fence is greater than the probability threshold. The scheduling and sending module is used to send the early warning command to the converged communication scheduling server. The server retrieves the wireless terminal number according to the identification card code, selects the early warning message template according to the target electronic fence code, replaces the probability placeholder in the template with the probability value, generates the early warning message, and sends it to the wireless terminal.

[0007] As a further aspect of the present invention: the specific steps in the signal matrix construction module for organizing arrival times into an arrival time matrix are as follows: Multiple consecutive upload cycles are numbered sequentially from the first cycle to the Nth cycle. The substations in the underground roadway are numbered sequentially from the first substation to the Mth substation. An N x M matrix of arrival times is constructed. The element in the i-th row and j-th column of the arrival time matrix stores the arrival time value of the identification card when it is received by the j-th substation in the i-th upload cycle. When the identification card is not received by the j-th substation, the arrival time values ​​of the j-th substation in the (i-1)-th cycle and the j-th substation in the (i+1)-th cycle are retrieved from the historical arrival time matrix. The average of these two values ​​is calculated and filled into the corresponding position in the i-th row and j-th column of the matrix. This position is then marked as an interpolation compensation point. The non-empty elements and interpolation compensation point elements in each row of the arrival time matrix are extracted in substation number order and associated with the identification card code of the corresponding cycle, then stored in the cache.

[0008] As a further aspect of the present invention: the specific steps in the difference vector construction module for stacking multiple periodic difference vectors into a difference vector sequence are as follows: Read the arrival time values ​​corresponding to the same substation number in the i-th and i-1-th periods from the arrival time matrix. When both values ​​are the original collected values, calculate the difference between the arrival time value in the i-th period and the arrival time value in the i-1-th period as the standard arrival time difference. When any of the values ​​is an interpolation compensation point, the arrival time values ​​of the (j-1)th and (j+1)th substations in the i-th period are read from the arrival time matrix. The average of the two values ​​is calculated. Then, the difference between the arrival time value of the j-th substation in the (i-1)-th period and the average value is calculated as the substitution difference. The standard arrival time difference and substitution difference corresponding to all substations in the i-th period are arranged in the order of substation number to form the difference vector of the i-th period. Each element in the difference vector is attached with a difference type flag bit to distinguish the standard arrival time difference and the substitution difference. The difference vectors of the 2nd to Nth periods are stacked in the order of period number to form a difference vector sequence.

[0009] As a further aspect of the present invention: the pre-storage method for the electronic fence boundary coordinates and entrance coordinates in the electronic fence reading module is as follows: In the lane map database, an independent data table is established for each electronic fence. The data table stores the electronic fence's code, hazard level code, and boundary coordinate point set. The boundary coordinate point set stores multiple coordinate points in sequence according to the lane direction. Each coordinate point contains x-axis coordinate value, y-axis value, and z-axis value. The line connecting adjacent coordinate points constitutes the boundary line segment of the electronic fence. The line connecting the first and last coordinate points closes the electronic fence. The entrance coordinate sequence is stored in an additional field of the electronic fence data table. The entrance coordinate sequence consists of multiple coordinate points, each of which corresponds to an entrance position of the alleyway into the electronic fence. The entrance coordinate sequence is arranged sequentially according to the direction of passage from the outside into the electronic fence. For the path segment between two adjacent coordinate points in the entrance coordinate sequence, the slope and width data of the path segment are read from the alleyway map database and stored in association with the entrance coordinate sequence.

[0010] As a further aspect of the present invention: in the trajectory prediction module, the input-output structure and training method of the prediction model are as follows: The prediction model employs an attention-enhanced long short-term memory network structure. The input layer receives a fixed-length difference vector sequence as input data. An attention layer is inserted between the hidden layer and the output layer. The attention layer calculates the cosine similarity between the output state at each time step and the output state at the last time step as a weight coefficient. The output states at each time step are multiplied by the corresponding weight coefficients and then summed to obtain the attention vector. The attention vector is used as the input to the fully connected layer. The output layer of the prediction model adopts a hierarchical Softmax structure. The output nodes are grouped according to the alleyway area belonging to the electronic fence. The output nodes corresponding to the electronic fence in the same alleyway area share some network parameters of the fully connected layer. The training data of the prediction model consists of the difference vector sequence of historical records and the corresponding actual electronic fence codes. The actual electronic fence codes are obtained by recording the boundary crossing event triggered when the identification card enters the electronic fence boundary. During the training process, the periodic data for which no boundary crossing event has occurred are used to participate in the training with a negative sampling strategy.

[0011] As a further aspect of the present invention: in the trajectory prediction module, the specific process of inputting the difference vector sequence into the prediction model to output the probability value is as follows: Extract the difference vectors of the most recent K consecutive periods from the difference vector sequence. The value of K is the same as the number of sequence periods set in the input layer of the prediction model. Arrange the extracted K difference vectors in chronological order to form an input tensor. Pass the input tensor into the input layer of the Long Short-Term Memory network. The input layer passes the difference vector of each period to the memory unit of the hidden layer in sequence. The memory unit of the hidden layer updates its internal state and output state in chronological order. The output states of all time steps are fed into the attention layer. The attention layer calculates the cosine similarity between the output state of each time step and the output state of the last time step as a weight coefficient. The output states of each time step are multiplied by the corresponding weight coefficient and then summed to obtain the attention vector. The attention vector is then fed into the fully connected layer for transformation. The output of the fully connected layer is then fed into the hierarchical Softmax output layer. The hierarchical Softmax output layer first determines the alleyway region to which the target electronic fence belongs, and then calculates the probability value corresponding to each electronic fence in the electronic fence subset of the alleyway region.

[0012] As a further aspect of the present invention: the specific steps for generating warning instructions in the warning generation module are as follows: Extract the probability value corresponding to the target electronic fence from the probability value output by the prediction model, and compare the probability value with the preset probability threshold. The preset probability threshold is calculated by weighting the electronic fence's hazard level and the slope data of the entrance path. When the probability value corresponding to the target electronic fence is greater than the probability threshold, the timestamp of the current period is read from the arrival time matrix, and the historical record count of the target electronic fence being selected as the target electronic fence in the previous period is read. The number of consecutive warnings is obtained by incrementing the historical record count. The identification card code, the timestamp of the current period, the code of the target electronic fence, the probability value and the number of consecutive warnings are assembled into a binary data packet according to the preset instruction format. The prefix field of the binary data packet stores the instruction type identifier, and the suffix field stores the check code.

[0013] As a further aspect of the present invention: in the scheduling and sending module, the specific steps for the server to retrieve the wireless terminal number based on the identification card code and generate an early warning message are as follows: After receiving the early warning instruction, the converged communication scheduling server parses the identification card code, current period timestamp, target electronic fence code, probability value, and number of consecutive early warnings from the binary data packet of the early warning instruction. The server uses the identification card code as an index to query the personnel terminal association table to obtain the wireless terminal number, and uses the target electronic fence code as an index to query the early warning message template library to obtain the corresponding early warning message template. The early warning message template contains fixed text content, probability placeholders, and number of times placeholders. The server converts the probability value into a percentage string and replaces the probability placeholder. It also converts the number of consecutive warnings into a number string and replaces the number placeholder. The server then encapsulates the replaced text content in a short message format and sends it to the wireless terminal number. When the number of consecutive warnings exceeds the number threshold, the server sends a voice broadcast command to the broadcast substation in the area where the target electronic fence is located. The voice broadcast command includes the path information for converting the replaced text content into a voice file.

[0014] The beneficial effects of this invention are: This invention constructs an arrival time matrix spanning multiple consecutive upload cycles, extracting the arrival time differences of each card reader station from a time dimension and stacking them into a difference vector sequence. This transforms the movement process of personnel into time-series data, providing feature input reflecting the continuity of movement for subsequent predictions. Based on this, the invention inputs the difference vector sequence into a Long Short-Term Memory (LSTM) network prediction model enhanced with an attention mechanism. This model learns the movement pattern features of personnel before entering the electronic fence from historical trajectory data and weights the output states at different time steps through an attention layer, highlighting the contribution of movement information at key time points to the prediction results. It outputs the probability value of the identification card arriving at the coordinates of each electronic fence entrance in the future. Compared to prediction methods that rely solely on instantaneous movement states, this invention, through the combination of time-series analysis and deep learning models, can identify the intention of personnel to enter a dangerous area before they do, allowing sufficient reaction time for hazard avoidance. When the probability value exceeds a probability threshold weighted by hazard level and entrance slope, this invention generates a tiered early warning instruction containing the number of consecutive warnings. The integrated communication scheduling server selects the corresponding template based on the warning instruction to generate an early warning message and sends it to the wireless terminal. Simultaneously, when the number of consecutive warnings exceeds the threshold, the broadcast substation broadcasts a voice message. Through the probability threshold-based tiered warning mechanism and multi-channel linkage, this invention can effectively reduce the false alarm rate and missed alarm rate in scenarios with sudden directional changes, such as at roadway intersections, achieving accurate and early warning of dangerous underground areas. Attached Figure Description

[0015] The invention will now be further described with reference to the accompanying drawings.

[0016] Figure 1 This is a schematic diagram of the modules of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Please see Figure 1 As shown, the present invention is a safety monitoring system for precise positioning of personnel underground in coal mines, comprising: The signal matrix construction module is used to obtain the pulse signals received by each substation from the identification card in multiple consecutive upload cycles, parse the identification card code, substation number and arrival time from the pulse signals, and organize the arrival time into an arrival time matrix according to the cycle and substation. The difference vector construction module is used to extract the arrival time difference between adjacent periods of each station from the arrival time matrix, arrange the arrival time differences of all stations in the same period into a difference vector, and stack the difference vectors of multiple periods into a difference vector sequence. The electronic fence reading module is used to read the pre-stored electronic fence boundary coordinates and entrance coordinates in the lane map. Each electronic fence consists of multiple coordinate points forming a closed boundary and corresponding to an entrance coordinate sequence. The trajectory prediction module is used to input the difference vector sequence into the prediction model. The prediction model outputs the probability value of the identification card reaching the coordinates of each electronic fence entrance in the future period, and the electronic fence with the highest probability value is taken as the target electronic fence. The early warning generation module is used to generate an early warning instruction containing the identification card code, the current period timestamp, the target electronic fence code, and the probability value when the probability value corresponding to the target electronic fence is greater than the probability threshold. The scheduling and sending module is used to send the early warning command to the converged communication scheduling server. The server retrieves the wireless terminal number according to the identification card code, selects the early warning message template according to the target electronic fence code, replaces the probability placeholder in the template with the probability value, generates the early warning message, and sends it to the wireless terminal.

[0019] In a preferred embodiment of the present invention, the specific steps of organizing the arrival times into an arrival time matrix in the signal matrix construction module are as follows: During the operation of the precise personnel positioning system in coal mines, identification cards continuously upload UWB pulse signals at fixed time intervals. The signal matrix construction module first parses the identification card's identity code, substation number, and arrival time value from the received pulse signals. To construct an arrival time matrix that reflects the time-series characteristics of personnel movement trajectories, the module numbers multiple consecutive upload cycles in chronological order; for example, the 10 most recent upload cycles before the current moment are sequentially numbered as the first cycle, the second cycle, and so on up to the tenth cycle. Simultaneously, all pre-deployed card-reading substations in the underground roadways are numbered sequentially according to their installation location; for example, the first substation at the entrance of the underground roadway is numbered as the first substation, and so on along the roadway until the Mth substation.

[0020] The module constructs an N-row, M-column arrival time matrix, where N is the number of upload cycles and M is the number of card reader stations. The element in the i-th row and j-th column of the arrival time matrix stores the arrival time value when the identification card is received by the j-th station in the i-th upload cycle. When the identification card is successfully received by the j-th station in the i-th upload cycle, the module directly stores the parsed arrival time value into the corresponding position in the i-th row and j-th column of the matrix. When the identification card is not received by the j-th station in the i-th upload cycle, the data at that position is missing. To maintain the integrity of the arrival time matrix, the module initiates an interpolation compensation mechanism. The module searches for the arrival time value of the j-th station in the i-th minus 1-th cycle and the arrival time value of the j-th station in the i-th plus 1-th cycle from the historical arrival time matrix. If both values ​​exist, the module calculates the average of the two values, fills the average value into the corresponding position in the i-th row and j-th column of the matrix, and marks this position as the interpolation compensation point. Interpolation compensation point markers are used to distinguish between original acquired data and compensation data in subsequent steps, preventing compensation data from being mistakenly identified as real acquired data and included in the difference calculation. If data from the i-th minus 1 period or the i-th plus 1 period is also missing, the module continues to trace forward or backward to the i-th minus 2 period and the i-th plus 2 period until two valid arrival time values ​​are found, and then the average value is calculated to fill the gap. After the above processing, each position in the arrival time matrix is ​​assigned a value, which is either the original acquired arrival time or the compensation value calculated by interpolating the data from the preceding and following periods.

[0021] After completing the matrix construction, the module extracts the non-empty elements and interpolation compensation point elements of each row in the arrival time matrix in ascending order of the substation number. For example, for the first period, the module extracts the arrival time values ​​corresponding to the first substation to the Mth substation, forming the arrival time vector for the first period. The module associates the arrival time vector of each period with the identification card code for that period and stores them together in the cache for subsequent use by the difference vector construction module. In this way, the signal matrix construction module organizes the arrival time data received by each substation from the identification card in multiple consecutive upload periods into a structured arrival time matrix, providing a data foundation for subsequent analysis of the time series characteristics of personnel movement.

[0022] In another preferred embodiment of the present invention, the specific steps of stacking multiple periodic difference vectors into a difference vector sequence in the difference vector construction module are as follows: The difference vector construction module reads the arrival time matrix generated by the signal matrix construction module from the buffer. The module first reads the arrival time values ​​corresponding to the same substation number in the i-th and i-1-th cycles from the arrival time matrix. For example, when i is 2, the module reads the arrival time values ​​of the first substation in the second cycle and the first substation in the first cycle. The module determines the type of these two values, i.e., whether they are raw acquisition values ​​or interpolation compensation point values. When both values ​​are raw acquisition values, the module calculates the difference between the arrival time value in the i-th cycle and the arrival time value in the i-1-th cycle, and uses this calculated difference as the standard arrival time difference. The standard arrival time difference reflects the change in distance between the identification card and the reading substation within adjacent cycles, and this change is related to the movement direction and speed of the identification card.

[0023] When the arrival time value corresponding to the i-th cycle is an interpolation compensation point, or when the arrival time value corresponding to the i-th minus 1-th cycle is an interpolation compensation point, the module does not directly calculate the difference, but instead initiates a substitution difference calculation mechanism. The module reads the arrival time values ​​of the j-th minus 1-th and j+1-th substations in the i-th cycle from the arrival time matrix. The j-th minus 1-th and j+1-th substations are adjacent substations of the j-th substation on the roadway direction. For example, when the j-th substation is numbered 5, the module reads the arrival time values ​​of the 4th substation in the 5th cycle and the 6th substation in the 5th cycle. The module calculates the average of the arrival time values ​​of these two adjacent substations, and then calculates the difference between the arrival time value of the j-th substation in the i-th minus 1-th cycle and this average value, using the calculated difference as the substitution difference. The calculation logic of the substitution difference is based on the following consideration: when the data of a certain substation is missing, the location information of the substation can be approximately estimated from the data of its adjacent substations, and the average arrival time of adjacent substations can reflect the approximate location of the tag in the area.

[0024] The module arranges the standard time-of-arrival (STOA) and substitution differences for all substations within the i-th period in ascending order of substation number, forming the difference vector for the i-th period. Each element in the difference vector is accompanied by a difference type flag, which distinguishes between STOA and substitution differences. For example, the difference type flag can be binary encoded, with 0 representing STOA and 1 representing substitution. The module processes periods 2 through N in the same manner to obtain the difference vector for each period. Finally, the module stacks the difference vectors from period 2 to N in ascending order of period number, forming a difference vector sequence. The difference vector sequence has N minus 1 rows multiplied by M columns, where each row corresponds to the difference vector for one upload period, and each column corresponds to a substation number. The difference vector sequence serves as the input feature for the subsequent prediction model, reflecting the dynamic pattern of the distance changes between the identification card and each substation over multiple consecutive periods.

[0025] In another preferred embodiment of the present invention, the pre-storage method for the electronic fence boundary coordinates and entrance coordinates in the electronic fence reading module is as follows: In the roadway map database, the electronic fence reading module establishes an independent data table for each electronic fence. Each electronic fence corresponds to a key monitored area in the underground roadway, such as a goaf, a coal and gas outburst hazard zone, a rock burst hazard zone, or a restricted area for mechanical equipment operations. The data table first stores the electronic fence's code; for example, the goaf fence is coded as AREA001, and the coal and gas outburst hazard zone fence is coded as AREA002. The data table also stores the electronic fence's hazard level code, which is used to adjust the probability threshold when generating subsequent early warning commands; for example, high-risk areas are coded as level 1, and medium-risk areas are coded as level 2.

[0026] The data table stores the set of boundary coordinate points for the electronic fence. The set of boundary coordinate points stores multiple coordinate points sequentially according to the direction of the lane, with each coordinate point containing x-axis, y-axis, and z-axis coordinate values. The coordinate point set is collected as follows: staff walk along the boundary of the electronic fence, collecting a coordinate point at regular intervals. The distance between adjacent coordinate points is controlled between 0.5 meters and 1 meter to ensure the accuracy of the boundary description. The line connecting any two adjacent coordinate points in the boundary coordinate point set constitutes the boundary segment of the electronic fence. The line connecting the first and last coordinate points closes the electronic fence, forming a closed area.

[0027] The additional fields in the electronic fence data table store the entrance coordinate sequence. The entrance coordinate sequence consists of multiple coordinate points, each corresponding to a roadway entrance location into the electronic fence. For example, for a goaf fence, its entrance might be the passageway where the goaf and transport roadway intersect; the entrance coordinate sequence stores the coordinate points at that passageway entrance. For electronic fences with multiple entrances along the roadway direction, the entrance coordinate sequence arranges the coordinate points sequentially according to the direction of entry from the outside. For example, if the area covered by the electronic fence has two entrances, one on the east side and one on the west side, the entrance coordinate sequence stores the coordinate points of the east and west entrances sequentially.

[0028] For a path segment between two adjacent coordinate points in the entrance coordinate sequence, the module reads the slope and width data of that path segment from the lane map database and stores them in association with the entrance coordinate sequence. The slope data is represented by angle values, such as 5 degrees or 15 degrees between the path segment and the horizontal plane. The width data is represented by length values, such as 3.5 meters or 4.2 meters in width of the lane containing the path segment. The slope and width data are used to weight the entry difficulty of different entrances during subsequent prediction model training. Entrances with steeper slopes or narrower widths correspond to higher entry difficulties, and the threshold is correspondingly lowered during probability threshold calculation to improve the early warning sensitivity for difficult entrances. Through this pre-storage method, the electronic fence reading module provides the subsequent trajectory prediction module with structured electronic fence boundary data, entrance data, and path feature numbers.

[0029] In another preferred embodiment of the present invention, the input-output structure and training method of the prediction model in the trajectory prediction module are as follows: The core of the trajectory prediction module is a Long Short-Term Memory (LSTM) network model enhanced with an attention mechanism. The model's task is to predict the probability of a card entering various electronic fences in future cycles based on the card's motion characteristics over multiple past upload cycles. The model first needs to determine the format of the input data. The input layer receives a fixed-length sequence of difference vectors as input data, derived from the data output by the difference vector construction module. The fixed length refers to the number of sequence cycles set by the input layer; for example, if set to 10 cycles, the model receives the difference vector sequence of the most recent 10 cycles as input each time. Each difference vector contains M elements, where M is the number of card reader stations in the underground tunnels; therefore, the input data has a dimension of 10 rows multiplied by M columns.

[0030] The hidden layers of a Long Short-Term Memory (LSTM) network consist of multiple memory units, each corresponding to a time step. The hidden layers extract temporal features from the input sequence. An attention layer is inserted between the hidden and output layers. The purpose of the attention layer is to allow the model to automatically focus on time steps in the input sequence that contribute more to the prediction result. The attention layer calculates the cosine similarity between the output state of each time step and the output state of the last time step as a weight coefficient. The cosine similarity is calculated by dividing the dot product of two vectors by the product of their magnitudes; the result is between -1 and 1, with a higher value indicating greater directional similarity. The attention layer multiplies the output states of each time step by their corresponding weight coefficients and then sums the results to obtain an attention vector. This attention vector integrates information from the entire time series while highlighting the features of key time steps through the weight coefficients. The attention vector serves as the input to the fully connected layer, which transforms it to a dimension suitable for the output layer to process.

[0031] The output layer of the prediction model employs a hierarchical Softmax structure. The core idea of ​​this structure is to group all electronic fences according to their affiliation to different roadway areas. For example, underground roadways can be divided into multiple areas such as the east wing, west wing, and central main roadway, each containing multiple electronic fences. The output layer first determines the roadway area to which the target electronic fence belongs, and then calculates the specific probability value within the subset of electronic fences in that area. Output nodes corresponding to electronic fences within the same roadway area share a portion of the network parameters from the fully connected layer. This structure reduces the number of model parameters while utilizing the spatial correlation between electronic fences within the same area.

[0032] The training data for the prediction model consists of a sequence of historical difference vectors and the corresponding actual arrival geofence codes. The actual arrival geofence codes are obtained as follows: when an identification card enters a geofence boundary, the system triggers a boundary crossing event, recording the time of the event and the geofence code the card entered. The sequence of difference vectors from multiple consecutive periods prior to this event is used as input samples, and the geofence code is used as the sample label to construct a training dataset. During training, a negative sampling strategy is used for periodic data where no boundary crossing event occurred. Specifically, a sequence of difference vectors is randomly selected from the time period without a boundary crossing event as negative samples, and the label is set to empty or a specific negative class code. The negative sampling strategy enables the model to learn feature patterns from non-entry states, preventing the model from predicting all inputs as positive and improving its discriminative ability. During training, the cross-entropy loss function is used to update network parameters, and the weight parameters of the Long Short-Term Memory network, attention layer, and fully connected layer are optimized using the backpropagation algorithm to minimize the difference between the model's output probability distribution and the true label.

[0033] In another preferred embodiment of the present invention, the specific process of inputting the difference vector sequence into the prediction model to output the probability value in the trajectory prediction module is as follows: When it is necessary to predict the future movement intention of the identification card, the trajectory prediction module extracts the most recent K consecutive period difference vectors from the difference vector sequence output by the difference vector construction module. The value of K is the same as the number of sequence periods set in the input layer of the prediction model. For example, if the input layer is set to 10 periods, then K equals 10. The module arranges the extracted K difference vectors in chronological order to form an input tensor. The input tensor has a shape of 10 rows by M columns, where M is the number of card reader stations.

[0034] The module feeds the input tensor into the input layer of the Long Short-Term Memory (LSTM) network. The input layer sequentially passes the difference vector for each cycle to the memory units of the hidden layer. Using the difference vector from the first cycle as the input for the first time step, the memory units update their internal and output states based on the current input and the hidden state from the previous time step. Then, using the difference vector from the second cycle as the input for the second time step, the memory units again update their internal and output states. In this way, the hidden layer's memory units process the input data for K cycles sequentially according to the time step order, producing one output state for each time step. Finally, K output states are obtained, each corresponding to one time step.

[0035] The module feeds the output states of all K time steps into the attention layer. The attention layer calculates the cosine similarity between the output state of each time step and the output state of the last time step. The output state of the last time step represents the hidden state at the current moment, containing the latest motion information. The cosine similarity of each time step is used as a weight coefficient for the output state of that time step; time steps with higher cosine similarity receive higher weights. The attention layer multiplies the output states of each time step by their corresponding weight coefficients and then sums them to obtain an attention vector. This attention vector contains the motion trajectory information of the entire time series and, through weight coefficients, reinforces the contribution of historical time steps with high similarity to the current moment's motion trend.

[0036] The module passes the attention vector to the fully connected layer for transformation. The fully connected layer transforms the dimension of the attention vector to a dimension suitable for processing by the hierarchical Softmax output layer through matrix multiplication and bias addition. The module then passes the output of the fully connected layer to the hierarchical Softmax output layer. The hierarchical Softmax output layer first determines the alleyway area to which the target electronic fence belongs. This step is implemented through a region classification network, which determines the area where the identification card is most likely to enter based on the output of the fully connected layer. After determining the region, the hierarchical Softmax output layer calculates the probability value corresponding to each electronic fence within the subset of electronic fences contained in that region. The probability value is calculated using the Softmax function, which converts the output value corresponding to each electronic fence in the region into a probability between 0 and 1, and the sum of the probability values ​​of all electronic fences in the region is 1. The electronic fence code with the highest final output probability value is the target electronic fence predicted by the model, and this probability value serves as the basis for generating subsequent warning commands.

[0037] In another preferred embodiment of the present invention, the specific steps for generating an early warning instruction in the early warning generation module are as follows: The warning generation module obtains the probability values ​​output by the prediction model from the trajectory prediction module. The probability values ​​output by the prediction model are an array containing the probabilities corresponding to all electronic fences. For example, for three electronic fences numbered AREA001, AREA002, and AREA003, the prediction model outputs probability values ​​of 0.05, 0.85, and 0.10, respectively. The electronic fence with the highest probability value is the target electronic fence. The warning generation module first extracts the probability value corresponding to the target electronic fence. In this example, the target electronic fence is AREA002, and its corresponding probability value is 0.85.

[0038] The module compares the extracted probability values ​​with preset probability thresholds. These thresholds are not fixed but are calculated by weighting the risk level of the electronic fence with the slope data of the entrance path. Risk level codes are pre-stored in the electronic fence data table; for example, a risk level code of 1 corresponds to a high-risk area, 2 to a medium-risk area, and 3 to a low-risk area. The slope data of the entrance path is also stored in the electronic fence data table, linked to the entrance coordinate sequence; for example, a slope of 5 degrees indicates a gentle entrance path, and a slope of 15 degrees indicates a steep entrance path. The module determines a baseline threshold based on the risk level code; for example, the baseline threshold for risk level 1 is 0.30, for risk level 2 it is 0.50, and for risk level 3 it is 0.70. The module then adjusts the baseline threshold based on the slope data, decreasing it by 0.01 for every 1-degree increase in slope. For example, for an electronic fence with risk level 1 and a slope of 15 degrees, the final probability threshold is 0.30 minus 15 multiplied by 0.01, resulting in 0.15. For an electronic fence with a hazard level of 1 and a slope of 5 degrees, the final probability threshold is 0.30 minus 5 multiplied by 0.01, resulting in 0.25. For an electronic fence with a hazard level of 2 and a slope of 15 degrees, the final probability threshold is 0.50 minus 15 multiplied by 0.01, resulting in 0.35. Through this weighted calculation method, electronic fences with higher hazard levels or steeper entry paths correspond to lower probability thresholds, making it easier for the model's predicted probability to reach the trigger condition.

[0039] When the probability value corresponding to the target electronic fence is greater than the probability threshold corresponding to that electronic fence, the module initiates the early warning command generation process. The module reads the timestamp of the current upload period from the arrival time matrix. The timestamp of the current upload period is obtained during the pulse signal parsing process, for example, 14:35:22 on March 23, 2025. The module also reads the historical record count of the target electronic fence being selected as the target electronic fence in the previous period. The historical record count is stored in the buffer area. Each identification card corresponds to a historical record counter, which records the number of times the identification card has been predicted as the same target electronic fence in multiple consecutive periods in the past. The module increments the historical record count by one to obtain the consecutive warning count. For example, if the historical record count in the previous period was 2, then the consecutive warning count in this period is 3. If the target electronic fence in the previous period is different from the target electronic fence in the current period, the historical record count is reset to 1. The consecutive warning count reflects the trend of the identification card continuously approaching the same electronic fence. The higher the consecutive warning count, the clearer the intention to enter.

[0040] The module assembles the identification card code, current period timestamp, target electronic fence code, probability value, and number of consecutive warnings into a binary data packet according to a preset instruction format. The preset instruction format is defined by the protocol specification, and the binary data packet is composed of multiple fields concatenated sequentially. The prefix field of the data packet stores the instruction type identifier; for example, an instruction type identifier of hexadecimal value 0xA1 indicates a warning instruction. The body field of the data packet sequentially stores the identification card code, current period timestamp, target electronic fence code, probability value, and number of consecutive warnings. Each field occupies a fixed byte length; for example, the identification card code occupies 8 bytes, the timestamp occupies 4 bytes, the target electronic fence code occupies 4 bytes, the probability value occupies 4 bytes stored as a floating-point number, and the number of consecutive warnings occupies 2 bytes. The suffix field of the data packet stores a checksum, which is obtained by performing a cyclic redundancy check on the prefix and body fields of the data packet and is used by the receiving end to verify the integrity of the data packet. The module then sends the assembled binary data packet to the converged communication scheduling server.

[0041] In another preferred embodiment of the present invention, the specific steps of the server retrieving the wireless terminal number based on the identification card code and generating the warning message in the scheduling and sending module are as follows: The converged communication dispatch server is deployed in the coal mine's surface dispatch center and connects to underground equipment via industrial Ethernet. After receiving the binary data packet sent by the early warning generation module, the server first verifies the data packet. The server extracts the checksum from the data packet's suffix field, recalculates the cyclic redundancy check value for the prefix and body fields, and compares the calculated value with the extracted checksum. If they match, the data packet is confirmed to be complete and error-free; otherwise, the data packet is discarded and an anomaly is logged.

[0042] The server parses the identification card code, current period timestamp, target electronic fence code, probability value, and number of consecutive warnings from the verified data packet. The identification card code is a 64-bit binary value, for example, 0x0000000001234567. The current period timestamp is a 32-bit integer representing the number of seconds since a certain start time, for example, 1742718922 seconds. The target electronic fence code is a 32-bit integer, for example, 0x00000002 corresponding to AREA002. The probability value is a 32-bit floating-point number, for example, 0.85. The number of consecutive warnings is a 16-bit integer, for example, 3.

[0043] The server queries the personnel terminal association table using the identification card code as an index. The personnel terminal association table is stored in the server's relational database. Each record in the table contains an identification card code field and a wireless terminal number field. The wireless terminal number is the 11-digit mobile phone number of the underground smartphone. The server executes a structured query language statement to retrieve records matching the identification card code from the personnel terminal association table and extracts the corresponding wireless terminal number, for example, 13912345678.

[0044] The server queries the warning message template library using the target electronic fence code as an index. The warning message template library is stored in the server's file system or database, and each template in the library corresponds to a specific electronic fence code. The warning message template contains fixed text content and placeholders. The fixed text content describes the name of the danger zone and the warning type. The placeholders include probability placeholders and frequency placeholders. For example, the warning message template for electronic fence code AREA002 is: "You are approaching a dangerous area in a goaf. The probability of entering is a probability placeholder, and the number of consecutive warnings is a frequency placeholder. Please be careful."

[0045] The server converts the probability values ​​to a percentage string. The conversion process involves multiplying the floating-point probability value by 100 to get the percentage (e.g., 0.85 multiplied by 100 equals 85), then converting the percentage to a string format to get "eighty-five percent". The server converts the number of consecutive warnings to a count string (e.g., 3 consecutive warnings equals the string "three"). The server then replaces the probability placeholder in the warning message template with the percentage string and the count placeholder with the count string, resulting in the replaced text content, such as "You are approaching a dangerous area of ​​a goaf, with an 85% probability of entering, and three consecutive warnings. Please be careful."

[0046] The server encapsulates the replaced text content according to a short message format, which includes a destination address field, a source address field, a message type field, and a message content field. The destination address field is filled with the wireless terminal number, and the message content field is filled with the replaced text content. The server then sends the encapsulated short message to the underground smartphone corresponding to the wireless terminal number via a mobile communication network.

[0047] The server simultaneously determines whether the number of consecutive warnings exceeds a preset threshold. This threshold is pre-configured in the server configuration file, for example, set to 2. When the number of consecutive warnings exceeds the threshold (in this example, 3 consecutive warnings exceed threshold 2), the server initiates a broadcast linkage process. The server queries the broadcast device association table using the target electronic fence code as an index. This table stores the correspondence between electronic fence codes and broadcast substation device numbers, with each electronic fence corresponding to one or more broadcast substations. Based on the query results, the server obtains all broadcast substation device numbers for the area where the target electronic fence is located. The server sends voice broadcast instructions to these broadcast substations. These instructions include the path information for converting the replaced text content into a voice file. The voice conversion process is completed by the server calling an independent speech synthesis service. The speech synthesis service converts the input text into audio sample data, encodes it into a WAV format file, and stores it in a directory specified by the server. The file path is included as path information in the voice broadcast instructions. After receiving the voice broadcast instructions, the broadcast substations download the voice file from the specified path, convert it into an analog audio signal using an audio decoder, and then drive the mine explosion-proof speaker to play the voice signal via a power amplifier.

[0048] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A safety monitoring system for precise positioning of personnel underground in coal mines, characterized in that, include: The signal matrix construction module is used to obtain the pulse signals received by each substation from the identification card in multiple consecutive upload cycles, parse the identification card code, substation number and arrival time from the pulse signals, and organize the arrival time into an arrival time matrix according to the cycle and substation. The difference vector construction module is used to extract the arrival time difference between adjacent periods of each station from the arrival time matrix, arrange the arrival time differences of all stations in the same period into a difference vector, and stack the difference vectors of multiple periods into a difference vector sequence. The electronic fence reading module is used to read the pre-stored electronic fence boundary coordinates and entrance coordinates in the lane map. Each electronic fence consists of multiple coordinate points forming a closed boundary and corresponding to an entrance coordinate sequence. The trajectory prediction module is used to input the difference vector sequence into the prediction model. The prediction model outputs the probability value of the identification card reaching the coordinates of each electronic fence entrance in the future period, and the electronic fence with the highest probability value is taken as the target electronic fence. The early warning generation module is used to generate an early warning instruction containing the identification card code, the current period timestamp, the target electronic fence code, and the probability value when the probability value corresponding to the target electronic fence is greater than the probability threshold. The scheduling and sending module is used to send the early warning command to the converged communication scheduling server. The server retrieves the wireless terminal number according to the identification card code, selects the early warning message template according to the target electronic fence code, replaces the probability placeholder in the template with the probability value, generates the early warning message, and sends it to the wireless terminal.

2. The safety monitoring system for precise positioning of personnel underground in coal mines according to claim 1, characterized in that, The specific steps in the signal matrix construction module to organize arrival times into an arrival time matrix are as follows: Multiple consecutive upload cycles are numbered sequentially from the first cycle to the Nth cycle. The substations in the underground roadway are numbered sequentially from the first substation to the Mth substation. An N x M matrix of arrival times is constructed. The element in the i-th row and j-th column of the arrival time matrix stores the arrival time value of the identification card when it is received by the j-th substation in the i-th upload cycle. When the identification card is not received by the j-th substation, the arrival time values ​​of the j-th substation in the (i-1)-th cycle and the j-th substation in the (i+1)-th cycle are retrieved from the historical arrival time matrix. The average of these two values ​​is calculated and filled into the corresponding position in the i-th row and j-th column of the matrix. This position is then marked as an interpolation compensation point. The non-empty elements and interpolation compensation point elements in each row of the arrival time matrix are extracted in substation number order and associated with the identification card code of the corresponding cycle, then stored in the cache.

3. A safety monitoring system for precise positioning of personnel underground in coal mines according to claim 1, characterized in that, In the difference vector construction module, the specific steps for stacking multiple periodic difference vectors into a difference vector sequence are as follows: Read the arrival time values ​​corresponding to the same substation number in the i-th and i-1-th periods from the arrival time matrix. When both values ​​are the original collected values, calculate the difference between the arrival time value in the i-th period and the arrival time value in the i-1-th period as the standard arrival time difference. When any of the values ​​is an interpolation compensation point, the arrival time values ​​of the (j-1)th and (j+1)th substations in the i-th period are read from the arrival time matrix. The average of the two values ​​is calculated. Then, the difference between the arrival time value of the j-th substation in the (i-1)-th period and the average value is calculated as the substitution difference. The standard arrival time difference and substitution difference corresponding to all substations in the i-th period are arranged in the order of substation number to form the difference vector of the i-th period. Each element in the difference vector is attached with a difference type flag bit to distinguish the standard arrival time difference and the substitution difference. The difference vectors of the 2nd to Nth periods are stacked in the order of period number to form a difference vector sequence.

4. A safety monitoring system for precise positioning of personnel underground in coal mines according to claim 1, characterized in that, In the electronic fence reading module, the pre-storage method for the electronic fence boundary coordinates and entrance coordinates is as follows: In the lane map database, an independent data table is established for each electronic fence. The data table stores the electronic fence's code, hazard level code, and boundary coordinate point set. The boundary coordinate point set stores multiple coordinate points in sequence according to the lane direction. Each coordinate point contains x-axis coordinate value, y-axis value, and z-axis value. The line connecting adjacent coordinate points constitutes the boundary line segment of the electronic fence. The line connecting the first and last coordinate points closes the electronic fence. The entrance coordinate sequence is stored in an additional field of the electronic fence data table. The entrance coordinate sequence consists of multiple coordinate points, each of which corresponds to an entrance position of the alleyway into the electronic fence. The entrance coordinate sequence is arranged sequentially according to the direction of passage from the outside into the electronic fence. For the path segment between two adjacent coordinate points in the entrance coordinate sequence, the slope and width data of the path segment are read from the alleyway map database and stored in association with the entrance coordinate sequence.

5. A safety monitoring system for precise positioning of personnel underground in coal mines according to claim 1, characterized in that, The trajectory prediction module has the following input / output structure and training method for the prediction model: The prediction model employs an attention-enhanced long short-term memory network structure, with the input layer receiving a fixed-length sequence of difference vectors as input data. An attention layer is inserted between the hidden layer and the output layer. The attention layer calculates the cosine similarity between the output state at each time step and the output state at the last time step as a weight coefficient. The output states at each time step are multiplied by the corresponding weight coefficient and then summed to obtain the attention vector. The attention vector is used as the input of the fully connected layer. The output layer of the prediction model adopts a hierarchical Softmax structure. The output nodes are grouped according to the alleyway area belonging to the electronic fence. The output nodes corresponding to the electronic fence in the same alleyway area share some network parameters of the fully connected layer. The training data of the prediction model consists of the difference vector sequence of historical records and the corresponding actual electronic fence codes. The actual electronic fence codes are obtained by recording the boundary crossing event triggered when the identification card enters the electronic fence boundary. During the training process, the periodic data for which no boundary crossing event has occurred are used to participate in the training with a negative sampling strategy.

6. A safety monitoring system for precise positioning of personnel underground in coal mines according to claim 1, characterized in that, In the trajectory prediction module, the specific process of inputting the difference vector sequence into the prediction model to output the probability value is as follows: Extract the difference vectors of the most recent K consecutive periods from the difference vector sequence. The value of K is the same as the number of sequence periods set in the input layer of the prediction model. Arrange the extracted K difference vectors in chronological order to form an input tensor. Pass the input tensor into the input layer of the Long Short-Term Memory network. The input layer passes the difference vector of each period to the memory unit of the hidden layer in sequence. The memory unit of the hidden layer updates its internal state and output state in chronological order. The output states of all time steps are fed into the attention layer. The attention layer calculates the cosine similarity between the output state of each time step and the output state of the last time step as a weight coefficient. The output states of each time step are multiplied by the corresponding weight coefficient and then summed to obtain the attention vector. The attention vector is then fed into the fully connected layer for transformation. The output of the fully connected layer is then fed into the hierarchical Softmax output layer. The hierarchical Softmax output layer first determines the alleyway region to which the target electronic fence belongs, and then calculates the probability value corresponding to each electronic fence in the electronic fence subset of the alleyway region.

7. A safety monitoring system for precise positioning of personnel underground in coal mines according to claim 1, characterized in that, The specific steps for generating warning commands in the warning generation module are as follows: Extract the probability value corresponding to the target electronic fence from the probability value output by the prediction model, and compare the probability value with the preset probability threshold. The preset probability threshold is calculated by weighting the electronic fence's hazard level and the slope data of the entrance path. When the probability value corresponding to the target electronic fence is greater than the probability threshold, the timestamp of the current period is read from the arrival time matrix, and the historical record count of the target electronic fence being selected as the target electronic fence in the previous period is read. The number of consecutive warnings is obtained by incrementing the historical record count. The identification card code, the timestamp of the current period, the code of the target electronic fence, the probability value and the number of consecutive warnings are assembled into a binary data packet according to the preset instruction format. The prefix field of the binary data packet stores the instruction type identifier, and the suffix field stores the check code.

8. A safety monitoring system for precise positioning of personnel underground in coal mines according to claim 1, characterized in that, In the scheduling and sending module, the specific steps for the server to retrieve the wireless terminal number based on the identification card code and generate an early warning message are as follows: After receiving the early warning command, the converged communication scheduling server parses the identification card code, current period timestamp, target electronic fence code, probability value, and number of consecutive early warnings from the binary data packet of the early warning command; The server uses the identification card code as an index to query the personnel terminal association table to obtain the wireless terminal number, and uses the target electronic fence code as an index to query the warning message template library to obtain the corresponding warning message template. The warning message template contains fixed text content, probability placeholders, and frequency placeholders. The server converts the probability value into a percentage string and replaces the probability placeholder. It also converts the number of consecutive warnings into a number string and replaces the number placeholder. The server then encapsulates the replaced text content in a short message format and sends it to the wireless terminal number. When the number of consecutive warnings exceeds the number threshold, the server sends a voice broadcast command to the broadcast substation in the area where the target electronic fence is located. The voice broadcast command includes the path information for converting the replaced text content into a voice file.