Mine equipment intelligent monitoring method and device based on knowledge retrieval enhancement generation
By introducing RAG technology and MCP into the mining equipment monitoring system, combined with three-dimensional decision trees and an improved RendezvousHash algorithm, intelligent collaborative analysis and decision-making of multi-dimensional risks are realized, solving the problems of information fragmentation and response delay in traditional systems, and generating comprehensive disposal solutions that comply with coal mine safety regulations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA COAL RES INST
- Filing Date
- 2026-01-06
- Publication Date
- 2026-05-19
AI Technical Summary
Traditional mine equipment monitoring systems cannot achieve multi-dimensional risk analysis, and suffer from problems such as information fragmentation, one-sided decision-making, and response delays, making it difficult to generate comprehensive disposal plans that comply with the "Coal Mine Safety Regulations".
This method integrates knowledge retrieval augmented generation (RAG) technology with model context protocol (MCP), acquires equipment data through a dedicated intelligent agent communication protocol for mining equipment monitoring, determines collaborative target AI nodes using a 3D decision tree algorithm, allocates equipment using an improved RendezvousHash algorithm, and integrates the analysis results of AI nodes from various fields through an asynchronous calling mechanism, generating a comprehensive treatment plan based on a large language model.
It enables intelligent collaborative analysis and decision-making across multiple AI nodes in safety, production, and environment, improving the comprehensiveness and response efficiency of equipment anomaly handling, ensuring that handling solutions meet industry safety standards, and breaking through the technical bottlenecks of traditional monitoring.
Smart Images

