Intelligent question and answer method for mine ventilation event capture and action reasoning

By constructing an intelligent question-answering method for mine ventilation event capture and motion reasoning, the problem of insufficient structured knowledge management in the existing system is solved, intelligent response and rapid decision-making under complex working conditions are achieved, and the intelligence level of the mine ventilation system is improved.

CN120804242APending Publication Date: 2025-10-17TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510597808.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

The existing mine ventilation system lacks structured knowledge management and efficient knowledge retrieval mechanisms, making it difficult to meet the needs for intelligent response and rapid decision-making under complex working conditions. The existing question-answering system is mostly based on keyword matching and shallow logic, which makes it difficult to support ventilation decision-making problems with strong structure and deep semantic dependence.

Method used

An intelligent question-answering method based on mine ventilation event capture and action reasoning is adopted. By extracting entity, attribute and rule triplets from procedural documents and technical corpus, structural analysis and context modeling are performed to build a semantic labeling system. Regions, conditions, events and action nodes are constructed as five-tuple paths with logical connectivity, and a ventilation knowledge graph is constructed for path mapping. Finally, the structural mapping and answer generation of natural language questions are completed through structural extraction and semantic retrieval.

Benefits of technology

It realizes the structured expression of ventilation knowledge, logical reasoning of event response paths and automatic generation of question and answer content. It is suitable for knowledge support and intelligent interaction in mine ventilation control and safety management scenarios, and supports intelligent response and rapid decision-making under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804242A_ABST
    Figure CN120804242A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of mine ventilation decision making, and aims to solve the problem that intelligent construction of a current ventilation system lacks structural modeling and inference question and answer ability support for ventilation knowledge. The invention provides an intelligent question and answer method for mine ventilation event capture and action reasoning. The method comprises the following steps: extracting entity, attribute and rule triples related to ventilation in regulation documents and technical corpora; carrying out structure analysis and context modeling on the triad, and constructing a semantic tag system; constructing regions, conditions, events and action nodes in the triple into a quintuple path with logic connectivity; performing construction of a ventilation knowledge graph and modeling of path mapping; and completing structure mapping and answer generation of the natural language question. Semantic understanding, condition recognition and response path reasoning of ventilation events can be achieved, a closed-loop supporting mechanism from knowledge modeling to intelligent question and answer is formed, and the intelligent level of a mine ventilation system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of mine ventilation decision-making, and particularly relates to a mine ventilation event capturing and action reasoning intelligent question and answer method. BACKGROUND

[0002] The mine ventilation system is an important foundation for ensuring the safety production of coal mines, and plays a key role in air volume regulation, hidden danger identification and disaster response.

[0003] However, the current regulations, field experience and expert knowledge in the field of ventilation are scattered in the form of unstructured text, lack unified structured management and efficient knowledge calling mechanism, and it is difficult to meet the needs of intelligent response and rapid decision-making under complex working conditions.

[0004] In the actual ventilation management process, the management personnel need to identify key information such as air flow abnormalities and disaster risks in a short time, and quickly match the corresponding control measures to build a response closed loop from event capture to action execution. The existing system mostly focuses on sensor data acquisition and early warning, lacks structured modeling and reasoning question and answer ability support for ventilation knowledge, and limits the intelligent evolution of the ventilation system.

[0005] In addition, the existing question and answer system is mostly based on keyword matching and shallow logic, and it is difficult to support ventilation decision-making problems with strong structure and deep semantic dependence. SUMMARY

[0006] The application provides a mine ventilation event capturing and action reasoning intelligent question and answer method to solve at least one of the above technical problems in the prior art.

[0007] The application adopts the following technical solution: a mine ventilation event capturing and action reasoning intelligent question and answer method, comprising the following steps:

[0008] S100: extracting entities, attributes and rule triples related to ventilation in regulation documents and technical corpus;

[0009] S200: performing structure analysis and context modeling on the triples, and constructing a semantic tag system;

[0010] S300: constructing the area, condition, event and action nodes in the triples into five-tuple paths with logical connectivity;

[0011] S400: constructing a ventilation knowledge graph and modeling path mapping;

[0012] S500: completing structure mapping and answer generation of natural language questions through structure extraction and semantic retrieval.

[0013] Preferably, the step of extracting the procedure document and the entity, attribute and rule triplets related to ventilation in the technical corpus comprises:

[0014] S101: Collecting raw data, cleaning and cutting the raw data, and obtaining sentences related to ventilation as cleaned data; the sources of the raw data include coal mine safety regulations, field ventilation measure records and industry textbooks;

[0015] S102: Dividing the cleaned data into four types of structured tasks and defining their corresponding fields; the four types of structured tasks include information extraction tasks, knowledge extraction tasks, entity attribute extraction tasks and relationship rule extraction tasks; the above tasks correspond to different semantic roles in the structured triplets, and an original triplet set is obtained:

[0016] T=T fact ∪T rule

[0017] Among them, T fact represents a fact triplet; T rule represents a rule triplet containing trigger conditions and response actions;

[0018] S103: Labeling the cleaned data in instruction, input and output three-segment format, and outputting samples in JSONL format;

