Large model and retrieval enhanced intelligent gas risk studying, judging and handling method and equipment
By standardizing processing and using a multi-dimensional correlation scoring mechanism, the semantic heterogeneity problem of coal mine gas over-limit alarm texts was solved, enabling accurate risk assessment and safety decision-making, and ensuring the scientific and compliant nature of the decisions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA COAL RES INST
- Filing Date
- 2026-01-15
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies struggle to effectively utilize unstructured coal mine gas over-limit alarm texts for accurate risk assessment, and large language models lack in-depth understanding in the field of coal mine safety, which can easily lead to misleading decisions.
By introducing a large language model parser and a standardized ontology model for gas over-limit risk, unstructured alarm descriptions are standardized into RDF triple representations. Combined with a multi-dimensional relevance scoring mechanism, highly relevant knowledge fragments are selected for causal reasoning to generate risk management strategies.
It enables accurate assessment of coal mine gas exceedance risks, ensuring the scientific and safe nature of decision-making, complying with coal mine safety regulations, and possessing interpretability and legal accountability traceability.
Smart Images

Figure CN122047996A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of coal mine safety monitoring and intelligent auxiliary decision-making technology, and in particular to methods and equipment for intelligent assessment and handling of gas risks using large models and retrieval enhancement. Background Technology
[0002] Coal mine gas accidents are one of the major hazards threatening safe production in mines. Establishing an efficient and accurate risk assessment and emergency response mechanism for gas exceedances is crucial for ensuring the safety of underground workers. With the advancement of intelligent coal mine construction, modern mines have widely deployed safety monitoring systems capable of collecting real-time data from sensors such as methane concentration, wind speed, and negative pressure, and generating alarm records when anomalies are detected. These alarm records, along with the emergency response logs of dispatch center personnel, are typically in unstructured natural language text format, containing a wealth of valuable experience and knowledge regarding fault phenomena, operational condition evolution, and response measures.
[0003] In existing coal mine safety auxiliary decision-making processes, the utilization of the aforementioned unstructured alarm texts still faces technical bottlenecks. Firstly, since alarm texts primarily originate from automatically generated system logs or manually entered descriptions, their expression is highly arbitrary and ambiguous. Different monitoring systems or on-duty personnel often use different vocabulary or sentence structures to describe the same type of gas over-limit risk, resulting in a high degree of heterogeneity in the semantic space for the same physical state. Traditional retrieval techniques based on keyword matching or shallow semantic analysis struggle to overcome these expression differences, failing to accurately identify historical cases with the same risk essence but different descriptions, thus hindering the effective reuse of crucial handling experience.
[0004] While large language model technology has made groundbreaking progress in the field of natural language processing in recent years, its direct application to the high-risk vertical field of coal mine safety still faces severe challenges. General-purpose large language models lack a deep understanding of the complex physical environment and safety regulations in underground coal mines. When generating response strategies, they are prone to unrealistic illusions and may even provide erroneous suggestions that violate the "Coal Mine Safety Regulations." More critically, most existing Retrieval Augmentation (RAG) techniques rely solely on text-level vector similarity for knowledge retrieval, ignoring the implicit temporal evolution characteristics and physical parameter trends behind gas exceedance events. For example, simple text retrieval may fail to distinguish between a sudden surge in gas caused by a fan stoppage and a slow accumulation of gas caused by mining disturbances. Although both contain descriptions of increased gas concentration in the text, their physical causes, evolutionary logic, and corresponding response measures are completely different. This retrieval method, lacking consistency verification of physical condition trends, is highly susceptible to introducing misleading historical knowledge, thereby affecting the scientific validity and safety of the final decision. Furthermore, existing technologies, when utilizing large model generation strategies, often lack compliance constraints and traceability of the output results, making it difficult to meet the stringent requirements of coal mine safety production for the interpretability of the decision-making process and the traceability of legal responsibilities.
[0005] Therefore, there is an urgent need for an intelligent assessment method for gas over-limit risks that can achieve risk semantic standardization, deeply integrate physical evolution trends, and have strict compliance constraints. Summary of the Invention
[0006] This disclosure aims to at least partially address one of the technical problems in the related art.
[0007] To this end, the first aspect of this invention provides a method for intelligent assessment and handling of gas risks using a large model and enhanced retrieval. After obtaining the semantic description text of a gas over-limit alarm, this method does not directly perform retrieval or generation. Instead, it first introduces a standardized processing flow: using a large language model fine-tuned with instructions from the coal mine safety field as a parser, it extracts key risk elements from the unstructured alarm description; subsequently, it introduces a pre-constructed standardized ontology model of gas over-limit risk as a semantic constraint layer, mapping the extracted risk elements (such as relative time and fuzzy numerical descriptions) into standard terms conforming to RDF triple representation, and reconstructing and generating standardized risk description text based on a preset template.
[0008] After obtaining standardized risk inputs, this invention implements a multi-dimensional retrieval enhancement generation strategy. The system pre-constructs a coal mine safety knowledge vector library containing heterogeneous data from multiple sources, including procedures, cases, and contingency plans, and performs vectorization and structured tagging on knowledge fragments. During the retrieval phase, the system not only calculates the semantic similarity between the query vector and the knowledge fragments but also introduces a specific multi-dimensional relevance scoring mechanism. This mechanism comprehensively evaluates ontology consistency, procedure item coverage, historical case matching degree, and consistency of monitoring data prediction trends through a calculation formula, thereby selecting highly relevant knowledge fragments.
[0009] Finally, the system will select highly relevant knowledge fragments containing mandatory requirements of procedures, historical case handling results, and operating condition parameter thresholds, and then structurally integrate them with the original alarm text and standardized descriptions to construct a contextualized semantic context. This context will be input into a large language model for causal reasoning and to generate risk handling strategies.
[0010] Preferably, during the risk semantic standardization process, the system utilizes predefined mapping rules to perform data alignment, such as mapping relative time descriptions to standard time window entities and associating numerical information with specific gas parameter instances. This process ensures that the query conditions input into the retrieval system are based on a unified ontology concept, rather than relying on varied natural language expressions.
[0011] Preferably, in the multidimensional correlation calculation, a verification of the consistency of prediction trends is specifically introduced. The system strengthens the physical condition relevance of the search results by comparing the changing trends (such as rising, falling, and sudden changes) of parameters such as ventilation speed and coalbed methane pressure in the current risk factors with the evolution trends of working conditions described in historical cases or regulations in the knowledge base, rather than relying solely on the superficial similarity of the text.
[0012] Preferably, the weight coefficients of each dimension in the weighted sum are obtained by training on a training set that includes historical alarm records and manually labeled data, so as to adapt to the emphasis needs of different mines or different disaster types.
[0013] A second aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.
[0014] This invention constructs a standardized ontology model for gas over-limit risk based on RDF triples and uses mapping rules to transform unstructured risk elements parsed from a large language model into standard terms. This unifies diverse and semantically ambiguous original alarm texts into structured and standardized descriptions, effectively eliminating semantic ambiguity caused by differences in description habits among different personnel or systems. It provides standardized and accurate semantic input for subsequent knowledge retrieval and avoids retrieval noise caused by non-standard query conditions.
[0015] This invention employs a multi-dimensional relevance scoring mechanism that includes semantic similarity, ontological consistency, and predictive trend consistency. In particular, it introduces a comparative verification of the changing trends of ventilation velocity and coalbed methane pressure. This enables the knowledge retrieval process to move beyond mere textual similarity and delve deeper into historical cases and procedural clauses that are highly consistent with the evolutionary logic of physical working conditions and the current risk scenario. This improves the applicability and accuracy of the retrieved external knowledge in real-world, complex engineering environments.
[0016] This invention integrates selected highly relevant procedural clauses, historical case handling results, and standardized risk descriptions to construct a contextualized semantic context with clear evidence as the inference input for a large language model. This ensures that the model's inference generation process is strictly constrained within the scope of verified domain knowledge, effectively suppressing the illusion phenomenon that may occur when the large language model lacks specific contextual support. It also ensures that the final risk handling strategy has a clear procedural source and data support, achieving traceability of security decisions.
[0017] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0018] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which: Figure 1 This is a schematic diagram of the method flow provided in the embodiments of this disclosure; Figure 2 This is a schematic diagram of the system architecture provided in the embodiments of this disclosure; Figure 3 This is a hardware structure block diagram provided for an embodiment of the present disclosure. Detailed Implementation
[0019] Embodiments of this disclosure are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0020] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this disclosure are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. The acquisition, transmission, storage, use, and processing of data in the technical solution of this disclosure all comply with the relevant provisions of national laws and regulations.
[0021] It should be noted that in the embodiments disclosed herein, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary and are intended only to illustrate the feasibility of implementing the technical solutions disclosed herein. However, they do not mean that the applicant has used or necessarily used such solutions.
[0022] See attached document Figure 1 and attached Figure 2 This invention provides a method for intelligent assessment and handling of gas risks with large-scale model and retrieval enhancement. The method is executed by a computer device that runs a system including a data acquisition module, a semantic parsing module, a standardization processing module, a knowledge base management module, a multi-dimensional retrieval module, and a reasoning and decision-making module.
[0023] The data acquisition module connects to the semantic parsing module to receive and transmit semantic description text for gas over-limit alarms. The semantic parsing module connects to the standardization processing module, which contains a finely tuned large language model to extract structured elements from the input text. The standardization processing module connects to the multidimensional retrieval module to map the extracted elements to standard terms. The knowledge base management module maintains a knowledge vector library for coal mine safety and provides a retrieval space for the multidimensional retrieval module. The multidimensional retrieval module performs relevance calculations and filters knowledge fragments. The reasoning and decision-making module connects to the multidimensional retrieval module, receives the fused context, and outputs risk management strategies.
[0024] During the execution of the method, the data acquisition module first obtains the semantic description text of the gas over-limit alarm. This text contains a natural language description of the current underground gas state, including predicted values, time information, and trend judgments. The system then inputs this text into the semantic parsing module. The semantic parsing module uses a preset prompt template to drive a large language model to parse the text, identify and output structured risk elements including time range, predicted gas concentration, threshold comparison results, ventilation speed changes, and coalbed gas pressure trends.
[0025] Subsequently, the standardization processing module receives structured risk elements. Based on a pre-built standardized ontology model of gas exceedance risk, this module uses mapping rules to convert risk elements into standard terms. For example, relative time descriptions are converted into standard time window entities, and numerical values are associated with specific parameter instances. The standardization processing module reorganizes these standard terms according to a preset template to generate standardized risk description text. This standardized risk description text serves as the unified semantic input for subsequent retrieval processes.
[0026] The multidimensional retrieval module performs searches in the coal mine safety knowledge vector library maintained by the knowledge base management module based on standardized risk description text. The retrieval process includes converting the standardized risk description text into query vectors and extracting key fields as structured filtering conditions. The multidimensional retrieval module retrieves candidate knowledge fragments from the knowledge base and calculates a multidimensional relevance score for each candidate knowledge fragment.
[0027] The multidimensional retrieval module uses the following formula to calculate the relevance score of each candidate knowledge fragment: ; in, This indicates the overall relevance score; This indicates the semantic similarity between the query vector and the knowledge fragment vector; This represents the ontology consistency score between the current event and the knowledge fragment label; This indicates the coverage of procedural entries related to current risk factors by a knowledge segment; This indicates the degree of matching between the current risk scenario and historical cases; This indicates that the current monitoring data is consistent with the predicted trend of the working conditions described in the knowledge fragment; This represents the weighting coefficients for each dimension.
[0028] The multidimensional retrieval module sorts candidate knowledge fragments based on a calculated comprehensive relevance score, and identifies fragments with scores exceeding a set threshold as highly relevant knowledge fragments. These highly relevant knowledge fragments include procedural clauses, historical cases, and parameter thresholds that match the current risk scenario.
[0029] Finally, the reasoning and decision-making module structurally integrates the selected highly relevant knowledge fragments with the original semantic description text of the gas over-limit alarm and the standardized risk description text to construct a contextualized semantic context. This contextualized semantic context is then input into the large language model. Based on the knowledge provided in the context, the large language model performs causal reasoning, determines the risk level, and generates a risk management strategy that includes specific operational recommendations.
[0030] See attached document Figure 1 and attached Figure 2 During the data acquisition phase, the data acquisition module receives and preprocesses the semantic description text for gas over-limit alarms. This semantic description text originates from automatically generated logs of the mine safety monitoring system or manual entries by dispatch center personnel. When the monitoring system detects abnormal sensor values or when the trend prediction model outputs an over-limit warning, it automatically generates natural language text describing the current operating conditions. The data acquisition module stores the received text in a message queue and performs data cleaning on each text, removing meaningless special characters and redundant whitespace. Subsequently, the data acquisition module appends a unique monitoring point identifier and a generation timestamp to each cleaned text to form an alarm data packet to be parsed.
[0031] For example, the original semantic description text received by the data acquisition module is: The T1 sensor at the upper corner of the working face predicts that the gas concentration will reach 1.32% in the next few minutes, exceeding the prescribed alarm threshold of 1.0%. At the same time, it is detected that the wind speed in the return airway has decreased by about 2.3%, and the coalbed gas pressure is showing a slow upward trend.
[0032] During the element extraction phase, the semantic parsing module receives alarm data packets and uses a large language model, fine-tuned with instructions from the coal mine safety field and deployed on the server, to perform structured parsing of the text. This large language model, through supervised fine-tuning, learns the mapping relationship between coal mine terminology and entity extraction tasks. The semantic parsing module embeds the original text into a pre-set prompt engineering template, constructing a complete model input sequence.
[0033] The prompt template includes task instructions, field definitions, and output format constraints. Specifically, the prompt template format used by the semantic parsing module is as follows: [Instruction] Analyze the input gas over-limit alarm text, extract the following key risk elements, and output them in strict JSON format. If an element is not mentioned, mark it as null: Time scope: The predicted time span or specific moment; Predicted gas concentration (gas_value): Specific numerical value and unit; Threshold comparison (threshold_status): The result of comparison with the specified threshold (e.g., exceeding the limit, not exceeding the limit); Ventilation trend: The trend and magnitude of changes in wind speed or air volume; Pressure trend: The upward or downward trend of air pressure.
[0034] [Enter text] [Output] The semantic parsing module feeds the constructed input sequence into the large language model for inference. Based on the instructions, the large language model performs word-by-word attention calculations and entity recognition on the text "The gas concentration predicted by the T1 sensor at the upper corner of the working surface will reach 1.32% in the next few minutes..." and outputs the corresponding structured data object.
[0035] For the example text above, the semantic parsing module outputs the following structured risk elements: Time scope: The predicted time span or specific moment; Predicted gas concentration (gas_value): Specific numerical value and unit; Threshold comparison (threshold_status): The result of comparison with the specified threshold (e.g., exceeding the limit, not exceeding the limit); Ventilation trend: The trend and magnitude of changes in wind speed or air volume; Pressure trend: The upward or downward trend of air pressure.
[0036] [Enter text] [Output] The semantic parsing module feeds the constructed input sequence into the large language model for inference. Based on the instructions, the large language model performs word-by-word attention calculations and entity recognition on the text of the T1 sensor at the upper corner of working face 13, predicting that the gas concentration will reach 1.32% in the next few minutes..., and outputs the corresponding structured data object.
[0037] For the example text above, the structured risk elements output by the semantic parsing module are as follows: json { "time_scope":"future minutes", "gas_value":"1.32%", "threshold_status": "Exceeded the threshold by 1.0%", "ventilation_trend":"decreased by 2.3%", "pressure_trend": "Slowly rising" } The semantic parsing module also includes a format validation unit to check whether the JSON data output by the large language model conforms to the predefined schema structure. If the output format contains syntax errors or missing fields, the format validation unit will trigger a retry mechanism, adjust the temperature parameters, and re-perform inference until a structured set of risk elements that meets the format requirements is obtained. The parsed structured data is then transmitted to the standardization processing module for further processing.
[0038] See attached document Figure 1 and attached Figure 2 In the risk semantic standardization stage, the standardization processing module receives a set of structured risk elements (e.g., JSON format data) output by the semantic parsing module and performs semantic mapping and reconstruction on them using a pre-built gas over-limit risk standardization ontology model. This process aims to eliminate ambiguous expressions in natural language, converting heterogeneous descriptions into a unified semantic representation that computers can understand, thereby providing an accurate input benchmark for subsequent knowledge retrieval.
[0039] The standardization processing module first loads the standardized ontology model for gas exceedance risk. This ontology model is constructed using the resource description framework standard and consists of a series of triples (subject, predicate, object), defining core concept classes, attributes, and logical relationships between entities in the coal mine safety field. Core concept classes include, but are not limited to: risk event classes, monitoring parameter classes, spatial location classes, time window classes, and trend status classes.
[0040] The standardization processing module has a built-in semantic mapping engine, which performs the following specific mapping operations: First, time information normalization mapping. The normalization processing module parses the input time range field. For text describing relative time (such as future minutes or fifteen minutes later), the mapping engine converts it into a standard time window entity. For specific time point descriptions, it converts them into the standard ISO81 time format and associates them with the time attribute in the ontology.
[0041] Second, parameter instantiation and state determination. The standardization processing module parses the predicted gas concentration value and the threshold comparison field. The mapping engine first instantiates a gas parameter object in the ontology based on the value 1.32%. Then, based on the description of exceeding the threshold and the specific numerical difference, the engine queries the risk level determination rules defined in the ontology and automatically adds a state attribute to the instance. This step ensures that regardless of whether the original text uses different terms such as exceeding the standard, exceeding the limit, or too high, it is uniformly represented as a definite over-limit state entity at the ontology level.
[0042] Third, trend description standardization. The standardization module handles fields related to ventilation status changes and air pressure status changes. The original text may contain various synonyms such as "decline," "drop," and "reduction." The mapping engine queries the thesaurus in the ontology to uniformly map these terms to standard trend entities. For example, a 2.3% decrease is mapped to...<VentilationInstance,hasTrend,Trend:Decreasing> as well as<VentilationInstance,hasRate,Value:2.3%> .
[0043] After completing the entity mapping, the standardization processing module calls a pre-built risk description template library. This template library contains standard sentence structures that conform to the coal mine safety terminology specifications. The standardization processing module fills the corresponding slots in the templates with the mapped standard entities and attribute values, generating standardized risk description text.
[0044] For example, based on the aforementioned analysis results, the standardized risk description text generated by the standardized processing module is as follows: the predicted event occurred within the time window [Prediction_min], the monitoring parameter [Gas Concentration] value is 1.32%, the state is determined to be [OverLimit], accompanied by the ventilation parameter [VentilationVelocity] showing a [Decreasing] trend, and the coal seam gas pressure parameter [CoalSeamPressure] showing a [Rising] trend.
[0045] The standardized risk description text is cached in system memory, serving as the sole semantic basis for the subsequent multi-dimensional retrieval module to generate query vectors and structured filtering conditions. Through this process, the system eliminates the arbitrariness of the input natural language, ensuring that the retrieval process is based on strictly defined domain concepts.
[0046] See attached document Figure 1 and attached Figure 2 During the knowledge base construction phase, the knowledge base management module first performs the task of collecting and preprocessing multi-source heterogeneous data. This multi-source heterogeneous data encompasses unstructured text, semi-structured tables, and structured database records, specifically including: clauses from the "Coal Mine Safety Regulations" and related laws and regulations; investigation reports and case analyses of coal mine gas exceedances and outburst accidents over the years; emergency response plans from the mine gas prevention expert system database; and technical parameter manuals provided by equipment manufacturers.
[0047] The knowledge base management module includes a data cleaning unit to denoise the collected data, including removing garbled characters generated by OCR recognition, deleting irrelevant header and footer information, and standardizing the text encoding format. The cleaned data then enters the document segmentation process. The knowledge base management module uses a sliding window algorithm based on semantic boundaries to segment long documents. For regulatory documents, segmentation is performed using clauses as the smallest semantic unit, preserving the complete correspondence between clause numbers and the main text. For case study documents, segmentation is based on the logical structure of the accident background, occurrence process, cause analysis, and handling measures, ensuring that each segmented knowledge fragment contains relatively complete contextual information. A segmentation length threshold is set (e.g., 512 tokens); paragraphs exceeding the threshold are truncated and overlapping areas are set to maintain semantic continuity.
[0048] After fragmentation, the knowledge base management module uses a pre-trained text embedding model specific to the coal mining field to vectorize each knowledge fragment. This embedding model, trained through contrastive learning on a large corpus of coal mine safety language, is able to map text into a high-dimensional dense vector space. The knowledge base management module then transforms each knowledge fragment into a fixed-length feature vector, which represents the deep semantic features of the knowledge fragment.
[0049] Simultaneously with vectorization, the knowledge base management module performs structured tag extraction, attaching metadata to each knowledge fragment. This operation automatically identifies key attributes in the knowledge fragment using an entity extraction algorithm, generating structured tags that specifically include: Index number: The chapter / clause number of the procedure or the unique ID of the case; Applicable scenario tags: such as spatial location attributes like upper corner, tunneling face, and longwall face; Risk type labels: such as event categories like gas accumulation, gas outburst, and sensor failure; Time range labels: For cases containing temporal evolution characteristics, the stage of occurrence (e.g., initial stage, abrupt change period) is labeled. These structured labels are consistent with the conceptual entities in the ontology model and are used for accurate filtering and ontology consistency calculation in subsequent retrieval processes.
[0050] The knowledge base management module establishes a hierarchical indexing mechanism based on the processed data to support efficient and accurate retrieval. This hierarchical indexing mechanism comprises three independent index levels: Content Index. This content index uses an inverted index structure, built based on the TF-IDF algorithm or the BM25 algorithm. It stores the mapping relationship between keywords and fragment IDs in knowledge fragments, which is used to support rapid initial screening based on precise word matching, ensuring that knowledge points containing specific technical terms (such as T1 sensor, gas-electric interlocking) are not missed.
[0051] Relationship Index. This relationship index is built on a graph database structure and is used to record the topological relationships between knowledge entities. The knowledge base management module uses entities in knowledge fragments (such as equipment, location, disaster type) as nodes and logical relationships between entities (such as causing, located at, belonging to) as edges. This relationship index supports path retrieval based on ontology structure and is used to calculate ontology consistency scores.
[0052] Semantic Index. This semantic index is constructed based on a vector space, using a hierarchical small-world graph algorithm or inverted index file system (IVF) to organize feature vectors. The semantic index stores high-dimensional vector representations of all knowledge fragments and supports approximate nearest neighbor search based on cosine similarity or Euclidean distance for calculating semantic similarity scores.
[0053] The knowledge base management module stores the three-layer index and corresponding raw text blocks in a high-performance vector database and provides a unified query interface for the multi-dimensional retrieval module to call. When a new procedure is released or a new case is generated, the knowledge base management module executes an incremental update process, generates new vectors and index entries, and dynamically inserts them into the existing index structure.
[0054] See attached document Figure 1 and attached Figure 2 In the multidimensional retrieval phase, the multidimensional retrieval module first receives standardized risk description text generated by the standardization processing module. To perform accurate matching simultaneously in both the vector space and symbol space, the multidimensional retrieval module executes a dual query generation operation. On one hand, using the same text embedding model as in the knowledge base construction phase, the standardized risk description text is mapped into a high-dimensional semantic query vector. On the other hand, key entities in the standardized text (such as upper corner, gas concentration, and wind speed reduction) are parsed to generate a structured set of screening conditions.
[0055] The multidimensional retrieval module performs an initial screening of the knowledge base based on a structured set of filtering criteria, filtering out knowledge fragments that do not match spatial location or are completely irrelevant to risk type, resulting in a set of candidate knowledge fragments. Subsequently, for each knowledge fragment in the candidate set, the multidimensional retrieval module calculates a comprehensive relevance score according to the aforementioned formula. The following details the specific calculation logic of the scores for each dimension in the formula: Semantic similarity calculation. The multidimensional retrieval module calculates the cosine similarity between the query vector and the candidate knowledge fragment vector. This cosine similarity measures the degree of semantic closeness between the current risk description and the terms or cases in the knowledge base, and the numerical range is usually normalized to the [0,1] interval.
[0056] Calculation of ontology consistency score. The multidimensional retrieval module uses relation indexes to locate the node position of the current risk event and the node position of the knowledge fragment tag in the ontology tree. The system calculates the shortest path distance between two nodes in the ontology hierarchy. If the two nodes are sibling nodes under the same parent class or have an inclusion relationship (e.g., gas accumulation belongs to gas exceedance), a higher ontology consistency score is assigned; if the two nodes are far apart in the ontology tree or are on mutually exclusive branches, a lower score or zero score is assigned.
[0057] The calculation of the coverage of procedural entries. This dimension is specifically for procedural knowledge fragments. The multi-dimensional search module extracts the set of risk elements (including specific parameter names and location names) from the standardized risk description text and calculates the Jaccard similarity coefficient between this set of risk elements and the set of applicable scope of procedural clauses. If a procedural clause explicitly mentions all current abnormal parameters, the coverage score is 1; if it only involves some parameters, the score is calculated based on the coverage ratio.
[0058] Calculation of historical case matching degree. This dimension is specifically for case-based knowledge fragments. The multi-dimensional retrieval module calculates the Euclidean distance between the numerical feature vector of the current working condition and the numerical feature vector of the historical case records, and converts it into a similarity score. The feature vector includes numerical features such as the magnitude and duration of gas concentration exceeding the limit.
[0059] The consistency of predicted trends is calculated. This is a key verification dimension in this embodiment. The multidimensional retrieval module first maps the trend description in the standardized text to a trend direction vector (e.g., rising is denoted as +1, falling as -1, and stable as 0). Similarly, evolution trend vectors are extracted from historical cases or contingency plan descriptions in the knowledge base. The system calculates the dot product or direction cosine of the two vectors. If the current operating condition shows a decrease in wind speed and an increase in air pressure, while a historical case records the subsequent evolution of a sudden drop in wind speed and an increase in air pressure due to a damper malfunction, and the trend direction vectors of the two match, then the consistency of the predicted trend receives a high score. This ensures that the retrieval results are isomorphic to the current risk in terms of physical evolution logic.
[0060] Regarding the determination of the weight coefficients for each dimension in the formula, the multidimensional retrieval module uses a learning-based ranking method for pre-setting. During system initialization, a logistic regression model or a RankNet model is trained using a labeled dataset (containing historical queries and manually labeled relevant / irrelevant knowledge fragment pairs). The model learns the optimal linear combination weights for each dimension under different risk types to maximize the Normalized Discounted Cumulative Gain (NDCG) of the retrieval results. For example, in a sudden gas outburst scenario, the system may automatically assign a higher weight to trend consistency.
[0061] Finally, the multidimensional retrieval module sorts the candidate knowledge fragments in descending order based on the calculated comprehensive relevance score, and selects the fragments with scores higher than a preset threshold. Each fragment (e.g., Top-5) is output as a highly relevant knowledge fragment to the reasoning and decision-making module.
[0062] See attached document Figure 1 and attached Figure 2 In the reasoning and decision-making phase, the reasoning and decision-making module is responsible for transforming the fragmented information generated in the preceding steps into coherent logical input and driving the large language model to generate the final risk management strategy. This module first receives a set of highly relevant knowledge fragments output by the multidimensional retrieval module, as well as the original semantic description text of the gas over-limit alarm and the standardized risk description text.
[0063] The reasoning and decision-making module performs structured integration operations to construct a contextualized semantic context. This operation is not a simple text concatenation, but rather a semantic layering and isolation of information from different sources based on preset prompt templates. The reasoning and decision-making module first parses highly relevant knowledge fragments to extract core instructional information. For fragments from the "Coal Mine Safety Regulations," it extracts mandatory constraints and legally mandated procedures; for fragments from historical cases, it extracts accident causes, evolution paths, and successful handling experiences.
[0064] Subsequently, the reasoning and decision-making module assembles the extracted information into a contextualized semantic context according to logical priority. This context's specific structure includes the following three independent data domains: Current Situation Domain. This area is filled with standardized risk description text, which precisely defines the current gas concentration value, the state of exceeding limits, and the evolution trend of physical parameters (such as the combination of a decreasing wind speed trend and an increasing air pressure trend), providing definite factual basis for reasoning.
[0065] Knowledge Support Domain. This area is filled with structured and integrated highly relevant knowledge fragments. The system uses specific delimiters (such as XML tags or Markdown separators) to distinguish between procedural clauses and historical cases, and clearly marks the source of each piece of knowledge and its relevance score to the current event. This ensures that the large language model can distinguish between mandatory regulations and experience for reference only during reasoning.
[0066] Inference instruction domain. This area contains thought chain guidance instructions that require the large language model to perform explicit causal analysis steps before generating the final policy.
[0067] After completing the context construction, the reasoning and decision-making module inputs the contextualized semantic context into the large language model for reasoning. The large language model performs the following logical processing steps: First, causal attribution analysis. The model compares the trend characteristics in the current situation domain with the evolution paths of historical cases in the knowledge support domain to infer the potential physical causes leading to the current gas exceedance (e.g., inferring that the decrease in wind speed and increase in gas may be due to obstruction of the local ventilation fan intake or the failure to close the damper). Second, compliance verification. Based on the regulations and clauses in the knowledge support domain, the model verifies whether the current operating parameters violate specific safety red lines and determines the corresponding legal response level (e.g., power outage, evacuation, alert). Finally, strategy generation. Based on the above analysis, the model generates a structured risk management strategy.
[0068] The risk management strategy output by the reasoning and decision-making module includes clear action guidelines, specifically: Risk rating: Determine the current risk level (e.g., yellow alert, red alarm); Core cause diagnosis: the most likely point of failure or type of disaster determined by reasoning; List of Contingency Measures: Specific operational steps listed in order of priority (e.g., immediately cut off the non-intrinsically safe power supply to working face 13, check the connection status of the local ventilation fan duct, and evacuate all personnel from the return airway). Based on source tracing: the specific procedural clause numbers and similar historical case IDs cited in generating the risk management strategy are listed, thus achieving the interpretability of the decision.
[0069] Through the above process, the system ensures that the generated disposal strategy is not only targeted at the current specific working conditions, but also strictly complies with the requirements of coal mine safety regulations, avoiding the risk of factual errors (illusions) arising in professional fields from general large models.
[0070] See attached document Figure 3 This invention provides a computer device configured to execute the gas over-limit risk semantic standardization and dynamic knowledge retrieval method based on a large language model and retrieval enhancement generated according to the above embodiments. Figure 3 As shown, the computer device includes: at least one processor, memory, communication interface, and bus connecting different components.
[0071] A processor is the computing core of a computer device, and may specifically include a central processing unit (CPU), a graphics processing unit (GPU), a tensor processor (TPU), a field-programmable gate array (FPGA), or an application-specific integrated circuit (ASIC). Considering that this invention relates to inference computation of large language models and similarity retrieval of high-dimensional vectors, the processor is preferably configured with hardware acceleration units supporting parallel computing to perform matrix multiplication and convolution operations, thereby supporting the operation of deep neural network models in the semantic parsing module and the inference decision-making module, as well as the rapid calculation of vector space distances in the multi-dimensional retrieval module.
[0072] Memory is the storage component of a computer device, including volatile memory (such as random access memory, RAM) and non-volatile memory (such as read-only memory, flash memory, and hard disk drive). Memory is used to store computer programs, system operating systems, and various data resources involved in the embodiments of this invention. Specifically, the memory stores: Computer-executable instructions: When executed by the processor, the instructions enable the processor to implement all the methodological steps, including obtaining semantic description text of gas over-limit alarms, extracting risk elements based on instruction-based fine-tuning of large language models, standardizing risk semantics based on ontology models, multi-dimensional weighted retrieval, and generating contextualized causal reasoning.
[0073] Model parameter files include: weights of the large language model after fine-tuning, RDF triples of the standardized ontology model of gas over-limit risk, and index files of the knowledge vector library in the field of coal mine safety (including HNSW index structure and inverted index table).
[0074] The communication interface is used to enable data interaction between computer equipment and external devices or networks. In this embodiment, the communication interface is connected to the host or data center of the coal mine safety monitoring system via industrial Ethernet, RS-485 bus, or 5G industrial private network, receives the original semantic description text of gas over-limit alarms in real time, and sends the generated risk handling strategy to the dispatch terminal or automatic control actuator.
[0075] A bus is used to transfer information between processors, memory, and communication interfaces. A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect Standard (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc.
[0076] During actual operation, the processor retrieves the computer program from memory and performs the following operations: obtains the semantic description text of the gas over-limit alarm through the communication interface; parses the text using a large language model loaded in video memory to obtain structured risk elements; calls the ontology mapping rules stored in memory to generate standardized risk description text; accesses the knowledge vector library index, calculates a comprehensive relevance score based on the aforementioned formula, and filters highly relevant knowledge fragments; constructs a contextualized semantic context and performs causal reasoning to finally generate a risk management strategy.
[0077] Furthermore, embodiments of the present invention also provide a computer-readable storage medium, which is a non-volatile storage medium storing a computer program thereon. When the computer program is executed by the processor of a computer device, it implements the gas over-limit risk semantic standardization and dynamic knowledge retrieval method based on large language models and retrieval enhancement generated in the above-described method embodiments. The storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0078] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for intelligent assessment and handling of gas risks enhanced by large-scale models and retrieval, characterized in that: Includes the following steps: Obtain the semantic description text of the gas over-limit alarm and input it into a large language model that has been fine-tuned by instructions in the field of coal mine safety, and parse out the structured risk elements; Based on a pre-built standardized ontology model of gas over-limit risk, the risk elements are mapped to standard terms, and standardized risk description text is generated according to a preset template. Based on the standardized risk description text, a search is performed in a pre-built knowledge vector library for the field of coal mine safety, and highly relevant knowledge fragments are selected based on multi-dimensional relevance scores. The highly relevant knowledge fragments are fused with the semantic description text of the gas over-limit alarm and the standardized risk description text to construct a contextualized semantic context; The contextualized semantic context is input into a large language model to perform causal reasoning on gas over-limit risk and generate risk management strategies.
2. The method for intelligent assessment and handling of gas risks enhanced by large-scale model and retrieval as described in claim 1, characterized in that, The step of mapping the risk elements to standard terms and generating standardized risk description text based on a preset template includes: Using predefined mapping rules, the time information in the risk elements is mapped to standard time window entities, and the numerical information is associated with gas parameter instances and marked with state attributes. The standardized ontology model of gas exceedance risk is represented by a resource description framework triple, and the mapped standard terms are aligned to the corresponding concepts in the ontology model. The aligned conceptual entities are then filled into the gas risk description template to generate the standardized risk description text in a unified format.
3. The method for intelligent assessment and handling of gas risks enhanced by large-scale model and retrieval as described in claim 1, characterized in that, The steps for constructing the knowledge vector base in the field of coal mine safety include: Acquire multi-source heterogeneous data on coal mine safety, including at least safety regulations, historical cases of exceeding limits, and expert handling plans. The multi-source heterogeneous data is segmented into documents, and the knowledge fragments are converted into vector representations using a text embedding model; Each knowledge fragment is attached with a structured tag, which includes at least the clause number, applicable scenario, risk type, and time range; A hierarchical indexing mechanism is established, which includes a content index for keyword matching, a relation index for recording topological relationships between entities, and a semantic index based on vector space.
4. The method for intelligent assessment and handling of gas risks enhanced by large-scale model and retrieval as described in claim 1, characterized in that, The step of retrieving information from a pre-built knowledge vector base in the field of coal mine safety based on the standardized risk description text specifically includes: The standardized risk description text is transformed into a semantic query vector using a large language model. Extract key fields from the standardized risk description text as structured search criteria; By combining the semantic query vector with the structured retrieval conditions, candidate knowledge fragments are recalled from the knowledge vector base in the field of coal mine safety.
5. The method for intelligent assessment and handling of gas risks enhanced by large model and retrieval as described in claim 4, characterized in that, The steps for selecting highly relevant knowledge fragments based on multidimensional relevance scoring specifically include: For each of the recalled candidate knowledge fragments, calculate the matching score between each candidate knowledge fragment and the current risk situation on different dimensions; The different dimensions include: semantic similarity between query vector and knowledge fragment vector, ontology consistency evaluation score between current event and knowledge fragment tag, coverage of procedural entries of knowledge fragment to current risk element, matching degree between current risk scenario and historical case, and consistency of prediction trend between current monitoring data and knowledge fragment description conditions. The weighted sum of the matching scores across the different dimensions is calculated to obtain the final multidimensional relevance score. Candidate knowledge fragments whose multidimensional relevance scores exceed a set threshold are identified as highly relevant knowledge fragments.
6. The method for intelligent assessment and handling of gas risks enhanced by large model and retrieval as described in claim 5, characterized in that, The calculation method for the consistency of the predicted trend is as follows: Extract the trends of ventilation velocity and coalbed gas pressure from the aforementioned risk factors; Compare whether the trend of working condition evolution described in the knowledge fragment is consistent with the extracted trend of change; If the trends are in the same direction, they are considered to be in the same trend and are assigned corresponding scores.
7. The method for intelligent assessment and handling of gas risks with large-scale model and retrieval enhancement as described in claim 5, characterized in that, The weight coefficients of each dimension in the weighted sum are obtained by training on a pre-constructed labeled dataset, which contains historical alarm records and related knowledge fragments annotated by humans.
8. The method for intelligent assessment and handling of gas risks with large-scale model and retrieval enhancement as described in claim 1, characterized in that, The steps for constructing a contextualized semantic context specifically include: The selected highly relevant knowledge fragments are structured and integrated to extract mandatory requirements of regulations, historical case handling results, and safety thresholds of working conditions. The integrated knowledge information is used as external knowledge support and is combined with the semantic description text of the gas over-limit alarm and the standardized risk description text according to the preset prompt engineering format to form the contextualized semantic context.
9. The method for intelligent assessment and handling of gas risks enhanced by large model and retrieval as described in claim 1, characterized in that, In the step of analyzing and obtaining structured risk elements, the risk elements include at least the time range, predicted gas concentration, threshold comparison results, ventilation speed changes, and coalbed gas pressure trends.
10. An apparatus comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.