Figure CN122069291A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent mine safety technology, and in particular to an intelligent monitoring method and device for mine equipment based on knowledge retrieval and enhanced generation. Background Technology
[0002] Intelligent mine safety technology, as a core technology in the field of industrial safety, is widely used in high-risk operation scenarios such as underground mining. With the deepening of digital transformation in mines and the upgrading of the "Coal Mine Safety Regulations" standard, traditional equipment monitoring systems are no longer sufficient to meet the multi-dimensional risk analysis needs under complex working conditions. Existing technologies mainly rely on Supervisory Control and Data Acquisition (SCADA) systems to achieve basic alarm functions, manage independent equipment through distributed monitoring systems, and rely on expert experience to drive the analysis process. However, SCADA systems can only execute threshold alarms and lack intelligent analysis capabilities; distributed systems suffer from information fragmentation due to the lack of a unified communication protocol; and expert experience analysis is limited by the timeliness of manual response and obstacles to knowledge transfer. Based on this, the integration of Retrieval Enhanced Generation (RAG) technology and Model Context Protocol (MCP) has opened up a new path for equipment monitoring, but its in-depth application in mining scenarios remains unexplored.
[0003] However, existing technological systems suffer from systemic flaws. Specifically, neither traditional SCADA systems nor distributed monitoring systems have established cross-domain collaborative mechanisms, resulting in the inability to integrate multi-dimensional data on safety, production, and the environment, making it difficult to generate comprehensive response plans that comply with the "Coal Mine Safety Regulations." Information silos manifest in the disconnect between safety monitoring and production scheduling systems; for example, when gas levels exceed limits, ventilation equipment needs to be activated and production plans adjusted simultaneously, but this cannot be analyzed in conjunction with other systems. Decision-making bias is reflected in the possibility that single-domain AI analysis may overlook related risks; for example, abnormal rock support may simultaneously trigger safety and environmental risks. Response delays stem from the reliance on manual intervention for cross-system coordination, making it difficult to achieve sub-second responses in emergency situations. Therefore, there is an urgent need to construct a collaborative system incorporating technologies such as the MEACP protocol, three-dimensional decision tree algorithms, and improved RendezvousHash to achieve four-dimensional risk assessment and optimize equipment allocation algorithms, thereby overcoming existing technological bottlenecks. Summary of the Invention
[0004] The main objective of this invention is to provide an intelligent monitoring method for mine equipment based on knowledge retrieval and enhanced generation.
[0005] Another objective of this invention is to propose an intelligent monitoring device for mine equipment based on knowledge retrieval enhancement.
[0006] The third objective of this invention is to provide an electronic device.
[0007] A fourth objective of this invention is to provide a non-transitory computer-readable storage medium.
[0008] To achieve the above objectives, a first aspect of the present invention proposes an intelligent monitoring method for mine equipment based on knowledge retrieval and enhanced generation, comprising: S1 acquires real-time data of the equipment through the dedicated intelligent agent communication protocol for monitoring mining equipment, and generates standardized messages based on equipment type and risk level; S2, using a three-dimensional decision tree algorithm to determine the type of AI node to be collaborated with and the collaboration method, and matching cross-domain collaboration strategies based on the current AI node type, device type and risk level; S3 employs an improved RendezvousHash algorithm combined with a load balancing strategy to select the optimal target node from AI nodes for device allocation; S4 sends collaborative analysis requests to selected AI nodes through an asynchronous call mechanism, and receives and integrates the analysis results of AI nodes in various fields; S5 uses a large language model to perform semantic fusion on the analysis results of multiple domains, generating a comprehensive treatment plan that complies with coal mine safety regulations.
[0009] Optionally, the step of acquiring real-time data of the equipment through the dedicated intelligent agent communication protocol for mining equipment monitoring, and generating standardized messages based on equipment type and risk level, further includes: The real-time device data includes the fields device_id, device_type, timestamp, data, and fault_data, where device_type uses a predefined device type identifier; The standardized messages include nine message types: AGENT_REGISTER, AGENT_DISCOVERY, AGENT_CALL, AGENT_BROADCAST, AGENT_HEARTBEAT, DEVICE_SEEN, DEVICE_ASSIGNMENT, ROUTE_UPDATE, and MONITORING_TOGGLE. Each message type has a standardized data structure and semantic definition.
[0010] Optionally, the step of using a three-dimensional decision tree algorithm to determine the type of AI node to be collaborated with and the collaboration method, and matching cross-domain collaboration strategies based on the current AI node type, device type, and risk level, further includes: The three-dimensional decision tree algorithm includes a node type judgment layer, a device type matching layer, and a risk level filtering layer. When the safety AI node handles high risk in gas_sensor, it triggers environment and production collaboration. When the production AI node handles belt_conveyor failure, it triggers safety and environment collaboration. The collaboration method adopts a standardized naming rule {source node type} to {target node type}, such as safety_to_environment and production_to_safety. Each collaboration type corresponds to a specific processing method and return format.
[0011] Optionally, the step of using an improved RendezvousHash algorithm combined with a load balancing strategy to select the optimal target node from available AI nodes for device allocation further includes: The improved RendezvousHash algorithm is expressed by the formula... Calculate the adjusted weight, where Hash_Weight is a 32-bit unsigned integer converted from the first 8 bits of the MD5 hash value; The load balancing strategies include the least load algorithm, the response time algorithm, and the adaptive algorithm.
[0012] Optionally, the step of sending collaborative analysis requests to selected AI nodes via an asynchronous invocation mechanism, and receiving and integrating the analysis results from AI nodes in various fields, further includes: The asynchronous call mechanism transmits device data, request node information, coordination reason and coordination type parameters through the call_agent method, and the master node performs message routing and forwarding. The integration process employs a weighted consensus algorithm, where risk assessment results are obtained using a weighted average method, disposal recommendations are obtained through a voting mechanism combined with expert rules, and confidence levels are determined using a maximum value strategy.
[0013] Optional, also includes: Based on the AI cognitive analysis results, device control commands are generated, and control operations are executed through the model context protocol, including: When generating the emergency_stop instruction, permissions and execution conditions are verified, and an immediate_stop type instruction is triggered when the gas concentration exceeds 1.5%. When generating the parameter_adjust instruction, the parameter safety range is checked, and the gradual_adjust adjustment method is used to avoid device impact.
[0014] To achieve the above objectives, a second aspect of the present invention provides an intelligent monitoring device for mine equipment based on knowledge retrieval-enhanced generation, comprising: The data acquisition and standardization module is used to acquire real-time data from equipment through the communication protocol of the dedicated intelligent agent for monitoring mining equipment, and to generate standardized messages based on equipment type and risk level. The 3D decision tree collaboration strategy module is used to determine the type of AI node to be collaborated with and the collaboration method using the 3D decision tree algorithm, and to match cross-domain collaboration strategies based on the current AI node type, device type and risk level. An improved hash load balancing module is used to select the optimal target node from AI nodes for device allocation by adopting an improved RendezvousHash algorithm combined with a load balancing strategy. The asynchronous call and result integration module is used to send collaborative analysis requests to selected AI nodes through an asynchronous call mechanism, and to receive and integrate the analysis results of AI nodes in various fields. The semantic fusion and processing generation module is used to perform semantic fusion on the analysis results of multiple domains based on a large language model, and generate a comprehensive processing plan that complies with coal mine safety regulations.
[0015] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0016] To achieve the above objectives, a third aspect of this application provides an electronic device, including a processor and a memory; wherein the processor reads executable program code stored in the memory to run a program corresponding to the executable program code, for implementing a method for intelligent monitoring of mine equipment based on knowledge retrieval enhancement as described in the first aspect embodiment.
[0017] To achieve the above objectives, the fourth aspect of this application proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for intelligent monitoring of mine equipment based on knowledge retrieval and enhanced generation as described in the first aspect embodiment.
[0018] The embodiments of this invention have the following beneficial effects: By innovatively constructing a complete technical system that deeply integrates RAG technology, large model inference, and mine monitoring, and relying on the intelligent switching mechanism between local Ollam and cloud API to ensure service continuity, it also creates an end-to-end automated process for equipment data, AI analysis, and collaborative decision-making. This not only realizes intelligent collaborative analysis and decision-making of AI nodes in multiple fields such as safety, production, and environment, significantly improving the comprehensiveness and response efficiency of equipment anomaly handling, but also ensures that the generated handling solutions strictly comply with industry safety standards by embedding relevant rules and constraints of the "Coal Mine Safety Regulations" into the technical system. This effectively breaks through the technical bottlenecks of traditional mine monitoring, such as high reliance on manual labor, delayed decision-making, and insufficient cross-domain collaboration, providing safe, reliable, efficient, and intelligent monitoring and decision-making support for mine production. Attached Figure Description
[0019] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 A flowchart of a method for intelligent monitoring of mine equipment based on knowledge retrieval enhancement provided in an embodiment of the present invention; Figure 2 This invention provides an overall architecture diagram of a mine equipment intelligent monitoring system based on knowledge retrieval enhancement. Figure 3 This is an interactive diagram of the core components of a knowledge retrieval-enhanced intelligent monitoring method for mine equipment, provided in an embodiment of the present invention. Figure 4 A message flow diagram of the MEACP intelligent agent communication protocol for an intelligent monitoring method for mine equipment based on knowledge retrieval enhancement provided in this embodiment of the invention; Figure 5 This is a schematic diagram of a cross-domain collaborative communication mechanism for a method of intelligent monitoring of mine equipment based on knowledge retrieval enhancement provided in an embodiment of the present invention; Figure 6 This is a screenshot of the monitoring panel for Case 1. Figure 7 This is a diagram from the Case 1 analysis report; Figure 8 This is a screenshot of the monitoring panel for Case 2. Figure 9 This is a diagram from the analysis report of Case 2; Figure 10 This is a diagram from Case Study 2, showing an AI meeting. Figure 11 This is a structural diagram of an intelligent monitoring device for mine equipment based on knowledge retrieval enhancement provided in an embodiment of the present invention. Detailed Implementation
[0020] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.
[0022] The following description, with reference to the accompanying drawings, describes a method and apparatus for intelligent monitoring of mine equipment based on knowledge retrieval and enhanced generation, according to embodiments of the present invention.
[0023] Example 1 This invention provides a method for intelligent monitoring of mine equipment based on knowledge retrieval and enhanced generation. Figure 1 This is a flowchart illustrating a method for intelligent monitoring of mine equipment based on knowledge retrieval and enhanced generation, provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps: Step S1: Obtain real-time data of the equipment through the dedicated intelligent agent communication protocol for mining equipment monitoring, and generate standardized messages based on equipment type and risk level.
[0024] The embodiments of this application adopt a five-layer distributed architecture design, such as Figure 2 , Figure 3 As shown, this five-layer distributed architecture consists of, from bottom to top, the device perception layer, the protocol communication layer, the cognitive analysis layer, the business logic layer, and the data storage layer. The device perception layer is responsible for acquiring device data, the protocol communication layer implements distributed communication, the cognitive analysis layer provides intelligent parsing, the business logic layer implements core business functions, and the data storage layer provides data services.
[0025] In this embodiment, the device perception layer includes a model context protocol device server, a device data simulator, and various sensor interfaces; the protocol communication layer includes an intelligent agent communication protocol, a model context device protocol, and WebSocket real-time communication; the cognitive analysis layer includes knowledge retrieval enhancement, an AI inference engine, multi-model support, and a professional knowledge base; the business logic layer includes a risk assessment engine, a collaborative scheduler, a device controller, and a report generator; and the data storage layer includes a MySQL database, a real-time cache, a knowledge base index, and historical data archiving.
[0026] In this embodiment, the dedicated intelligent agent communication protocol for mine equipment monitoring is referred to as "MEACP". To adapt to existing code, the code implementation uses the existing module / class name MEACP_Monitor, the main control class is named MEACPMasterNode, and the client class is named MEACPAgent. The MEACP protocol defines nine dedicated message types: AGENT_REGISTER (intelligent agent registration message), AGENT_DISCOVERY (intelligent agent discovery message), AGENT_CALL (cross-node call message), AGENT_BROADCAST (broadcast message), AGENT_HEARTBEAT (heartbeat monitoring message), DEVICE_SEEN (device reporting message), DEVICE_ASSIGNMENT (device allocation message), ROUTE_UPDATE (routing update message), and MONITORING_TOGGLE (monitoring switch message). Each message is optimized for mine monitoring scenarios and has standardized data structures and semantic definitions, such as... Figure 4 As shown.
[0027] Specifically, the AGENT_REGISTER agent registration message is used for AI analysis nodes to register with the MEACP master node. It includes fields such as node ID, agent type (security, production, environment), AI model information, capability list, and endpoint information. The master node verifies the registration information and assigns a unique agent_id. The AGENT_DISCOVERY agent discovery message is used for node discovery requests. It filters and matches nodes based on type and capability. The master node returns a list of matched agents sorted by load, supporting an agent discovery mechanism based on capability matching. The AGENT_CALL cross-node call message enables method calls between different AI nodes, including the call method, parameters, and request ID. The master node is responsible for message routing and forwarding, enabling cross-domain collaborative analysis. The AGENT_BROADCAST broadcast message is used to forward messages to all or specified types of nodes, supporting system status updates. Broadcast scenarios such as updates and configuration change notifications enable system-level information synchronization; AGENT_HEARTBEAT heartbeat monitoring messages are used for node status monitoring, including status information such as load score, message count, and processing capacity. The master node maintains the health status of nodes through the heartbeat mechanism; DEVICE_SEEN device reporting messages are used by sub-nodes to report observed device information to the master node, used for updating the device status table and managing device allocation; DEVICE_ASSIGNMENT device allocation messages are used by the master node to assign device monitoring tasks to sub-nodes, achieving consistent allocation and load balancing from devices to AI nodes; ROUTE_UPDATE routing update messages are used to dynamically adjust routing policies, optimizing message transmission paths and load distribution; MONITORING_TOGGLE monitoring switching messages are used by the master node to notify sub-nodes to turn on / off the monitoring service, enabling dynamic control of monitoring functions.
[0028] In this embodiment, the MEACP master node adopts an asynchronous event-driven architecture, listening on port 9998 to receive TCP connections from sub-nodes. The master node maintains a complete agent registry, recording detailed information for each AI sub-node, including agent_id, agent_type, capabilities, ai_model, load_score, last_heartbeat, etc. It also implements multiple message processing mechanisms, including handle_agent_register, handle_agent_discovery, handle_agent_call, handle_agent_broadcast, handle_device_seen, heartbeat_monitor_loop, route_optimization_loop, and assignment_reminder_loop, which are used to handle registration requests, node discovery requests, cross-node method calls, broadcast messages, device reporting, heartbeat monitoring, route optimization, and device allocation reminders, respectively.
[0029] In this embodiment, the Model Context Protocol extension adopts the JSON-RPC 2.0 standard format and defines a device data stream interface. This interface includes the following core fields: device_id (unique device identifier, such as gas_sensor_001); device_type (device type, such as gas_sensor, temperature_sensor, etc.); message_id (unique message identifier, in timestamp-M format); data (device data payload, containing specific monitoring parameters); fault_data (fault data, recording abnormal device states); and timestamp (data acquisition timestamp). The device data payload contains corresponding monitoring parameters depending on the device type. For example, a gas detection device includes parameters such as methane concentration, carbon monoxide concentration, hydrogen sulfide concentration, oxygen concentration, temperature, and humidity; a particulate matter monitoring device includes parameters such as total particulate matter concentration, inhalable particulate matter concentration, and particulate matter distribution.
[0030] In this embodiment, the device status perception process adopts an event-driven processing mechanism. The Model Context Protocol (MCP) device server receives real-time data from various sensors, performs data preprocessing and risk assessment. Data preprocessing includes data cleansing, format normalization, outlier identification, and integrity verification. Risk assessment is based on preset security thresholds and historical data patterns to initially classify the device status. When a medium-to-high-risk status is identified, the system automatically generates a standardized alarm record, including alarm identifier, device information, risk level, anomaly description, and timestamp. The alarm record is distributed to the corresponding AI cognitive analysis node through the intelligent agent communication protocol, triggering the intelligent cognitive analysis process.
[0031] Step S2: Use the three-dimensional decision tree algorithm to determine the type of AI node to be collaborated with and the collaboration method, and match cross-domain collaboration strategies according to the current AI node type, device type and risk level.
[0032] In this embodiment of the application, the cross-domain collaborative scheduling algorithm adopts a decision tree structure, such as... Figure 5 As shown, based on the current AI node type, device type, and risk level, the target AI node and collaboration method that need to be collaborated are dynamically determined. The collaboration target determination algorithm adopts a three-layer decision structure, namely the node type judgment layer, the device type matching layer, and the risk level filtering layer.
[0033] The node type judgment layer selects the corresponding collaboration strategy branch based on the current AI node type (safety AI, production AI, environmental AI). Each node type has different collaboration concerns and triggering conditions. The equipment type matching layer performs precise matching based on equipment type identifiers, supporting fuzzy matching and keyword matching. The matching rules include: gas sensors trigger safety-environment collaboration, conveying equipment triggers production-safety collaboration, and camera equipment triggers safety-production collaboration. The risk level filtering layer determines whether to trigger collaboration based on the risk level (high, medium, low). High-risk and medium-risk equipment anomalies automatically trigger cross-domain collaboration, while low-risk anomalies only trigger collaboration under specific equipment types.
[0034] Specifically, the safety AI node collaboration strategy is as follows: when a gas sensor detects a medium-to-high risk level, environmental AI collaboration (calling the `analyze_ventilation_impact` method) and production AI collaboration (calling the `assess_production_impact` method) are triggered. Camera devices trigger production AI collaboration (calling the `analyze_personnel_safety` method). The `analyze_ventilation_impact` method analyzes the impact of gas anomalies on the ventilation system, assesses ventilation needs, and provides optimization suggestions. Input parameters include gas concentration data, equipment location information, and current ventilation status. Analysis content includes current ventilation volume assessment, suggested ventilation volume calculation, ventilation effect prediction, and clearance time. The estimation and output results are ventilation impact analysis reports. The `assess_production_impact` method is used to assess the impact of safety risks on the production system and formulate production adjustment strategies. The input parameters are safety risk level, impact range, and equipment status information. The analysis content includes identification of affected equipment, production loss assessment, recovery time prediction, and alternative solution analysis. The output result is a production impact assessment report. The `analyze_personnel_safety` method is used to analyze the impact of personnel safety violations on production safety and formulate safety control measures. The input parameters are violation type, personnel location, work content, and risk level. The analysis content includes violation risk assessment, identification of affected work, formulation of safety measures, and training needs analysis. The output result is a personnel safety analysis report.
[0035] The production AI node collaboration strategy is as follows: belt conveyors or drainage pumps trigger safety AI collaboration (calling the `assess_equipment_safety_risk` method) and environmental AI collaboration (calling the `analyze_environmental_impact` method). The `assess_equipment_safety_risk` method assesses the safety risks of equipment failure and formulates safety protection measures. The input parameters are equipment failure information, equipment type, failure severity, and impact range. The analysis content includes failure safety risk assessment, secondary disaster prediction, personnel safety threat analysis, and emergency response formulation. The output result is an equipment safety risk assessment report. The `analyze_environmental_impact` method analyzes the impact of equipment failure on the underground environment and assesses environmental change trends. The input parameters are equipment failure information, environmental baseline data, equipment location, and failure type. The analysis content includes environmental parameter change prediction, pollution diffusion analysis, ventilation impact assessment, and environmental recovery time. The output result is an environmental impact analysis report.
[0036] The environmental AI node collaboration strategy consists of two parts: safety AI collaboration triggered by abnormalities in medium- and high-risk equipment (calling the `cross_validate_environmental_risk` method) and production AI collaboration (calling the `assess_environmental_production_impact` method). The `cross_validate_environmental_risk` method performs safety cross-validation of environmental risks, confirming risk levels and countermeasures. Input parameters include environmental risk assessment results, environmental monitoring data, risk level, and impact range. Analysis includes environmental risk safety verification, risk level confirmation, safety threshold comparison, and emergency response assessment. Output is an environmental risk cross-validation report. The `assess_environmental_production_impact` method assesses the impact of environmental changes on the production system and formulates production adaptation adjustment plans. Input parameters include environmental change data, production equipment status, work plans, and environmental trends. Analysis includes production adaptability assessment, equipment operation impact analysis, work adjustment suggestions, and production efficiency prediction. Output is an environmental-production impact assessment report.
[0037] In this embodiment of the application, the system also establishes a risk assessment model based on equipment type, risk level, and historical data to determine the equipment risk level. The assessment formula is Risk_Score=α×Device_Risk+β×Historical_Pattern+γ×Cross_Domain_Impact+δ×Knowledge_Confidence, where α=0.4, β=0.3, γ=0.2, δ=0.1, and Device_Risk is the basic risk value of the equipment type, with a value range of 0.0-1.0, 0.8 for gas detection devices, 0.9 for surrounding rock support devices, and 0.6 for conveying equipment. Historical_Pattern represents historical pattern risk, based on statistical analysis of historical failure data, with a value range of 0.0-1.0; Cross_Domain_Impact represents cross-domain impact risk, assessing the degree of impact of equipment anomalies on the three domains of safety, production, and environment, with a value range of 0.0-1.0; Knowledge_Confidence represents knowledge confidence, calculated based on semantic similarity and knowledge authority, with a value range of 0.0-1.0; Risk_Score represents the comprehensive risk score, used for risk level classification: high risk (0.7-1.0), medium risk (0.3-0.7), and low risk (0.0-0.3).
[0038] Step S3: Using an improved Rendezvous Hash algorithm combined with a load balancing strategy, the optimal target node is selected from the AI nodes for device allocation.
[0039] In this embodiment, after determining the type of collaborative target, the load balancing selection algorithm uses a minimum load priority strategy to select a specific target AI node. The load assessment is based on indicators such as the number of tasks currently being processed by the node, response time, and resource utilization. The selection process first obtains all available AI nodes of the specified type through an agent discovery mechanism, and then selects the optimal node based on the node's current load ratio. The load ratio calculation formula is: Load_Ratio=Current_Load / Max_Load. The system prioritizes the node with the lowest load ratio as the collaborative target to ensure load balancing and response efficiency.
[0040] This application implements multiple load balancing algorithms, supporting dynamic selection based on scenario requirements. These include the least load algorithm, weighted round-robin algorithm, response time priority algorithm, and adaptive algorithm. The least load algorithm prioritizes selecting the node with the lowest current load. It employs fast path optimization, prioritizing nodes with zero load to avoid traversing all nodes. Load assessment is based on the current number of tasks and load ratio. The weighted round-robin algorithm assigns weights based on the remaining capacity of nodes, with higher capacity resulting in higher weights. The algorithm maintains a weight table, selecting the node with the highest weight each time and reducing its weight accordingly. The response time priority algorithm comprehensively considers load ratio, average response time, and health score. The comprehensive score is calculated using the formula: Score = Load_Ratio + Response_Time / 1. 000+(1-Health_Score), select the node with the lowest score, where Load_Ratio is the node load ratio, ranging from 0.0 to 1.0, Response_Time is the node's average response time (milliseconds), ranging from 0 to 10000ms, calculated through historical request statistics and converted to second-level weight by dividing by 1000, and Health_Score is the node's health score, ranging from 0.0 to 1.0, based on a comprehensive evaluation of CPU utilization, memory utilization, network status, etc., with 1.0 indicating complete health; the adaptive algorithm dynamically evaluates the performance of different algorithms, automatically switches to the optimal algorithm, maintains historical performance records, periodically evaluates the average response time and success rate of each algorithm, and selects the best-performing algorithm.
[0041] In this embodiment, the device sharding allocation mechanism uses an improved Rendezvous Hash algorithm to achieve consistent allocation from device to AI node. The algorithm calculates a hash weight for each device ID and candidate node ID, adjusts it based on node load, and selects the node with the highest adjusted weight. The allocation formula is: Adjusted_Weight = Hash_Weight / (1 + Load_Score), where Hash_Weight is the weight value calculated based on MD5 hashing. The calculation method is int(hashlib.md5(f"{device_id}:{agent_id}".encode()).hexdigest()[:8],16), and the value range is 0. Up to 4294967295 (32-bit unsigned integer); Load_Score is the node's current load score, ranging from 0.0 to 1.0, calculated as current_load / max_load, where current_load is the current number of tasks being processed and max_load is the maximum processing capacity; Adjusted_Weight is the adjusted weight value used for node selection. Nodes with higher weights are selected first, balancing consistent hashing and load balancing. This mechanism ensures that the same device is always assigned to the same node when the load is the same (consistency), while nodes with higher loads have lower weights (load balancing).
[0042] Step S4: Send a collaborative analysis request to the selected AI node through an asynchronous call mechanism, and receive and integrate the analysis results of AI nodes in various fields.
[0043] In this embodiment, Phase 1 of the MEACP collaborative workflow is collaboration triggering and target determination. When an AI sub-node detects a situation requiring cross-domain collaboration (such as gas sensor malfunction, equipment failure, etc.), the system automatically executes the collaboration triggering process: a. Calling the _determine_collaboration_targets method to determine the collaboration target based on a three-dimensional decision tree (AI type × equipment type × risk level). The function of the _determine_collaboration_targets method is to determine the target AI node requiring collaboration based on the current AI node type, equipment type, and risk level using a three-dimensional decision tree algorithm. The input parameter is device_type (equipment type, such as "gas"). The system uses the following parameters: _sensor, "camera", "belt_conveyor", and risk_level (risk level, such as "low", "medium", "high"). The decision-making logic is to execute different collaborative strategy branches based on the current node type (safety AI, production AI, environmental AI). The output format is a list of collaborative targets, with each element being a triple (target AI type, collaborative method name, collaborative reason description). Application scenarios include: gas anomalies triggering ventilation analysis collaboration, equipment failures triggering safety risk assessment collaboration, and personnel violations triggering production impact analysis collaboration. b. It returns a list of collaborative targets, each containing: target AI type, collaborative method name, and collaborative reason description. c. It records collaborative triggering events and decision-making basis for subsequent analysis and optimization.
[0044] Phase 2 of the MEACP collaborative workflow is node discovery and selection. The system realizes intelligent node discovery and selection through the MEACP protocol: a. Call the discover_agents method to query the master node for available AI nodes of the specified type; b. The master node filters candidate nodes based on conditions such as node type, capability matching, and online status; c. Use a load balancing algorithm to select the optimal node, prioritizing the node with the lowest load score; d. Return detailed information of the selected node, including node ID, connection information, and current load. The `discover_agents` method queries the master node for available AI nodes of a specified type or capability. The input parameters are `agent_type` (specifying the target node type) and `capabilities` (specifying the required capability list), both of which are optional. The query process involves each node encapsulating the query conditions into a discovery request message and sending it to the master node. Upon receiving the request, the master node retrieves matching node information from the node registry. The node registry structure is a complete registry maintained by the master node, recording key information for each node such as its identifier, type, capability list, current status, load score, and heartbeat time. The core variable of the node registry is defined as follows: `agent_id` (node identifier), a unique identifier automatically generated by the system. The identifier, in the format "{node type}ai{serial number}", such as "safety_ai_1" and "production_ai_2", is used to uniquely identify each AI node in the distributed network, ensuring the accuracy of message routing and collaborative invocation; agent_type (node type) identifies the node's professional domain type, with values ranging from "safety" (safety AI node), "production" (production AI node), and "environment" (environment AI node), used for type matching and professional domain classification during collaborative triggering; capabilities (capabilities list) describes the professional analytical capabilities possessed by the node, stored in the form of a string list, such as ["safety_assessment", ... ["risk_analysis", "emergency_response"] is used for capability matching queries and professional task allocation; ai_model (AI model identifier) identifies the name and version of the AI model used by the node, such as "deepseek-r1", "qwen-plus", "chatglm-6b", etc., and is used for model performance evaluation and compatibility judgment; load_score (load score) is a numerical indicator reflecting the current busyness of the node, calculated by the formula: current_tasks / total number of loadable tasks (max_capacity), with a value range of 0.0 to 1.0, where 0.0 represents completely idle and 1 represents fully idle.0 indicates full load operation; `last_heartbeat` (last heartbeat time) records the timestamp of the node's last heartbeat message, using Unix timestamp format, and is used for node liveness detection and fault diagnosis. If it hasn't been updated for more than 60 seconds, it's marked as offline. The node registry is generated by registering with the master node via the `AGENT_REGISTER` message upon node startup. After verifying the registration information, the master node stores the node information in the registry. Nodes periodically send heartbeat messages to update their status and load information. The matching algorithm involves the master node traversing all nodes in the registry, first filtering out active online nodes, then performing precise matching based on the requested node type, then checking if the node's capability list contains the required capabilities, and finally sorting by load score in ascending order. The result return involves the master node assembling the matched node information into a response message and returning it to the requesting node, containing complete information such as node identifier, type, load score, capability list, and status.
[0045] Phase 3 of the MEACP collaborative workflow is asynchronous collaborative invocation. After selecting the target node, the system executes the asynchronous collaborative invocation: a. Construct collaborative invocation parameters, including device data, collaborative context, caller information, etc.; b. Initiate a cross-node asynchronous invocation through the call_agent method, specifying the target method and parameters; c. The master node is responsible for message routing and forwarding to ensure that the invocation request is accurately delivered to the target node; d. The target node receives the invocation request, executes the corresponding analysis method, and returns the collaborative result.
[0046] Phase 4 of the MEACP collaborative workflow is result fusion and processing. After the collaborative call is completed, the system performs result fusion and comprehensive processing: a. Receive the analysis results from each collaborative node and verify the result format and completeness; b. Fuse the collaborative results with the analysis results of the current node to generate a comprehensive assessment; c. Generate comprehensive processing recommendations that comply with the "Coal Mine Safety Regulations" based on the fusion results; d. Record the collaborative process and results, and update collaborative statistics and performance indicators.
[0047] In this embodiment, each AI sub-node connects to the master node via the MEACPAgent client to achieve a complete collaborative workflow. The initialization phase involves: calling the connect_and_register method to connect to the master node and register identity information; starting the message_loop to continuously listen for messages from the master node; and registering message handlers, including processing methods such as AGENT_CALL and AGENT_BROADCAST. The collaboration triggering phase involves: when processing device data, calling the _determine_collaboration_targets method to determine the collaboration target; and accurately matching the collaboration strategy based on a three-dimensional decision tree (AI type × device type × risk level). The collaboration execution phase involves: calling the discover_agents method to discover AI nodes of the target type; using a load balancing algorithm to select the available node with the lowest load; initiating an asynchronous cross-node call via the call_agent method to pass complete collaboration parameters; receiving the collaboration results and recording them in the database; and updating collaboration statistics.
[0048] In this embodiment, the system also incorporates a fault-tolerance mechanism, including node monitoring, fault detection, automatic recovery, task migration, and degradation processing. Node monitoring involves AI sub-nodes periodically sending status information, while the master node monitors the health status of the nodes. Fault detection triggers a fault handling process when the master node detects a node going offline. Automatic recovery involves the offline node automatically re-registering and restoring its service status upon reconnection. Task migration involves the faulty node's device being automatically reassigned to other available nodes. Degradation processing involves the system automatically switching to a backup model when the AI model becomes unavailable, ensuring continuous service.
[0049] Step S5: Based on the large language model, perform semantic fusion on the analysis results of multiple domains to generate a comprehensive treatment plan that complies with coal mine safety regulations.
[0050] In this embodiment, the knowledge retrieval enhancement module includes a professional knowledge base, a semantic retrieval unit, a context generator, and an AI inference engine. The professional knowledge base stores mine safety regulations, the semantic retrieval unit performs semantic retrieval, the context generator constructs enhanced prompts, and the AI inference engine performs intelligent inference (supporting multiple implementation methods such as local deployment and cloud API calls). The intelligent cognitive engine includes a risk assessment module, a safety analysis module, a production analysis module, an environmental analysis module, and a collaborative scheduling module. Each analysis module performs in-depth analysis based on the professional knowledge enhanced by knowledge retrieval, and the collaborative scheduling module enables cross-domain collaboration.
[0051] In this embodiment, the knowledge retrieval-enhanced cognitive parsing process is divided into four stages: knowledge retrieval, context construction, AI reasoning, and result generation. In the knowledge retrieval stage, the system retrieves relevant security standards, technical specifications, and operating procedures from a professional knowledge base based on device type, anomaly characteristics, and parsing domain. In the context construction stage, the system integrates the retrieved professional knowledge with device anomaly information to construct enhanced parsing prompts. In the AI reasoning stage, the system calls a configured AI model (supporting local deployment or cloud API calls) for intelligent parsing. In the result generation stage, the system performs structured processing on the AI reasoning results, extracts key information, and outputs it in a formatted manner.
[0052] Specifically, the professional knowledge base is constructed using a hierarchical knowledge representation model, supporting multi-dimensional knowledge retrieval and application. The actual technical implementation architecture includes a local knowledge base, RAGFlow integration, a vector retrieval engine, and a knowledge update mechanism. The local knowledge base is stored in the knowledge / directory and contains three domain knowledge files: safety.json, production.json, and environment.json. The RAGFlow integration supports external RAGFlow knowledge bases and enables remote knowledge retrieval via HTTP API (default port 12345). The vector retrieval engine uses a semantic similarity matching algorithm with a configurable similarity threshold (default 0.75). The knowledge update mechanism supports hot updates, allowing new knowledge to be loaded without restarting the system. The knowledge base construction comprises four core stages: knowledge acquisition, knowledge representation, knowledge organization, and knowledge maintenance. Knowledge acquisition gathers professional knowledge from multiple authoritative sources, including coal mine safety regulations, industry technical specifications, equipment operation manuals, expert experience, and historical cases. The acquisition process combines automation and manual methods to ensure the comprehensiveness and accuracy of the knowledge. Knowledge representation employs a combination of ontology and semantic networks to support the effective expression of different types of knowledge. Ontological knowledge uses a concept-relation-instance model, suitable for normative knowledge and standardized data, while semantic network knowledge uses a node-edge-attribute graph structure, suitable for descriptive knowledge and experiential content. Knowledge organization is categorized in multiple dimensions according to equipment type, business domain, and knowledge type. Equipment types include six major categories: gas detection devices, particulate matter monitoring devices, conveying equipment, surrounding rock support devices, ventilation equipment, and drainage equipment. Business domains include three major areas: safety monitoring, production management, and environmental protection. Knowledge types include various types such as safety standards, technical specifications, operating procedures, fault diagnosis, and emergency response.
[0053] The semantic retrieval algorithm enables knowledge retrieval based on semantic similarity, supporting natural language queries and exact matching. The algorithm comprises four core steps: text vectorization, similarity calculation, result ranking, and relevance filtering. Text vectorization utilizes a pre-trained Chinese language model to convert both knowledge and query texts into high-dimensional vector representations. The vectorization process considers lexical semantics, syntactic structure, and contextual information, generating dense vectors that reflect the text's semantics. The vector dimension is set to 768 dimensions to balance representational power and computational efficiency. Similarity calculation employs the cosine similarity algorithm to calculate the semantic similarity between the query vector and the knowledge vector. The cosine similarity formula is: similarity = cos(θ) = (A·B) / (|A|×|B). The result is ranked based on a combination of similarity score and knowledge weight. The ranking formula is: final_score = similarity_score × knowledge_weight, where similarity_score is the semantic similarity score, and knowledge_weight is the knowledge weight. The knowledge weight takes into account factors such as the authority of the knowledge source, the importance of the knowledge content, and the frequency of knowledge use. The ranking algorithm adopts a weighted ranking strategy, which combines similarity and weight information to generate the final ranking of search results.
[0054] The context-enhanced prompt word generation algorithm constructs prompt words to enhance knowledge retrieval. It organically integrates retrieved professional knowledge with equipment anomaly information to generate high-quality AI cognitive analysis prompt words. Prompt word generation includes four stages: information extraction, knowledge fusion, template construction, and quality optimization. Information extraction extracts key information from equipment anomaly data, including equipment type, anomaly parameters, anomaly severity, location information, and time information. The extraction process uses a combination of rule matching and pattern recognition to ensure the accuracy and completeness of information extraction. Knowledge fusion associates and integrates retrieved professional knowledge with equipment anomaly information. The fusion process considers factors such as the relevance between knowledge and anomalies, the applicable conditions of knowledge, and the application scenarios of knowledge. The fusion result forms a knowledge-anomaly association graph, clarifying the application methods and application priorities of knowledge. Template construction is based on predefined prompt word templates. The fused information is filled into the templates to generate complete cognitive analysis prompt words. The template design considers the special needs of different AI cognitive analysis types, including safety analysis templates, production analysis templates, and environmental analysis templates.
[0055] In this embodiment, the AI cognitive inference engine adopts a multi-mode AI cognitive inference architecture that supports local deployment, cloud API calls, and professional model integration. This enables unified management and intelligent scheduling of various AI models, including local deployment schemes (Ollama, vLLM, TensorRT, etc.), cloud API calls, and professional mining models. The actual technical implementation configuration is as follows: the default port for the Ollam service is 11434, supporting open-source models such as DeepSeek-R1, Qwen, and ChatGLM; model management is unified through the LLMManager class, supporting hot model switching and parallel operation; inference scheduling adopts an asynchronous inference mechanism, supporting concurrent processing of multiple analysis requests; and the backup plan is to automatically switch to the cloud API (such as DeepSeekAPI) when Ollam is unavailable. The local cognitive inference architecture comprises four core modules: model management, inference scheduling, resource optimization, and result processing. The model management module employs a three-tier priority selection strategy: the first priority is the local Ollam model (such as DeepSeek-R1), the second priority is the cloud API model, and the third priority is rule engine analysis. Model selection is dynamically decided based on availability detection, network conditions, and configuration strategies. The inference scheduling module implements an intelligent model selection and degradation mechanism. When a high-priority model becomes unavailable, the system automatically switches to the next lower-level model to ensure the continuity of analysis services. It supports three inference modes: local inference, API calls, and rule analysis.
[0056] In this embodiment, cross-domain collaborative cognitive fusion technology enables collaborative analysis and result fusion of AI sub-nodes from different professional fields, improving the accuracy and reliability of cognitive analysis results. Cross-domain collaborative fusion includes four key stages: collaborative triggering, analysis convergence, large model fusion, and quality assessment. Collaborative triggering automatically determines the professional fields requiring collaboration based on a three-dimensional decision tree (AI type × equipment type × risk level). When a single equipment malfunction may affect multiple professional fields, the system automatically triggers the cross-domain collaboration mechanism, calling relevant safety AI, production AI, and environmental AI sub-nodes for professional analysis. Analysis convergence adopts an asynchronous parallel mechanism, with each professional AI sub-node simultaneously performing domain-specific analysis. Each sub-node generates a domain-specific analysis report based on its own professional knowledge base and AI model, including risk assessment. The evaluation includes assessment, impact analysis, and disposal recommendations. The large-scale model fusion uses analysis reports from various professional fields as input, leveraging the natural language understanding and reasoning capabilities of a large language model for comprehensive analysis. The fusion process integrates multiple analysis reports into a unified comprehensive disposal plan by constructing professional prompt templates, ensuring the comprehensiveness and consistency of the disposal recommendations. Quality assessment checks the fusion results for quality and credibility. Evaluation indicators include dimensions such as synergistic integrity, professional consistency, disposal rationality, and executability. Synergistic integrity assessment checks the coverage of analyses from various professional fields; professional consistency assessment checks the logical consistency of conclusions from different fields; disposal rationality assessment checks whether the comprehensive disposal plan complies with the "Coal Mine Safety Regulations"; and executability assessment checks the actual operability and resource feasibility of the disposal recommendations.
[0057] In this embodiment, the system implements an intelligent fusion mechanism based on a large language model. The result aggregation process involves structurally aggregating the analysis results from various professional AI sub-nodes, including risk assessment, impact analysis, and disposal recommendations. Through the natural language understanding and reasoning capabilities of the large language model, multiple professional analysis reports are comprehensively analyzed and disposal plans are generated. The result fusion strategy employs a weighted average method for risk assessment results, a voting mechanism combined with expert rules for disposal recommendations, and a maximum value strategy for confidence levels to ensure result reliability. The conflict resolution mechanism prioritizes the recommendations of the safe AI (reflecting the principle of safety first) when collaborative results conflict, followed by the result with the highest confidence level, and finally the result with the most recent timestamp.
[0058] In this embodiment, device control commands are automatically generated based on AI cognitive analysis results, realizing an intelligent closed loop from analysis to control. Control command generation includes four core steps: demand analysis, strategy matching, parameter calculation, and command construction. Demand analysis extracts control demand information from the AI cognitive analysis results, including risk level, anomaly type, impact scope, and urgency. The analysis process uses a combination of rule engine and expert system to determine the type and priority of control actions to be executed. Strategy matching is based on a control rule base to match corresponding control strategies for different anomalies. The control rule base contains standardized control strategies for different device types, anomaly types, and risk levels. Parameter calculation calculates specific control parameters based on the current state of the device and the control objective. The calculation process uses mathematical models and simulation algorithms, taking into account the physical characteristics, operational constraints, and safety limitations of the device.
[0059] The extended model context protocol supports device control functions and defines the control_command message type. This extension introduces a standardized format for device control instructions, including key elements such as instruction identifier, target device, execution action, control parameters, source resolution, and authorization information. Control instructions support multiple action types: emergency start, emergency stop, parameter adjustment, mode switching, etc. Control parameters are dynamically configured according to different device types and action types, such as speed control of ventilation equipment, flow regulation of drainage equipment, and speed adjustment of conveying equipment. The authorization mechanism ensures that only instructions verified by AI cognitive analysis can be executed, preventing misoperation and security risks. The instruction traceability mechanism establishes the correlation between control instructions and AI cognitive analysis results through the source resolution field, realizing complete decision chain tracing.Specifically, control commands include `device_control`, `emergency_stop`, and `parameter_adjust`. `device_control` commands execute basic control operations such as starting, stopping, and switching modes. The command format includes fields such as command identifier, target device ID, control action type, execution parameters, priority, and timeout. Control action types include `start` (start), `stop` (stop), `restart` (restart), `switch_mode` (mode switching), and `status_check` (status check). Execution parameters are dynamically configured based on different device types and action types. The security level is medium, requiring basic permission verification and condition checks. `emergency_stop` commands are used to immediately stop devices in emergency situations. They have the highest priority and are used for rapid response to dangerous situations. The command format includes key fields such as emergency stop type, affected area, stop reason, recovery conditions, and responsible person information. Stop types include `immediate_stop` (immediate stop), `area_shutdown` (area stop), `system_halt` (system stop), and `power_cutoff` (power-off stop). The affected area... This includes single_device (single device), device_group (device group), work_area (work area), and entire_system (entire system). Triggering conditions include emergency situations such as gas concentration exceeding 1.5% (power-off concentration), severe equipment failure, personnel safety threats, and environmental hazards. It has the highest safety level, absolute execution authority, and can override other control commands. The parameter_adjust command is used for fine-tuning equipment operating parameters to optimize equipment performance and adapt to changing operating conditions. The command format includes detailed information such as parameter name, target value, adjustment method, adjustment rate, safety range, and rollback mechanism. Adjustment methods include direct_set, gradual_adjust, proportional_change, and step_change. Parameter types include operating parameters such as ventilation equipment speed, drainage pump flow rate, conveyor belt speed, sensor sampling frequency, and alarm threshold. The safety range has a predefined safe adjustment range for each parameter; adjustment requests exceeding this range will be rejected. The adjustment rate controls the speed of parameter change to avoid drastic changes impacting equipment and the system. It has a medium safety level and requires parameter range verification and gradual adjustment protection.
[0060] In this embodiment, a multi-layered device control security verification mechanism is established to ensure the security and reliability of control commands. The security verification includes four verification layers: permission verification, condition checking, conflict detection, and risk assessment. Permission verification checks whether the initiator of the control command has the corresponding control permissions. The verification process is based on a role-based access control model, checking the initiator's identity, role, and scope of permissions. Condition checking verifies whether the execution conditions of the control command are met. The check content includes device status checks, environmental condition checks, precondition checks, and dependency checks. Conflict detection identifies potential conflicts and contradictions between control commands. The detection content includes time conflicts, resource conflicts, logical conflicts, and target conflicts.
[0061] In this embodiment, the data storage layer adopts a hybrid architecture of MySQL + WebSocket + memory caching to achieve high-performance real-time data processing. The hybrid architecture includes four core technologies: data layering, storage strategy, access optimization, and consistency guarantee. Data layering divides data into three levels: hot data, warm data, and cold data, based on the access frequency and timeliness requirements. Hot data is stored in a memory buffer, providing millisecond-level access response; warm data is stored in a Redis cache, providing second-level access response; and cold data is stored in a MySQL database, providing minute-level query response. The storage strategy is based on data characteristics and business needs, and differentiated storage and management strategies are formulated. Hot data is stored using a circular buffer, warm data uses a Least Recently Used (LRU) caching strategy, and cold data uses partitioned storage and compression technology.
[0062] Establish a unified data identification standard and relationship management mechanism to achieve data traceability and relationship resolution. Identifier standardization includes four aspects: identification standard, relationship model, tracking mechanism, and query optimization. The identification standard defines a unified data identifier format and generation rules. The identifier format adopts a "timestamp-type identifier" structure, including message identifiers (timestamp-M), alarm identifiers (timestamp-A), report identifiers (timestamp-R), control identifiers (timestamp-C), etc. The relationship model establishes a mechanism for representing and managing the relationships between data. Relationships include parent-child relationships, reference relationships, dependency relationships, and time sequence relationships. The tracking mechanism enables complete tracking and auditing of the data processing chain. Tracking information includes elements such as data source, processing node, processing time, processing result, and downstream destination.
[0063] In this embodiment, the model context protocol also designs a message routing mechanism to implement an intelligent routing mechanism based on device type and risk level. This mechanism dynamically determines the message distribution target and routing strategy based on the device type identifier and risk level assessment result in the message. The routing rules adopt a hierarchical processing strategy: high-risk and medium-risk messages are broadcast simultaneously to all relevant AI cognitive analysis nodes to ensure multi-dimensional collaborative analysis; low-risk messages are unicast only to the main analysis nodes of the corresponding device type to improve processing efficiency. The routing target selection algorithm considers the professional domain matching degree of AI sub-nodes, current load status, and historical processing effects to achieve load balancing and performance optimization. A complete tracing link is established during message routing to record the message flow path and processing nodes, supporting fault diagnosis and performance analysis.
[0064] In this embodiment, the system also incorporates a knowledge base expansion and optimization mechanism to support continuous improvement and technological evolution. The dynamic expansion of the knowledge base supports the addition of various knowledge sources, such as industry standards, technical specifications, and expert experience. A standardized knowledge import interface is used, allowing new knowledge to be imported into the system in various formats, including JSON, XML, and text. The knowledge import process includes automated steps such as format conversion, semantic parsing, quality verification, and index construction. Knowledge version management implements a complete knowledge version control mechanism, supporting incremental updates, rollback recovery, and branch management. Each knowledge update generates a version identifier, allowing the system to track the evolution history of knowledge and support A / B testing to verify the effectiveness of new knowledge. Retrieval algorithm optimization supports online optimization and parameter adjustment of retrieval algorithms, including key parameters such as similarity thresholds, weight allocation, and ranking strategies. The system provides algorithm performance monitoring and effect evaluation mechanisms, automatically adjusting algorithm parameters based on actual application results. Multimodal knowledge fusion expansion reserves a multimodal knowledge interface to support future expansion with multimedia knowledge sources such as images, videos, and audio. The system architecture supports plug-in expansion of new knowledge types, allowing support for new knowledge modalities without modifying the core code.
[0065] In this embodiment, the model context protocol also features a complete extension and optimization mechanism, supporting continuous protocol evolution and functional expansion. Protocol version compatibility employs semantic versioning, supporting backward-compatible protocol upgrades. Newer protocol versions can handle older message formats, ensuring smooth system upgrades. The protocol version negotiation mechanism allows clients and servers of different versions to automatically negotiate the optimal protocol version. Dynamic device type extension reserves a device type extension interface, supporting the addition of new device types without modifying the core protocol. Device type definitions use an extensible enumeration structure, and new device types can be dynamically registered via configuration files or APIs. Each device type can define dedicated data fields and control commands. Control command set extension supports dynamic extension and customization of control commands. New control commands can be loaded via a plugin mechanism, and command parameters use flexible JSON. The schema definition supports complex parameter structures and verification rules. The instruction executor adopts a policy pattern design, supporting personalized control logic for different devices. Protocol performance optimization provides protocol performance monitoring and optimization mechanisms, including key indicators such as message transmission latency, processing time, and error rate. It supports online adjustment of protocol parameters, such as timeout, retry count, and batch size. Protocol compression and caching mechanisms can be automatically adjusted according to network conditions and load. Multi-protocol fusion extension reserves interfaces for fusion with other industrial protocols, supporting integration with standard protocols such as OPC-UA, Modbus, and MQTT. The protocol converter adopts an adapter pattern design, supporting message conversion and routing between different protocols.
[0066] The system performance reference indicators (related to deployment scale, model, and hardware configuration) of this application embodiment are as follows: AI cognitive analysis response is in the low second level (depending on the model and hardware); device control response is in the second level (depending on the link and device interface); system availability is designed according to the cluster architecture and SLA target; concurrent processing capability supports linear expansion according to the cluster size; data storage capacity is expanded according to storage strategy and hardware.
[0067] In the application of one embodiment of the present invention, the implementation process is as follows: Case 1: Abnormal monitoring data of surrounding rock support.
[0068] Scenario Description: The surrounding rock support device detected an abnormal increase in support pressure, exceeding 85% of the design bearing capacity. The system identified this as a high-risk condition. Figure 6 , Figure 7 As shown.
[0069] Handling procedures: 1. Equipment data reporting: The MCP equipment server receives the pressure data of the surrounding rock support device and sends it to the MEACP master node through the DEVICE_DATA message.
[0070] 2. Risk Alert Generation: When the master node detects abnormal pressure, it generates a RISK_ALERT message and stores it in the alerts table of the MySQL database.
[0071] 3. AI-based sub-node analysis: Based on the technical specifications for surrounding rock support in the professional knowledge base, potential roof collapse risks are analyzed through RAG knowledge retrieval.
[0072] 4. Comprehensive Solution Output: Based on the analysis results, an emergency response plan is generated: "Immediately stop operations in the area, strengthen support, monitor surrounding rock deformation, and prepare for personnel evacuation."
[0073] 5. Execution monitoring: Control commands are executed via CONTROL_COMMAND messages, and the monitoring panel displays the risk status and handling progress in real time.
[0074] Technical features: Demonstrates rapid response and multi-dimensional collaborative decision-making capabilities in high-risk scenarios, ensuring personnel safety as a top priority.
[0075] Case 2: Abnormal gas sensor monitoring data.
[0076] Scenario Description: gas_sensor_001 detected a CH4 concentration of 1.8%, exceeding the system's set alarm threshold of 1.2%. Figure 8 , Figure 9 , Figure 10 As shown.
[0077] Handling procedures: 1. Device data reporting: The MCP device server (port 8081) receives sensor data and sends it to the MEACP master node (port 9090) via the DEVICE_DATA message.
[0078] 2. Risk Alert Generation: When the master node detects an anomaly, it generates a RISK_ALERT message and stores it in the MySQL database alerts table.
[0079] 3. AI Node Collaboration: Based on the technical specifications for surrounding rock support in the professional knowledge base, potential roof collapse risks are analyzed through RAG knowledge retrieval.
[0080] - Secure AI nodes are registered via AGENT_REGISTER and receive AI_ANALYSIS requests.
[0081] - The node retrieves relevant articles from the local knowledge base of the "Coal Mine Safety Regulations".
[0082] - Perform analysis using Ollam native inference (DeepSeek-R1 model).
[0083] - Production AI and environmental AI nodes participate in collaborative analysis via AGENT_CALL messages.
[0084] 4. Comprehensive Solution Output: Based on RAG-enhanced expertise, the following response recommendations are generated: "The current gas concentration of 1.3% exceeds the alarm threshold. It is recommended to immediately activate the local ventilation fan, strengthen gas monitoring, and prepare a personnel evacuation plan."
[0085] 5. Execution Monitoring: Trigger corresponding device control operations via the CONTROL_COMMAND message. Technical features: The entire process achieves standardized communication through the six message types of the MEACP protocol, demonstrating the complete application of the protocol in real-world scenarios.
[0086] Example 2 This invention provides an intelligent monitoring device for mine equipment based on knowledge retrieval-enhanced generation. Figure 11 This is a schematic flowchart of a mine equipment intelligent monitoring device based on knowledge retrieval enhancement provided in an embodiment of the present invention. Figure 11 As shown, the device includes: The data acquisition and standardization module 100 is used to acquire real-time data of the equipment through the communication protocol of the dedicated intelligent agent for monitoring mining equipment, and generate standardized messages based on the equipment type and risk level. The 3D decision tree collaboration strategy module 200 is used to determine the type of AI node to be collaborated and the collaboration method using the 3D decision tree algorithm, and to match cross-domain collaboration strategies based on the current AI node type, device type and risk level. An improved hash load balancing module 300 is used to select the optimal target node from AI nodes for device allocation by adopting an improved RendezvousHash algorithm combined with a load balancing strategy. The asynchronous call and result integration module 400 is used to send collaborative analysis requests to selected AI nodes through an asynchronous call mechanism, and to receive and integrate the analysis results of AI nodes in various fields. The semantic fusion and processing generation module 500 is used to perform semantic fusion on the analysis results of multiple domains based on a large language model, and generate a comprehensive processing plan that complies with coal mine safety regulations.
[0087] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0088] Example 3 To implement the methods of the above embodiments, the present invention also provides an electronic device, which includes a memory and a processor; wherein the processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the various steps of the methods described above.
[0089] Example 4 To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in the foregoing embodiments.
[0090] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0091] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0092] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A method for intelligent monitoring of mine equipment based on knowledge retrieval-enhanced generation, characterized in that, include: S1 acquires real-time data of the equipment through the dedicated intelligent agent communication protocol for monitoring mining equipment, and generates standardized messages based on equipment type and risk level; S2, using a three-dimensional decision tree algorithm to determine the type of AI node to be collaborated with and the collaboration method, and matching cross-domain collaboration strategies based on the current AI node type, device type and risk level; S3 employs an improved RendezvousHash algorithm combined with a load balancing strategy to select the optimal target node from AI nodes for device allocation; S4 sends collaborative analysis requests to selected AI nodes through an asynchronous call mechanism, and receives and integrates the analysis results of AI nodes in various fields; S5 uses a large language model to perform semantic fusion on the analysis results of multiple domains, generating a comprehensive treatment plan that complies with coal mine safety regulations.
2. The method according to claim 1, characterized in that, The method of acquiring real-time data from equipment through a dedicated intelligent agent communication protocol for mining equipment monitoring, and generating standardized messages based on equipment type and risk level, also includes: The real-time device data includes the fields device_id, device_type, timestamp, data, and fault_data, where device_type uses a predefined device type identifier; The standardized messages include nine message types: AGENT_REGISTER, AGENT_DISCOVERY, AGENT_CALL, AGENT_BROADCAST, AGENT_HEARTBEAT, DEVICE_SEEN, DEVICE_ASSIGNMENT, ROUTE_UPDATE, and MONITORING_TOGGLE. Each message type has a standardized data structure and semantic definition.
3. The method according to claim 1, characterized in that, The method of using a three-dimensional decision tree algorithm to determine the type of AI node to be collaborated with and the collaboration method, and matching cross-domain collaboration strategies based on the current AI node type, device type, and risk level, also includes: The three-dimensional decision tree algorithm includes a node type judgment layer, a device type matching layer, and a risk level filtering layer. When the safety AI node handles high risk in gas_sensor, it triggers environment and production collaboration. When the production AI node handles belt_conveyor failure, it triggers safety and environment collaboration. The collaboration method adopts a standardized naming rule {source node type} to {target node type}, such as safety_to_environment and production_to_safety. Each collaboration type corresponds to a specific processing method and return format.
4. The method according to claim 1, characterized in that, The method of selecting the optimal target node from AI nodes for device allocation by combining the improved RendezvousHash algorithm with a load balancing strategy also includes: The improved RendezvousHash algorithm is expressed by the formula... Calculate the adjusted weight, where Hash_Weight is a 32-bit unsigned integer converted from the first 8 bits of the MD5 hash value; The load balancing strategies include the least load algorithm, the response time algorithm, and the adaptive algorithm.
5. The method according to claim 1, characterized in that, The method of sending collaborative analysis requests to selected AI nodes via asynchronous invocation mechanisms, and receiving and integrating the analysis results from AI nodes in various fields, also includes: The asynchronous call mechanism transmits device data, request node information, coordination reason and coordination type parameters through the call_agent method, and the master node performs message routing and forwarding. The integration process employs a weighted consensus algorithm, where risk assessment results are obtained using a weighted average method, disposal recommendations are obtained through a voting mechanism combined with expert rules, and confidence levels are determined using a maximum value strategy.
6. The method according to claim 1, characterized in that, Also includes: Based on the AI cognitive analysis results, device control commands are generated, and control operations are executed through the model context protocol, including: When generating the emergency_stop instruction, permissions and execution conditions are verified, and an immediate_stop type instruction is triggered when the gas concentration exceeds 1.5%. When generating the parameter_adjust instruction, the parameter safety range is checked, and the gradual_adjust adjustment method is used to avoid device impact.
7. A smart monitoring device for mine equipment based on knowledge retrieval and enhanced generation, characterized in that, include: The data acquisition and standardization module is used to acquire real-time data from equipment through the communication protocol of the dedicated intelligent agent for monitoring mining equipment, and to generate standardized messages based on equipment type and risk level. The 3D decision tree collaboration strategy module is used to determine the type of AI node to be collaborated with and the collaboration method using the 3D decision tree algorithm, and to match cross-domain collaboration strategies based on the current AI node type, device type and risk level. An improved hash load balancing module is used to select the optimal target node from AI nodes for device allocation by adopting an improved RendezvousHash algorithm combined with a load balancing strategy. The asynchronous call and result integration module is used to send collaborative analysis requests to selected AI nodes through an asynchronous call mechanism, and to receive and integrate the analysis results of AI nodes in various fields. The semantic fusion and processing generation module is used to perform semantic fusion on the analysis results of multiple domains based on a large language model, and generate a comprehensive processing plan that complies with coal mine safety regulations.
8. The apparatus according to claim 7, characterized in that, The data acquisition and standardization module is also used for: The real-time device data includes the fields device_id, device_type, timestamp, data, and fault_data, where device_type uses a predefined device type identifier; The standardized messages include nine message types: AGENT_REGISTER, AGENT_DISCOVERY, AGENT_CALL, AGENT_BROADCAST, AGENT_HEARTBEAT, DEVICE_SEEN, DEVICE_ASSIGNMENT, ROUTE_UPDATE, and MONITORING_TOGGLE. Each message type has a standardized data structure and semantic definition.
9. An electronic device, characterized in that, Including processor and memory; The processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the method as described in any one of claims 1-6.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.