Underground personnel card-on behavior early warning method based on intelligent agent
By combining large-scale language model intelligence with spatiotemporal clustering and trajectory overlap analysis, the problem of identifying hitchhiking behavior in coal mines has been solved, realizing automated and standardized safety management processes and improving the efficiency and accuracy of coal mine safety management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-04-07
AI Technical Summary
Existing underground personnel positioning systems in coal mines are unable to accurately identify complex violations such as "card-carrying," resulting in high false alarm and false alarm rates. The handling process relies on manual experience and is not standardized, lacking an automated and intelligent closed-loop management system.
By employing a large-scale language model intelligent agent and combining spatiotemporal clustering and trajectory overlap analysis algorithms with a coal mine safety knowledge vector database, the system can automatically identify and generate standardized handling plans, thereby achieving accurate identification and standardized handling of hitchhiking behavior.
It reduced the false alarm rate, enabled automated identification and standardized handling of violations, improved the efficiency and standardization of coal mine safety management, and reduced reliance on manual intervention.
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of mine safety production and artificial intelligence, specifically relating to a method for early warning of underground personnel carrying cards based on intelligent agents. Background Technology
[0002] The underground working environment in coal mines is complex and high-risk, making personnel safety management paramount. The application of high-precision personnel positioning systems (such as UWB and RFID) provides a technological foundation for real-time monitoring of personnel locations underground. However, existing systems generally suffer from the following pain points: Challenges in Identifying Violations: Behaviors such as "carrying multiple location cards" (i.e., one person carrying multiple location cards into the mine, causing a discrepancy between the registered and actual number of personnel) pose serious safety hazards. Traditional alarm systems based on simple rules (such as fixed distance thresholds) have high false alarm and false negative rates, making them ineffective in identifying such complex violations. Furthermore, the response process is often slow and inconsistent: after discovering suspected violations, managers need to manually review numerous safety regulations and emergency plans before developing appropriate measures based on the on-site situation. This process is time-consuming, and the professionalism and standardization of the response plan heavily rely on the personal experience of managers, making it prone to errors or omissions. Finally, there is the problem of information silos: the personnel location system, safety procedure knowledge base, and emergency response procedures are independent of each other, failing to form an automated and intelligent closed-loop management system from monitoring and early warning to standardized handling. Therefore, there is an urgent need for a technology that can intelligently and accurately identify violations by underground personnel and quickly and systematically generate response plans to improve the intelligence level of coal mine safety management and emergency response efficiency. Summary of the Invention
[0003] The purpose of this invention is to provide an early warning method for underground personnel carrying cards based on an intelligent agent. It uses a large-scale language model intelligent agent to analyze the real-time trajectory data of underground personnel in coal mines. Through algorithms based on spatiotemporal clustering and trajectory overlap analysis, it can effectively overcome noise interference in positioning data, accurately identify highly concealed violations such as "carrying cards", reduce false alarm rate, and achieve automated and standardized handling.
[0004] This invention adopts the following technical solution: a method for early warning of downhole personnel carrying cards based on intelligent agents, comprising the following steps: Step 1: Obtain the trajectory information of underground personnel within the input time range and compare it with the trajectory information of personnel within the query time range; Step 2: Using a spatiotemporal clustering analysis algorithm, identify multiple trajectories of different underground worker IDs with highly overlapping spatial coordinates within the query time range; score the trajectory overlap and confirm anomalies to generate an anomaly event report; Step 3: Construct a coal mine safety knowledge vector database; Step 4: After receiving the abnormal event report, the large language model agent retrieves the most relevant legal provisions and contingency plans from the coal mine safety knowledge vector database according to the type of abnormal event. Step 5: When an anomaly is detected, the information will be integrated to generate a response plan; when no anomaly is detected, the results will be reported directly to the user.
[0005] Furthermore, the specific process of step two is as follows: Step 2.1: Receive the trajectory information from Step 1 and calculate the absolute coordinates P of each positioning point in the mine's global coordinate system; Step 2.2: Integrate all the location points of all personnel within the specified time period into a flat list, with each point marked with its corresponding personnel ID; Step 2.3: Traverse the absolute coordinates P of all the positioning points obtained in Step 2.1; Step 2.4: For each location point P in Step 2.3, calculate all other points in its spatiotemporal neighborhood to determine the neighbors Q of P; Step 2.5: Count the number of neighbors of each location point P. If the number of neighbors of a location point is greater than or equal to MinPts, then the location point is marked as a core point. Step 2.6: Initialize an empty cluster list (Clusters); Step 2.7: Traverse all localization points. If localization point P is a core point and has not yet been assigned to any cluster, proceed as follows: 2.7.1. Create a new empty cluster C and add P into it; 2.7.2 Create a queue (Queue) to be processed, and add all the neighboring points of P to the queue (Queue) in sequence; 2.7.3 Retrieves the head of the queue, N: If N is a core point, then iterates through each of N's neighboring points q: If q has not been assigned to any cluster, then assign q to cluster C; if q has not been added to the queue, then add q to the end of the queue; if N is not a core point, then no expansion is performed. 2.7.4. The ring performs the above steps until the Queue is empty. At this point, a C instance is built and added to the Clusters list.
[0006] Step 2.8, Filtering of Abnormal Clusters: Iterate through each complete spatiotemporal cluster C in the Clusters list; count how many unique person IDs are contained in each complete spatiotemporal cluster C; If the number of unique person IDs in a complete spatiotemporal cluster is less than 2, it is determined to be a normal activity cluster and discarded; all complete spatiotemporal clusters containing two or more unique person IDs are identified as candidate abnormal clusters. Step 2.9: For each candidate anomaly cluster: Extract all personnel ID pairs involved within the cluster. For each pair of personnel, calculate their trajectory overlap score within the candidate anomaly cluster. If the score is greater than a set value, it indicates that there is a card-passing behavior.
[0007] Furthermore, the process of step 2.9 is as follows: Obtain the set of all time points of person A within this cluster. ; Obtain the set of all time points of person B within this cluster. ; Calculate the size of the intersection of two sets of time points. Union size .
[0008] The Jaccard similarity coefficient measures the proportion of time two people co-occur in an unusual event out of the total time they co-occur.
[0009] If Score(A,B)>= Score Threshold Then it is believed There was one instance of card-carrying violation.
[0010] Furthermore, in step 2.4, Q is considered a neighbor of P when the spatial distance and temporal distance satisfy the following two conditions: spatial distance ; Time Distance ; in: This is the spatial distance threshold; This is the time distance threshold.
[0011] Furthermore, each element in the trajectory information of underground personnel includes: personnel ID, positioning card ID, timestamp, base station coordinates, and the distance between the positioning card and the base station.
[0012] The beneficial effects of this invention are: each location point is considered as a point (x, y, z, t) in a spatiotemporal coordinate system. The actual "card-carrying" behavior will form a highly dense cluster containing multiple personnel IDs in this four-dimensional space, identifying abnormal "multi-identity high-density clusters" to achieve proactive prevention and rapid, standardized handling during the process. Detailed Implementation
[0013] The present invention will now be described in detail.
[0014] This invention utilizes a large-scale language model agent to analyze real-time trajectory data of personnel underground in coal mines to monitor violations such as "carrying cards" or "carrying cards" underground, and to automatically generate standardized response plans. Through algorithms based on spatiotemporal clustering and trajectory overlap analysis, it effectively overcomes noise interference in positioning data, accurately identifies highly concealed violations such as "carrying cards," and significantly reduces false alarm rates. It achieves automated and standardized response: disparate safety procedures and emergency plans are digitized and tool-based, and response plans are automatically generated through RAG technology, ensuring rapid, compliant, and professional response measures, eliminating reliance on human experience. It constructs a closed-loop management system: it connects the entire process from "data access - intelligent analysis - anomaly warning - standardized response - post-event traceability," forming an efficient and intelligent safety management closed loop of pre-event prevention, in-event control, and post-event analysis. It improves management efficiency: it frees safety management personnel from tedious data screening and procedure review, allowing them to focus more on on-site command and decision-making, greatly improving the overall efficiency of coal mine safety management.
[0015] A method for early warning of downhole personnel carrying cards based on intelligent agents, specifically consisting of the following steps: The underground personnel positioning information access tool (1) is a Python interface or function that can be called by a large language model. It is used to obtain the identity of all personnel, positioning card ID and high-frequency spatiotemporal coordinate data within a specified time range from the database of the underground personnel positioning system in real time and on demand. The specific information includes: personnel information, positioning card ID, current base station coordinates and the distance of the personnel positioning card from the current base station. Abnormal Trajectory Determination Tool (2): An analysis function called by the intelligent agent, receiving personnel trajectory data queried by the underground personnel positioning information access tool (1). This tool accurately identifies multiple trajectories of different personnel IDs that highly overlap in spatial coordinates within a continuous time period through a spatiotemporal dimension clustering analysis algorithm. For example, if the physical distance is less than a preset threshold, such as 1 meter.
[0016] The Coal Mine Safety Knowledge Vector Database contains coal mine safety production regulations, industry standards, and collected emergency response plans for coal mine safety accidents. Through document loading, segmentation, and vectorization, this unstructured text knowledge is transformed into vector data that can be semantically retrieved by machines and stored in the vector database. A tool for generating safety incident response plans for abnormal trajectories (3): A tool based on the Retrieval Enhancement Generation (RAG) strategy. This tool is invoked when the agent receives the abnormal incident report output by Tool 2. It first automatically constructs a semantic query based on the type of abnormal incident (such as "suspected hitchhiking") and key information, retrieving the most relevant regulations and response plans from the coal mine safety knowledge vector database. Then, the retrieved knowledge content is used as context, along with the abnormal incident report, and provided to a large language model to guide it in generating a standardized response plan that is well-structured, based on evidence, and highly operable.
[0017] The agent and execution flow controller: As the core of the system, this agent is built on a large language model and its tasks are orchestrated by a flow control framework (such as LangGraph). It is responsible for parsing user commands, deciding which tools to invoke, transmitting data between tools, and controlling the execution of the entire process according to preset logic. When an anomaly is detected, it can automatically chain and invoke the toolchain, ultimately integrating information to generate a solution; when no anomaly is detected, it directly reports the result to the user.
[0018] Step 1: Tool for Accessing Underground Personnel Location Information. This tool is implemented using Python functions. Detailed function descriptions and parameter descriptions help the large language model understand how to use the tool. After receiving a user request, the large language model parses the request data and passes the parsed data, such as the query time range, to the tool. The tool executes the personnel location information query function, retrieves relevant personnel location information, and returns the retrieved underground personnel's trajectory information along with historical trajectory information. Step 2: Anomaly Trajectory Determination Tool. This tool, implemented using Python functions, receives personnel location information retrieved from the underground personnel location information access tool. Through a spatiotemporal clustering analysis algorithm, it accurately identifies multiple trajectories of different personnel IDs that overlap spatially within a continuous time period (e.g., physical distance less than a preset threshold, such as 1 meter). The core idea of this algorithm is to treat each location point as a point (x, y, z, t) in a spatiotemporal coordinate system. Actual "card-carrying" behavior will form a highly dense cluster containing multiple personnel IDs in this four-dimensional space. This algorithm aims to identify these anomalous "multi-identity high-density clusters." The algorithm is shown below: 1. Input data preprocessing Before proceeding to the core algorithm, the input data needs to be standardized.
[0019] Input: A list of raw trajectory data from the underground personnel positioning information access tool. Each element contains: Personnel ID, Positioning Card ID, Timestamp, Base Station Coordinates, and Position Card's distance from the Base Station, including orientation and distance.
[0020] Coordinate transformation: Based on the absolute coordinates of the base station and the orientation and distance of the positioning card relative to the base station, calculate the absolute coordinates P (x, y, z) of each positioning point in the mine's global coordinate system.
[0021] Time standardization: Convert all timestamps into a unified format to facilitate numerical calculations.
[0022] Data integration: All location points of all personnel within a specified time period are integrated into a flat list, with each point labeled with its corresponding personnel ID.
[0023] Format: ; 2. Definition of key algorithm parameters Before executing the algorithm, the following key parameters need to be set, which can be adjusted according to the actual mine environment and the accuracy of the positioning equipment: Spatial distance threshold ( This defines the maximum distance between two points that are considered "nearby" in space. This value needs to be adjusted according to the positioning accuracy; the default value can be set to 5 meters.
[0024] Time distance threshold ( This defines the maximum time difference between two points that are considered "nearby". This value needs to be set according to the positioning algorithm; the default value is 8 seconds.
[0025] Minimum Neighborhood Points (MinPts): The minimum number of neighboring points required to form a high-density core cluster. This parameter effectively filters out accidental and transient proximity. The default value is 8.
[0026] Overlap score threshold (Score) Threshold ): Determines the confidence score threshold for whether two trajectories in an anomalous cluster constitute "card-carrying" behavior. The default value is 0.65.
[0027] 3. Detailed algorithm steps: Part 1: Spatiotemporal Neighborhood Search and Core Point Identification 1. Traverse all preprocessed positioning points P.
[0028] For each location point P, compute all other points in its spatiotemporal neighborhood. A point Q is considered a neighbor of P if and only if: spatial distance Euclidean distance; Time Distance The absolute value of the timestamp difference; 3. Count the number of neighbors for each location point P. If the number of neighbors for a point is greater than or equal to MinPts, then the point is marked as a core point.
[0029] 2: Spatiotemporal cluster construction based on core points 1. Initialize an empty list of clusters.
[0030] 2. Iterate through all locators P. If a locator P is a core point and has not yet been assigned to any cluster: Create a new cluster C and add P into it.
[0031] Take the head of the queue, point N: If N is a core point, then traverse each of N's neighbor points q: If q has not been assigned to any cluster, then assign q to cluster C; if q has not been added to the queue, then add q to the end of the queue; if N is not a core point, then do not expand. Repeat the above steps until the Queue is empty. At this point, a complete spatiotemporal cluster C) is constructed and added to the Clusters list.
[0032] Three: Filtering of Abnormal Clusters 1. Iterate through each complete spatiotemporal cluster C in the Clusters list.
[0033] 2. Count how many unique personnel IDs are contained in each spatiotemporal cluster C.
[0034] 3. If the number of unique person IDs in a cluster is less than 2, it is determined to be a normally active cluster and discarded.
[0035] 4. All clusters containing two or more unique person IDs are identified as candidate anomalous clusters.
[0036] IV: Trajectory Overlap Scoring and Anomaly Confirmation 1. For each candidate anomaly cluster: 2. Extract all personnel ID pairs involved in the cluster, for example : 3. For each pair of individuals, calculate their trajectory overlap score within that cluster. The calculation method is as follows: Obtain the set of all time points of person A within this cluster. .
[0037] Obtain the set of all time points of person B within this cluster. .
[0038] Calculate the size of the intersection of two sets of time points. Union size .
[0039] (i.e., the Jaccard similarity coefficient), this score measures the proportion of time that two people co-occur in the anomaly event out of the total occurrence time.
[0040] If Score(A,B)>= Score Threshold Then it is believed that ( There was one instance of card-carrying violation.
[0041] V. Generate structured exception event reports: 1. For each confirmed violation, generate a report based on its (complete) cluster C.
[0042] 2. Personnel IDs Involved: List all personnel IDs whose overlap scores meet the criteria.
[0043] 3. Abnormal start and end times: The minimum timestamp of all points within the cluster is the start time, and the maximum timestamp is the end time.
[0044] 4. Abnormal trajectory data: All location point data within the cluster (person_id, timestamp, x, y, z).
[0045] 5. Confidence score: The highest calculated trajectory overlap score.
[0046] Step 3: Construct a coal mine safety knowledge vector database: Through steps such as document loading, segmentation, and vectorization, this unstructured text knowledge is transformed into vector data that can be semantically retrieved by machines and stored in the vector database; Step 4: A tool based on the Retrieval Enhancement Generation (RAG) strategy. This tool is invoked when the agent receives the output of anomaly event reports. It first automatically constructs a semantic query based on the type of the anomaly event (e.g., "suspected tip-off") and key information, retrieving the most relevant regulations and contingency plans from the coal mine safety knowledge vector database. Then, it provides the retrieved knowledge content as context, along with the anomaly event report, to a large language model, guiding it to generate a clearly structured, evidence-based, and highly operational standardized handling plan.
[0047] Step 5: Agent and Execution Flow Controller: As the core of the system, this agent is built on a large language model and its tasks are orchestrated by a flow control framework (such as LangGraph). It is responsible for parsing user commands, deciding which tools to invoke, transmitting data between tools, and controlling the execution of the entire process according to preset logic. When an anomaly is detected, it can automatically chain and invoke the toolchain, ultimately integrating information to generate a solution; when no anomaly is detected, it directly reports the result to the user.
Claims
1. A method for early warning of downhole personnel carrying cards based on intelligent agents, characterized in that, Includes the following steps: Step 1: Obtain the trajectory information of underground personnel within the input time range and compare it with the trajectory information of personnel within the query time range; Step 2: Using a spatiotemporal clustering analysis algorithm, identify multiple trajectories of different underground worker IDs with highly overlapping spatial coordinates within the query time range; score the trajectory overlap and confirm anomalies to generate an anomaly event report; Step 3: Construct a coal mine safety knowledge vector database; Step 4: After receiving the abnormal event report, the large language model agent retrieves the most relevant legal provisions and contingency plans from the coal mine safety knowledge vector database according to the type of abnormal event. Step 5: When an anomaly is detected, the information will be integrated to generate a response plan; when no anomaly is detected, the results will be reported directly to the user.
2. The method for early warning of downhole personnel carrying cards based on intelligent agents as described in claim 1, characterized in that, The specific process of step two is as follows: Step 2.1: Receive the trajectory information from Step 1 and calculate the absolute coordinates P of each positioning point in the mine's global coordinate system; Step 2.2: Integrate all the location points of all personnel within the specified time period into a flat list, with each point marked with its corresponding personnel ID; Step 2.3: Traverse the absolute coordinates P of all the positioning points obtained in Step 2.1; Step 2.4: For each location point P in Step 2.3, calculate all other points in its spatiotemporal neighborhood to determine the neighbors Q of P; Step 2.5: Count the number of neighbors of each location point P. If the number of neighbors of a location point is greater than or equal to MinPts, then the location point is marked as a core point. Step 2.6: Initialize an empty cluster list (Clusters); Step 2.7: Traverse all localization points. If localization point P is a core point and has not yet been assigned to any cluster, proceed as follows: 2.7.
1. Create a new empty cluster C and add P into it; 2.7.2 Create a queue (Queue) to be processed, and add all the neighboring points of P to the queue (Queue) in sequence; 2.7.
3. Extract the head point N: If N itself is a core point, then traverse each neighbor point q of N: If q has not been assigned to any cluster, then assign q to cluster C; If q has not been added to the queue, then add q to the end of the queue; if N is not a core point, then no expansion is performed. 2.7.
4. Execute the above steps until the Queue is empty. At this point, a cluster C is completed and added to the Clusters list. Step 2.8, Filtering of Abnormal Clusters: Iterate through each complete spatiotemporal cluster C in the Clusters list; Count how many unique person IDs are contained in each complete spatiotemporal cluster C; If the number of unique person IDs in a complete spatiotemporal cluster is less than 2, it is determined to be a normal activity cluster and discarded. All complete spatiotemporal clusters containing two or more unique person IDs are identified as candidate anomalous clusters; Step 2.9: For each candidate anomaly cluster: Extract all personnel ID pairs involved within the cluster. For each pair of personnel, calculate their trajectory overlap score within the candidate anomaly cluster. If the score is greater than a set value, it indicates that there is a card-passing behavior.
3. The method for early warning of downhole personnel carrying cards based on intelligent agents as described in claim 2, characterized in that, The process of step 2.9 is as follows: Obtain the set of all time points of person A within this cluster. ; Obtain the set of all time points of person B within this cluster. ; Calculate the size of the intersection of two sets of time points. Union size ; The Jaccard similarity coefficient is a score that measures the proportion of time two people co-occur in the anomaly event out of the total time it occurs. If Score(A,B)>= Score Threshold Then it is believed There was one instance of card-carrying violation.
4. The method for early warning of downhole personnel carrying cards based on intelligent agents as described in claim 3, characterized in that, In step 2.4, Q is considered a neighbor pair of P when the spatial distance and temporal distance satisfy the following two conditions: spatial distance ; Time Distance ; in: This is the spatial distance threshold; This is the time distance threshold.
5. The method for early warning of downhole personnel carrying cards based on intelligent agents as described in claim 4, characterized in that, Each element in the trajectory information of underground personnel includes: personnel ID, positioning card ID, timestamp, base station coordinates, and the distance between the positioning card and the base station.