[0019] S104: Generating initial labels for each sample based on the structured task type;

[0020] S105: Saving the sample with initial labels in JSONL format and classifying output according to the above four types of tasks.

[0021] Preferably, the extraction fields corresponding to the information extraction task are entity name, item name, item content and measure classification; the fields corresponding to the knowledge extraction task are subject entity, predicate verb and object entity; the fields corresponding to the entity attribute extraction task are entity, attribute type, value, unit and symbol; and the fields corresponding to the relationship rule extraction task are trigger condition, event node, action node and parameter key value.

[0022] Preferably, the step of performing structural analysis and context modeling on the triplets comprises:

[0023] S201: Analyzing the entities in the original triplet set according to the following rules: if it contains a bracket structure and the bracket contains a colon, it is considered as an attribute type entity and is analyzed as:

[0024]

[0025] If it contains bracket structure and there is no colon in the bracket, it is considered as a conditional entity, and it is parsed as:

[0026]

[0027] If it does not contain bracket structure, it is marked as e type = No label; finally all entities are normalized as: E = {e base ,e type ,e key ,e value};

[0028] S202: For each entity e∈E, traverse all its occurrence positions in the triple set, and construct its context path set C e , denoted as:

[0029] C e = {(h i ,r i ,t i )∣e∈{h i ,t i},(h i ,r i ,t i )∈T};

[0030] Each path can be converted to: subject→predicate→object, and this structure is taken as the semantic input of the classification model.

[0031] S203: Build an ontology set L containing six types of semantic labels:

[0032] L = {Space, Real Object, Event, Action, Function, Manage};

[0033] S204: Combine the entity context path set C e , construct the structured Prompt input, use the multi-label large language model for semantic judgment, and output the label L e ,

[0034] S205: Fuse the classification results with the entity structure, and write all entities into a structured file as the input data of the subsequent rule extraction and path construction module.

[0035] Preferably, the step of constructing the five-tuple path with logical connectivity for the region, condition, event and action nodes in the triple includes:

[0036] S301: From the entity structure set, screen out entity items with parentheses type "property" or "condition" as candidate trigger sources, meeting:

[0037] e type ∈{property, condition}

[0038] In combination with the existing area, condition, event and action nodes in the triple, identify the valid paths with the following structure: area→condition, condition→event, event→action chain, as candidate paths;

[0039] S302: For each candidate path, extract and construct the rule field: area entity r, condition parameter keyword e key , condition parameter value e value , event entity e, action entity chain A e =[a1, a2,..., a n ], form rule path five-tuple structure R i ={r, e key , e value , e, A e}; if the action entity chain contains multiple sequential actions, the path chain is further expanded to e→a1→a2→…→a n ;

[0040] S303: Convert the rule five-tuple into two expression forms: one is natural language rule (rule_form), which is: "if r.e key =e value , trigger event e, and need to execute action entity chain A e "; the other is logical expression (rule_expr), which is: "IF r.e key =e value THEN ";

[0041] S304: Format all rule fields uniformly, including: uniform unit format for numerical fields; event and action nodes are debracketed, only basic entities are retained; similar paths are removed by hashing; output JSON format for graph import and question answering interface call;

[0042] S305: Build complete rule path set R={R1, R2,..., R n} and generate query template set Q={Cypher(p i ) | p i ∈p}, which is used for graph path reasoning and response content query.

[0043] Preferably, the step of constructing and modeling the ventilation knowledge graph includes:

[0044] S401: Merge the six types of semantic labels into four types of path nodes;

[0045] S402: Build a path template, each response path P i is expressed as follows:

[0046] P i ={r→c→e→A e}

[0047] wherein r represents a regional entity; c represents a conditional entity, the field structure is param:value; e represents an event entity; A e ={a1,a2,...,a n} represents an action entity chain;

[0048] If the action is a multi-step sequential operation, the path is further expanded into a chain structure r→c→e→a1→a2→…→a n .

[0049] S403: Generate a path query template: automatically convert the path structure into a Cypher query template in a graph database;

[0050] S404: Map all path nodes to entity nodes in the graph database, and map the edge relationship between entities; node and relationship data are exported in.csv format, including node table fields and relationship table fields.

[0051] S405: Use Neo4j tools for batch import and structure verification, verify the path closure rate and node integrity, and confirm that the knowledge graph has the structural basis for graph query, semantic reasoning and question answering.

[0052] Preferably, the step of completing the structural mapping and answer generation of the natural language question through structural extraction and semantic retrieval comprises:

[0053] S501: The system receives a natural language question, and guides the language model to extract structured semantic fragments through a prompt embedding template:

[0054] S e ={region,event,param,value}

[0055] Wherein region represents the spatial location involved in the question; event represents the corresponding abnormal phenomenon; param represents the conditional parameter keyword; value represents the conditional value or threshold;

[0056] S502: Perform semantic vector encoding on the extraction result, and compare it with the graph entity set V to calculate the similarity:

[0057]

[0058] wherein V is a set of graph entities, V e is the embedding vector of the entity, if the maximum similarity exceeds the threshold, it is considered to be semantically consistent, and the field is standardized to

[0059] S503: constructing a path query template with the standardized field as a parameter, extracting a response chain structure from a graph database; the system outputs a structured response result as R e ={r,(param,value),e,A e}.

[0060] S504: splicing the query result R e and the original question q to construct an embedded Prompt template to guide the language model to generate a natural language answer;

[0061] S505: the system additionally generates a structured path explanation, and simultaneously conducts continuous dialogue and multi-round question answering in combination with the context history question.

[0062] Compared with the prior art, the beneficial effects of the present application are:

[0063] The present application provides a mine ventilation event capture and action reasoning question and answer method based on semantic rules and graph reasoning, which comprises the following steps: corpus structured processing, entity modeling and ontology classification, rule path construction, graph generation and query mapping, intelligent question and answer generation, etc. The corpus structured processing is used to extract entities, attributes and rule triples in the procedure documents and technical corpus. The entity modeling constructs a semantic label system through structure analysis and context modeling. The rule path construction constructs a five-tuple path with logical connectivity of region, condition, event and action. The graph generation and query mapping realize path landing and dynamic query through the Neo4j graph database. The intelligent question and answer module completes the structure mapping and answer generation of natural language questions based on structure extraction and semantic retrieval. The present application can realize the structured expression of ventilation knowledge, the logical reasoning of event response path and the automatic generation of question and answer content, and is suitable for knowledge support and intelligent interaction in mine ventilation regulation and safety management scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0065] Figure 1Steps for a mine ventilation event capture and action reasoning question and answer method;

[0066] Figure 2 A schematic diagram for structured annotation of ventilation corpus;

[0067] Figure 3 An entity modeling flowchart;

[0068] Figure 4 A rule extraction flowchart;

[0069] Figure 5 A path repair mechanism flowchart;

[0070] Figure 6 A prompt path structure schematic diagram;

[0071] Figure 7 A schematic diagram for generating a question and answer for a gas overrun near a local fan;

[0072] Figure 8 A Pyvis subgraph for an upper corner event response path on a coal mining face;

[0073] Figure 9 A Neo4j subgraph for an upper corner event response path on a coal mining face. DETAILED DESCRIPTION

[0074] The technical solutions in the embodiments of the present application are clearly and completely described in combination with the drawings in the embodiments of the present application. Apparently, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0075] It should be noted that the structures, proportions, sizes, etc. shown in the drawings of the specification are only used to cooperate with the content disclosed in the specification, to be understood and read by those skilled in the art, and do not define the limiting conditions for the implementation of the present application, so they do not have technical substantive significance. Any modification of structure, change of proportion relationship or adjustment of size, without affecting the effect and purpose that can be achieved by the present application, should fall within the scope of the technical content disclosed by the present application. It should be noted that in the specification, relationship terms such as first and second are only used to distinguish one entity from another entity, and do not necessarily require or imply any actual relationship or order between the entities.

[0076] The present application provides an embodiment:

[0077] The application proposes a mine ventilation event capture and response action recommendation method that integrates ontology modeling, rule extraction, path reasoning and semantic question answering capabilities, to realize the integration of automatic modeling, logical reasoning and intelligent interaction functions of ventilation knowledge.

[0078] To achieve the above object, the application provides the following technical scheme: a mine ventilation event identification and response action reasoning question and answer method combining knowledge graph construction and natural language understanding, comprising the following steps:

[0079] S100: Ventilation corpus collection and structured triple construction: specifically comprising the following steps:

[0080] S101: Corpus acquisition and cleaning:

[0081] Select "Coal Mine Safety Regulations (2022 Edition)", "Technical Measures" page of Coal Mine Safety Production Network, mine ventilation teaching materials, etc. as the source of corpus, use self-defined sentence division rules and regular expressions to remove non-information content such as headers and footers, numbers, legend labels, etc. and keep the ventilation-related sentences complete and structured.

[0082] S102: Task division and label definition:

[0083] The cleaned text is divided into four types of structured tasks: information extraction task: identify equipment, measure name, item content and other information involved in the regulations and experience; knowledge extraction task: extract ventilation principle description and logical judgment sentences; entity attribute extraction task: extract entities and their corresponding attribute indicators; relationship rule extraction task: identify control logic, restriction relationship and causal reasoning rules between entities.

[0084] The above tasks correspond to different semantic roles in structured triples, and are uniformly formed into a structured set:

[0085] T=T fact ∪T rule

[0086] Wherein, T fact represents a factual triple; T rule represents a rule triple containing trigger conditions and response actions.

[0087] As shown in Figure 2 , and define its corresponding fields as follows:

[0088]

[0089] For example, in the entity "wind direction (opposite to the coal seam inclination direction)", the part in parentheses "opposite to the coal seam inclination direction" is identified as an attribute type modification, and the key is extracted as "opposite to the coal seam inclination direction" and the value is "opposite", which is classified into the attribute type task.

[0090] S103: Structured sample format construction:

[0091] Data annotation is performed in the instruction, input, and output three-section format, and the output sample is saved in the JSONL format. The structure is as follows:

[0092] {instruction: "Please extract entities and their attributes from the following text:", input: "The wind speed of the local fan must not be less than 1.5 m / s.", output: {entity: local fan, attribute type: wind speed, comparison relationship: ≥, value: 1.5, unit: m / s}}.

[0093]

[0094] output: {entity: local fan, attribute type: wind speed, comparison relationship: ≥, value: 1.5, unit: m / s}}.

[0095] S104: Label mapping and weakly supervised annotation generation:

[0096] To support the subsequent ontology classification module, the results of the extraction task are automatically mapped to six types of ontology labels (region, real object, event, action, function, and management):

[0097] Devices and measures in information extraction tasks are mapped to "real object" or "management";

[0098] Regions and entities with constraint values in attribute extraction are marked as "region" and "condition";

[0099] Fields that play a logical role in rule extraction are mapped to "event", "action", or "function".

[0100] In this embodiment, initial labels are generated for each sample according to the task type, and the main rules are as follows: "main fan", "local fan", etc. are mapped to "real object"; "return airway", "coal mining face", etc. are mapped to "region"; "adjust local fan", "gas overrun" are mapped to "action" and "event".

[0101] S105: Output structure and storage:

[0102] Four types of sample files are output in units of tasks, and batch input is provided for model training. The path structure is as follows: info_samples.jsonl—information; knowledge_samples.jsonl—knowledge;

[0103] ​attribute_samples.jsonl—entities and conditions; rule_samples.jsonl—relations and rules.

[0104] S200: Entity context modeling and ontology label classification:

[0105] S201: Parenthesis structure parsing and entity standardization:

[0106] For the original triple set T = Tf act ∪T rule , if the entity e raw contains a parenthesis structure, it is parsed according to the following rules:

[0107] If the parenthesis contains a colon (:), it is considered an attribute type entity and is parsed as:

[0108]

[0109] If the parenthesis does not contain a colon, it is considered a condition type entity and is parsed as:

[0110]

[0111] If it does not contain a parenthesis structure, it is marked as e type = no label;

[0112] Finally, all entities are normalized to:

[0113] E = {e base , e type , e key , e value}.

[0114] In this embodiment, the rule sample text “the airflow direction (opposite to the coal seam inclination direction: should meet the ventilation requirements)” is taken as an example, and the original entity is: airflow direction (opposite to the coal seam inclination direction: should meet the ventilation requirements);

[0115] The system detects that there is a colon in the parenthesis and marks it as an attribute type entity. The structure parsing result is as follows:

[0116] ebase = airflow direction;

[0117] etype = attribute;

[0118] ekey = opposite to the coal seam inclination direction;

[0119] evalue = opposite;

[0120] The final entity quadruple is: E = {“airflow direction”, attribute, opposite to the coal seam inclination direction, opposite}, and the process is as shown in Figure 3 .

[0121] S202: Entity context construction:

[0122] For each entity e∈E, traverse all its occurrence positions in the triple set and construct its context path set C e , expressed as:

[0123] C e ={(h i ,r i ,t i )|e∈{h i ,t i},(h i ,r i ,t i )∈T}

[0124] Each path can be transformed into:

[0125] Subject → predicate → object (e.g., gas concentration > 1.0% → trigger event → gas exceeds limit), this structure will serve as the semantic input of the classification model.

[0126] In this embodiment, taking "downward ventilation" as an example, the following context paths are found in the triple set: downward ventilation → leads to → airflow and gas flow direction (direction: opposite), downward ventilation → prevent → working face transport lane (coal releases gas: avoid entering the working face), coal mining working face (there is a risk of sudden outburst) → strictly prohibited → downward ventilation, downward ventilation → demand → mechanical wind pressure (needs to be greater), coal mining working face (coal seam inclination: <12°) (risk of sudden outburst: none) → can be considered → downward ventilation, mining working face → prohibited → downward ventilation, downward ventilation → leads to → working face conveyor equipment (safety: poor), downward ventilation →Generate → airflow (direction: downward), downward ventilation →Definition → airflow at the coal mining face (direction: downward), downward ventilation →Realization →dust removal, downward ventilation →Affect →working face (air temperature: decrease), coal mining working face (level of air inlet tunnel: higher than level of return air tunnel) →Definition →Downward ventilation, downward ventilation →Leads to →coal dust concentration in the air (decreases), airflow direction (opposite to the inclination direction of the coal seam) →Basis for distinction →Downward ventilation, downward ventilation →Block →Conveyor tunnel (mechanical heat generation: prevent transmission to the working face), coal mining working face (with danger of overhang) →Prohibited to use →Downward ventilation, downward ventilation →Leads to →wind pressure loss (increases).

[0127] S203: Ontology tag system construction:

[0128] Construct an ontology set L containing six types of semantic labels:

[0129] L = {Space, Real Object, Event, Action, Function, Manage}; the classification output of each entity is a subset:

[0130] In this embodiment, according to the above structure and semantic role, the domain expert determines the label of the entity as L e ={Function}; Label Description: The adjustment of the wind direction has the function of adjusting the direction of ventilation, so it is classified as a function.

[0131] S204: Ontology classification model reasoning:

[0132] Combined with the entity context C e , construct a structured Prompt input, use a multi-label large language model for semantic judgment, and output a label set L e .

[0133] In this embodiment, the model input Prompt is constructed as follows:

[0134] "Entity: Downward ventilation;

[0135] Context: Downward ventilation → causes → wind flow and gas flow direction (direction: opposite),

[0136] Downward ventilation → prevents → working face transport roadway (coal releases gas: avoid entering the working face),

[0137]

[0138] Please judge which ontology label the entity should belong to:

[0139] Event, Action, Region, Real Object, Function, Management.

[0140] After calling the DeepSeek-Chat model, the label result is: [Function].

[0141] S205: Structured output:

[0142] The classification result is fused with the entity structure, and the output format is {“e raw ”:“Wind flow direction (opposite to coal seam inclination direction)”,“e base ”:“Wind flow direction”,“e type ”:“Property”,“e key ”:“Opposite to coal seam inclination direction”,“e value ”:“Opposite”,“labels”:[“Function”]}}, and all entities are written to a structured file.

[0143] In this embodiment, the final output result structure is {e raw : downcast ventilation, e base : downcast ventilation, e type : downcast ventilation, e key : downcast ventilation, e value : downcast ventilation, labels: [function]}.

[0144] S300: Response rule extraction and path structure generation:

[0145] S301: Rule candidate screening:

[0146] From the entity structure set, screen out entity items of the "property" or "condition" type as candidate trigger sources, satisfying:

[0147] e type ∈{property, condition}

[0148] Combine the existing area, condition, event and action nodes in the triplets, and identify valid paths with the following structures: area→condition, condition→event, event→action chain. The rule path must contain the above three basic structure fragments, ensuring that each path contains at least one event trigger structure and one response action node.

[0149] S302: Rule field mapping and five-tuple construction:

[0150] For each candidate path, extract and construct the rule fields: area entity r, condition parameter keyword e key , condition parameter value e value , event entity e, recommended action chain A e =[a1, a2,..., a n ], forming the rule path five-tuple structure R i ={r, e key , e value , e, A e}.

[0151] If the action chain contains multiple sequential actions, the path chain is further expanded to e→a1→a2→…→a n .

[0152] In this embodiment, the fields involved in the path are extracted and constructed as follows:

[0153] R struct ={r, e key , e value , e, A e}

[0154] Where r is the upper corner of the coal mining face, e key is the gas concentration, e valueFor > 1.0%, e is gas overrun, A e For [cut off power, stop work].

[0155] S303: Rule semantic expression generation:

[0156] Convert the rule five-tuple into two expressions: one is the natural language rule (rule_form), which is "if r.e key = e value , trigger event e, and need to perform action chain A e "; the other is the logical expression (rule_expr), which is "IF r.e key = e value THEN ".

[0157] In this embodiment, the rule is converted into natural language and logical expression:

[0158] rule form (natural language): if the gas concentration in the upper corner of the coal mining face is > 1.0%, trigger gas overrun, and need to perform cut off power -> stop work.

[0159] rule expr (logical expression): IF coal mining face upper corner. gas concentration > 1.0% THEN gas overrun -> {cut off power, stop work}.

[0160] S304: Rule deduplication, standardization and storage:

[0161] All rule fields are uniformly formatted, including: numerical field uniform unit format; event and action node debracketing, only basic entities are retained; similar paths are deduplicated by hashing; output JSON format is used for graph import and question answering interface call.

[0162] To eliminate semantic repetition and graph redundancy caused by inconsistent naming: extract pure numerical and unit form; clean up bracket information, only keep the basic name of entity; use structure hashing for rule path deduplication.

[0163] In this embodiment, the output result structure is: {region: coal mining face upper corner, parameter: gas concentration, value: > 1.0%, event: gas overrun, recommended action chain: [cut off power, stop work], rule_form: if the gas concentration in the upper corner of the coal mining face is > 1.0%, trigger gas overrun, and need to perform cut off power -> stop work, rule_expr: IF coal mining face upper corner. gas concentration > 1.0% THEN gas overrun -> {cut off power, stop work}}, and the complete flowchart is shown in Figure 4 .

[0164] S305: Rule set derivation:

[0165] A complete rule path set R = {R1, R2,..., R n} is constructed, and a query template set Q = {Cypher(p i ) | p i e p} is generated, which is used for graph path reasoning and response content query. Each path is mapped to a Neo4j graph database query template for direct calling by the path reasoning module and the question and answer interface module.

[0166] S400: Ventilation knowledge graph construction and path mapping modeling:

[0167] S401: Path structure unification and semantic merging:

[0168] Since the entity classification stage adopts six types of ontology labels (region, real object, event, action, function, and management), and the path reasoning process needs to focus on the logical execution chain, this step maps and merges the six types of ontology into four types of path nodes:

[0169]

[0170] The above merging strategy takes into account the executability of the path structure and the completeness of the ontology expression.

[0171] For example, the local ventilator (wind speed ≥ 1.5 m / s) entity, whose basic item is local ventilator, is marked as a real object; the content in the parentheses is identified as an attribute type condition, and the whole is taken as a Condition node to participate in path construction.

[0172] S402: Path template construction:

[0173] Each response path P i is represented as follows:

[0174] P i = {r→c→e→A e}

[0175] Where r represents a region entity (Region); c represents a condition entity (Condition) with a field structure of param:value; e represents an event entity (Event); A e = {a1, a2,..., a n} represents an action entity chain (Action).

[0176] If the action is a multi-step sequential operation, the path is further expanded into a chain structure r→c→e→a1→a2→…→a n .

[0177] In this embodiment, the example path structure is r→c→e→a1→a2, where r is the upper corner of the coal mining face, c is the gas concentration >1.5%, e is the gas exceeding the limit, and A e To [cut off the power supply and stop the operation].

[0178] S403: Generate path query template:

[0179] This step automatically converts the path structure into a Cypher query template in the graph database. The example template is as follows:

[0180] MATCH path=(r:Region)-[:HAS_CONDITION]->(c:Condition)-[:TRIGGERS_EVENT]->(e:Event)

[0181] -[:RECOMMENDED_ACTION*0..5]->(a:Action)

[0182] WHEREr.name CONTAINS$region AND e.name CONTAINS$event

[0183] RETURN path

[0184] This template supports fuzzy matching of paths by regional keywords and event names, and is suitable for graph question answering, path interpretation, and visual rendering requirements.

[0185] In this embodiment, based on the above path, the query template is constructed as follows:

[0186] MATCH path=(r:Region)-[:HAS_CONDITION]->(c:Condition)-[:TRIGGERS_EVENT]->(e:Event)-[:RECOMMENDED_ACTION*0..5]->(a:Action)

[0187] WHERE.name CONTAINS'coal working face corner' AND e.name CONTAINS'gas exceeding limit'

[0188] RETURN path

[0189] This statement can be used as the path retrieval entry for the keyword search function in the graph visualization module.

[0190] S404: Graph Database Node and Edge Mapping

[0191] All path nodes are uniformly mapped to graph database entity nodes, and the field structure is as follows:

[0192]

[0193] The edge relationship between entities is as follows:

[0194]

[0195] The node and relationship data are exported in.csv format, and the fields include node table fields (node_id, label, name, param, value, type) and relationship table fields (start_id, end_id, relation_type).

[0196] In this embodiment, the constructed entity nodes are saved in table format as follows:

[0197]

[0198] The edge relationship record is as follows:

[0199]

[0200] S405: Graph import and structure verification

[0201] After construction, use Neo4j tools for batch import and structure verification, and the commonly used verification statements are as follows:

[0202] MATCH

[0203] (r:Region)-[:HAS_CONDITION]->(c:Condition)-[:TRIGGERS_EVENT]->(e:Event)

[0204] RETURN count(DISTINCT r),count(DISTINCTc),count(DISTINCTe)

[0205] Through path closure rate and node integrity check, it is confirmed that the knowledge graph has the structural basis for graph query, semantic reasoning and question and answer calling.

[0206] In this embodiment, the Cypher command is used to verify the path closure, such as:

[0207] MATCH

[0208] (r:Region)-[:HAS_CONDITION]->(c:Condition)-[:TRIGGERS_EVENT]->(e:Event)

[0209] RETURN count(*)

[0210] The query returns the result to confirm that the upper corner of the coal mining face → gas concentration > 1.0% → gas overrun path is successfully closed, and the nodes and relationships have fallen into the graph database. If there is an unclosed path, execute Figure 5 the process closure path.

[0211] S500: Graph-driven question generation and response content output.

[0212] S501: Natural language input analysis:

[0213] The system receives a natural language question q, such as "What should be done if the gas concentration near the local fan exceeds the limit?"

[0214] Through the prompt embedding template, guide the language model to extract structured semantic fragments:

[0215] S e ={region,event,param,value}

[0216] Where region represents the spatial location involved in the question; event represents the corresponding abnormal phenomenon; param represents the condition parameter keyword; and value represents the condition value or threshold.

[0217] In this embodiment, the user inputs the question: What should be done if the gas concentration near the local fan exceeds the limit?

[0218] The system constructs a prompt template to guide the model to extract structured fields, and obtains:

[0219] S q ={region: local fan nearby, event: gas overrun, param: gas concentration, value: to be supplemented}

[0220] The model output is verified by regular expressions and field structure to ensure that the extraction result can be used for querying.

[0221] S502: Entity standardization and vector matching:

[0222] The extracted result is encoded into a semantic vector and compared with the graph entity set V to calculate the similarity:

[0223]

[0224] Where V is the graph entity set, and V e is the embedding vector of the entity. If the maximum similarity exceeds the threshold (such as 0.85), it is considered to be semantically consistent, and the field is standardized to

[0225] In this embodiment, the system calls the pre-trained embedding model to vectorize the user field and match it with the graph entity library. If the local fan is written as a local fan in the graph, then:

[0226]

[0227] Similarly

[0228] The system replaces the user field with the standard entity in the graph to ensure the consistency of the graph query.

[0229] S503: Path query and graph response extraction:

[0230] Construct a path query template with standardized fields as parameters, and extract the response chain structure from the graph database:

[0231] MATCH path=(r:Region)-[:HAS_CONDITION]->(c:Condition)-[:TRIGGERS_EVENT]->(e:Event)

[0232] -[:RECOMMENDED_ACTION*0..5]->(a:Action)

[0233] WHEREr.name=$region AND e.name=$event

[0234] RETURN c.param,c.value,e.name,col lect(a.name)

[0235] The system outputs the structured response result as R e ={r,(param,value),e,A e}.

[0236] In this embodiment, the following Cypher query statement is constructed based on the standardized field:

[0237] MATCH path=(r:Region)-[:HAS_CONDITION]->(c:Condition)

[0238] -[:TRIGGERS_EVENT]->(e:Event)

[0239] -[:RECOMMENDED_ACTION*0..5]->(a:Action)

[0240] WHERE r.name = 'local ventilator' AND e.name = 'gas overrun'

[0241] RETURN c.param, c.value, e.name, collect(a.name)

[0242] The return structure is as follows:

[0243] {region: local ventilator, param: [gas concentration, stop operation, gas concentration,...], value: [> 1.0%, increase,...], event: gas overrun, actions: [rectification, treatment measures, application for closure, power cut, production suspension, face production suspension, serious accountability, related mining activities, violation, preventive measures, cause identification,...]}.

[0244] S504: Natural language response generation

[0245] The query result R e is spliced with the original question q to construct an embedded Prompt template to guide the language model to generate a coherent and professional natural language answer. An example of the template is as follows:

[0246] Background: Abnormalities occur in a certain area

[0247] Conditions: In [region], [param] is [value]

[0248] Event: Trigger [event]

[0249] Response: Suggest performing action chain [a1→a2→...].

[0250] In this embodiment, the system constructs the Prompt as follows:

[0251] "Background: There are abnormalities in the mine ventilation system in a certain area

[0252] Known conditions: In the upper corner of the coal mining face, the gas concentration is > 1.0%, triggering gas overrun

[0253] Suggested response: Recommend performing the following actions: power cut → personnel evacuation → stop work

[0254] The output natural language answer is:

[0255] In the upper corner of the coal mining face, the gas concentration exceeds 1.0% and triggers gas overrun, and it is recommended to immediately implement the following control measures: cut off the power, organize personnel evacuation, and suspend work to ensure safety."

[0256] Figure 6The prompt path structure diagram returned by the system, Figure 7 The gas over-limit question and answer example diagram near the local ventilator, Figure 8 And Figure 9 The Pyvis visualization subgraph and the Neo4j visualization subgraph of the upper corner related event response path on the coal mining face.

[0257] S505: Optional path trajectory and multi-round dialogue support:

[0258] The system supports additional generation of structured path explanations to enhance the explainability and trustworthiness of the question and answer results. At the same time, the system can support continuous dialogue and multi-round question and answer in combination with the context history question. If the user continues to ask: Are there other measures? The system will retrieve the action chain not given in the graph, or generate a backup scheme based on the rules, and generate a natural language answer again to complete the multi-round closed loop.

[0259] The above is only the preferred specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A mine ventilation event capture and action reasoning intelligent question answering method, characterized by: The following steps are involved: S100: Extract ventilation-related entity, attribute, and rule triples from procedural documents and technical corpus; S200: Performing structural analysis and context modeling on the triples to construct a semantic labeling system; S3 00: construct the region, condition, event and action nodes in the triple into a five-tuple path with logical connectivity; S400: Constructing ventilation knowledge graph and modeling path mapping; S500: Complete the structural mapping and answer generation of natural language questions through structure extraction and semantic retrieval.

2. The intelligent question-answering method for mine ventilation event capture and motion reasoning according to claim 1 is characterized by: The step of extracting ventilation-related entity, attribute, and rule triples from the procedure documents and technical corpus includes: S101: collecting raw data, cleaning and segmenting the raw data, and obtaining ventilation-related statements as cleaned data; the raw data may be sourced from coal mine safety regulations, on-site ventilation measures records, and industry textbooks; S102: Divide the cleaned data into four types of structured tasks and define their corresponding fields; the four types of structured tasks include information extraction tasks, knowledge extraction tasks, entity attribute extraction tasks, and relationship rule extraction tasks; the above tasks correspond to different semantic roles in the structured triples, and the original triple set is obtained: T=T fact ∪T rule Among them, T fact Represents a factual triple; T rule Represents a rule triple containing trigger conditions and response actions; S103: labeling the cleaned data using a three-segment format of instruction, input, and output, and saving the output sample in JSONL format; S104: generating an initial label for each of the samples based on the structured task type; S105: Save the samples with initial labels in JSONL format, and classify and output them according to the above four task types.

3. The intelligent question-answering method for capturing mine ventilation events and reasoning about motions according to claim 2 is characterized by: The extraction fields corresponding to the information extraction task are: entity name, item name, item content, and measure classification; the fields corresponding to the knowledge extraction task are: subject entity, predicate verb, and object entity; the fields corresponding to the entity attribute extraction task are: entity, attribute type, value, unit, and symbol; the fields corresponding to the relationship rule extraction task are: trigger condition, event node, action node, and parameter key value.

4. The intelligent question-answering method for capturing mine ventilation events and reasoning about actions according to claim 2 is characterized by: The steps of performing structural analysis and context modeling on the triples and building a semantic labeling system include: S201: Entities in the original triple set are parsed according to the following rules: If the entity contains a bracket structure and the bracket contains a colon, it is considered an attribute entity and parsed as: If it contains a bracket structure and there is no colon in the brackets, it is considered a conditional entity and parsed as: If there is no bracket structure, mark its e type = No label; finally all entities are normalized to: And={and base ,And type ,And key ,And value }; S202: For each entity e∈E, traverse all its occurrence positions in the triple set and construct its context path set C e , expressed as: C e ={(h i ,r i ,t i )∣e∈{h i ,t i },(h i ,r i ,t i )∈T}; Each path can be transformed into: subject→predicate→object, and this structure is used as the semantic input of the classification model. S203: Construct an ontology set L containing six types of semantic labels: L = {Space, Real Object, Event, Action, Function, Manage}; S204: Combine entity context path set C e , construct structured Prompt input, use multi-label large language model for semantic judgment, and output the label L corresponding to the entity e , S205: The classification results are integrated with the entity structure, and all entities are written into a structured file as input data for subsequent rule extraction and path construction modules.

5. The intelligent question-answering method for capturing mine ventilation events and reasoning about actions according to claim 4 is characterized by: The steps of constructing the region, condition, event and action node in the triple into a five-tuple path with logical connectivity include: S301: Filter entity items with bracket types of "attribute" or "condition" from the entity structure set as candidate trigger sources, and satisfy the following conditions: e type ∈{attribute, condition} Combining the existing region, condition, event, and action nodes in the triple, we identify valid paths with the following structures: region → condition, condition → event, event → action chains as candidate paths; S302: For each candidate path, extract and construct rule fields: region entity r, condition parameter keyword e key 、Conditional parameter value e value , event entity e, action entity chain A e =[a1,a2,...,a n ], forming a regular path quintuple structure R i ={r,e key ,e value ,e,A e }; If the action entity chain contains multiple sequential actions, the path chain is further expanded to e→a1→a2→…→a n ; S303: Convert the rule quintuple into two expressions: one is a natural language rule (rule_form), which is: "If r in e key =e value , then event e is triggered and action entity chain A needs to be executed e "; The second is the logical expression (rule_expr), which is: "IFr.e key =e value THEN ”; S304: All rule fields are formatted uniformly, including: unifying the unit format of numerical fields; removing brackets from event and action nodes, retaining only the basic entities; deduplicating similar paths using hashing; and outputting in JSON format for graph import and Q&A interface calls. S305: Construct a complete rule path set R = {R1, R2, ..., R n }, and generate a query template set Q = {Cypher (p i )|p i ∈p}, which is used for graph path reasoning and responding to content queries.

6. The intelligent question-answering method for capturing mine ventilation events and reasoning about actions according to claim 5 is characterized by: The steps of constructing a ventilation knowledge graph and modeling a path mapping include: S401: merging the six types of semantic label mappings into four types of path nodes; S402: Construct a path template. Each response path P i It is expressed as the following formula: P i ={r→c→e→A e } Among them, r represents the region entity; c represents the condition entity, and the field structure is param:value; e represents the event entity; A e ={a1,a2,...,a n } represents the action entity chain; If the action is a multi-step sequential operation, the path is further expanded into a chain structure r→c→e→a1→a2→…→a n . S403: Generate path query template: automatically convert the path structure into a Cypher query template in the graph database; S404: All path nodes are uniformly mapped to graph database entity nodes, and the edge relationships between entities are mapped; the node and relationship data are exported in .csv format, and the fields include node table fields and relationship table fields. S405: Use Neo4j tools for batch import and structure verification. Verify the path closure rate and node integrity to confirm that the knowledge graph has the structural foundation for graph query, semantic reasoning, and question-answering calls.

7. The intelligent question-answering method for capturing mine ventilation events and reasoning about motions according to claim 6, characterized in that: The steps of completing the structural mapping and answer generation of natural language questions through structural extraction and semantic retrieval include: S501: The system receives a natural language question and guides the language model to extract structured semantic fragments through a prompt embedding template: S e ={region,event,param,value} Where region represents the spatial location involved in the problem; event represents the corresponding abnormal phenomenon; param represents the condition parameter keyword; value represents the condition value or threshold; S502: Encode the extracted results into semantic vectors and compare them with the graph entity set V to calculate the similarity: Where V is the graph entity set, V e is the embedding vector of the entity. If the maximum similarity exceeds the threshold, it is considered semantically consistent and the field is standardized to S503: Build a path query template using standardized fields as parameters and extract the response chain structure from the graph database; the system outputs the structured response result as R e ={r,(param,value),e,A e }. S504: The query result R e Concatenate with the original question q to construct an embedded Prompt template, guiding the language model to generate a natural language answer; S505: The system generates additional structured path explanations and simultaneously conducts continuous dialogue and multi-round question-answering in conjunction with contextual historical questions.