Coal mine safety intelligent question-answering system based on large language model and construction method

By designing a coal mine safety intelligent Q&A system based on the big language model, the problem of existing coal mine safety technology relying on manual management is solved, intelligent safety knowledge sharing and management is realized, and the level of coal mine safety management is improved.

CN119514659APending Publication Date: 2025-02-25陕西智引科技有限公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411492101.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing coal mine safety technology relies on the safety awareness and management experience of practitioners. It has low inspection efficiency and irregularity, lacks scoring basis, and lacks a coal mine safety knowledge problem system based on large language models.

Method used

Design a coal mine safety intelligent question-and-answer system based on large language models, and realize intelligent question-and-answer and knowledge retrieval through data processing and storage, model adaptation and management, and intelligent body framework construction, and improve the level of coal mine safety management.

Benefits of technology

It has realized the center of coal mine safety and intelligent processing capabilities, and can accurately and intelligently provide safety knowledge sharing and system publicity, improve the level of coal mine safety management, and ensure the safety of life and property.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514659A_ABST
    Figure CN119514659A_ABST
Patent Text Reader

Abstract

The invention discloses a coal mine safety intelligent question-answering system based on a large language model and a construction method, and relates to the technical field of coal mine safety. The coal mine safety intelligent question-answering system comprises the steps of performing data processing and storage on coal mine safety data and coal mine safety knowledge, and constructing an adaptive base which can be applied to different external large models; a plurality of domestic large models are introduced, and analysis, research and adaptation are carried out. By constructing adaptive bases which can be applied to different external large models, introducing knowledge understanding ability, logical reasoning ability, decision planning ability and the like of a general large language model, and constructing a coal mine safety intelligent question-answering system through methods such as prompt engineering and efficient fine tuning, a center with intelligent processing ability in the field of coal safety can be obtained, and the intelligent question-answering system can be applied to the field of coal safety. The system has the capability of understanding proprietary knowledge, can accurately and intelligently provide safety knowledge sharing and safety system diffusion, effectively improves the level of coal mine safety management, and guarantees the life safety and property safety of coal miners.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of coal mine safety, and in particular to a coal mine safety intelligent question-answering system based on a large language model and a construction method thereof. Background Art

[0002] Traditional coal mine safety technologies include mine ventilation systems, gas detection, mine support structure construction, fire and water hazard prevention, electromechanical equipment safety management, safety management system training, and implementation of laws and regulations. They mainly ensure safety from two aspects: hardware facility improvement and management system implementation. However, the decision-making end is very dependent on the safety awareness and management experience of practitioners, with high labor intensity. In addition, there is no coal mine safety knowledge question system based on a large model. Coal mine inspectors can only obtain safety information by consulting paper or electronic materials, which will lead to low inspection efficiency, irregular inspections, lack of scoring basis, and other problems. To this end, this application proposes a coal mine safety intelligent question-and-answer system based on a large language model and a construction method to solve the above problems. Summary of the invention

[0003] 1. Technical issues to be resolved

[0004] In view of the deficiencies in the prior art, the present invention provides a coal mine safety intelligent question-answering system based on a large language model and a construction method, which solves the technical problems raised in the above background.

[0005] (II) Technical solution

[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is:

[0007] A question-answering method for a coal mine safety intelligent question-answering system based on a large language model comprises the following steps:

[0009] S1: Data processing and storage of coal mine safety data and coal mine safety knowledge, including:

[0010] Access, analyze, cleanse and create data indexes for various types of data;

[0011] Database storage of coal mine safety data;

[0012] Organize, summarize and store coal mine safety knowledge to form a coal mine safety knowledge base;

[0013] S2: Build an adaptation base that can be used for different external large models, introduce a variety of domestic large models and conduct analysis, research, and adaptation, and have the knowledge understanding, logical reasoning, decision-making and planning capabilities of the base large models;

[0014] S3: For the various domestic large models described in S2, build a model adaptation tool to achieve the adaptation of the inference engines of different large models and complete the large model file format conversion;

[0015] S4: Based on the safety data and safety knowledge base stored in S1 and the model base built by S2 and S3, it performs core control and management of the coal mine safety intelligent question-answering system, including management of various services of the large model, NLP management, and other algorithm management;

[0016] S5: Build a coal mine safety intelligent agent framework to realize the capabilities of the intelligent agent hub, planning and decision-making components, storage components, execution components, and tool components, and apply the capabilities of various intelligent agents to specific safety business work in the form of intelligent question and answer;

[0017] S6: Build intelligent business application services based on intelligent question-answering, use intelligent question-answering for intelligent agents as the backend service, provide large model analysis results to the business frontend, and output knowledge retrieval and other services in the field of coal mine safety for customers

[0018] Preferably, in said step S1, the various types of coal mine data to be collected mainly include: coal mine geology, geological structure, coal seam occurrence, gas emission law, mine ventilation system, etc.;

[0019] The types of data that need to be stored include: sending structured safety business data such as gas concentration, temperature and humidity, miner information, and production data into relational databases for storage; vectorizing and factor extracting data related to safety knowledge such as national safety standards, enterprise safety standards, and district team assessment standards, and then placing them into knowledge graphs, vector databases, ES and other storage units according to business needs to form a coal mine safety knowledge base.

[0020] Preferably, in step S2, the selection of the base large model includes an open source large model that can be privately deployed.

[0021] Preferably, in step S3, the large model file conversion is realized in the model adaptation layer through common formats such as ONNX and HugginFace, and the adaptation of different base large models is completed by using the inference engine composed of FastChat inference framework and vLLm inference backend, and the fine-tuning service of the algorithm service layer is cooperated to form a coal mine safety large model and its adaptation base.

[0022] Preferably, in step S4, the various technical service management of the large model includes: prompt engineering prompt, model fine-tuning LoRa and question-and-answer service management;

[0023] NLP algorithms mainly include intent recognition required for knowledge understanding, QA enhancement methods required for large model data construction, text vectorization related methods required for knowledge retrieval, etc., while semantic understanding technologies such as keyword extraction and topic extraction required for security business professional model interaction are also included;

[0024] Algorithm management includes configuration management of large models and dictionary management involved in large model applications. Research contents such as machine learning, deep learning model training, and deployment involved in security business models and knowledge questions are also included in the algorithm management section.

[0025] Preferably, in step S5, the coal mine safety intelligent body framework serves as the core of the coal mine safety intelligent question and answer system, and mainly realizes the calling capability of corresponding components, such as producing coal mine safety reports, retrieving coal mine safety documents, evaluating safety inspection results, guiding user function operations, etc.

[0026] Preferably, the steps of constructing the coal mine safety intelligent agent framework include:

[0027] (1) Construct the intelligent agent center and select appropriate LLM to construct the intelligent agent center so that it has the ability to control, perceive and act;

[0028] (2) Storing memory into the agent, injecting relevant knowledge of safety business applications by using long-term memory (fine-tuning) and short-term memory (prompt context); using the memory of external auxiliary models, including external coal mine safety knowledge base, document retrieval based on questions, and question + related document input into the large model;

[0029] (3) External tool assistance: effectively use external tools to cooperate with query, retrieval, calculation, etc. to effectively perform security business tasks, including long-term memory, search, web browsing, code execution, file system, database, etc.;

[0030] (4) Build a reasonable prompt word project, stimulate the model's capabilities through better prompt words, and transform more of the process "hard logic" that originally needed to be implemented through code into "dynamic logic" automatically generated by the model.

[0031] Preferably, the retrieval process of the coal mine safety intelligent question-answering system includes:

[0032] (1) The user enters a query;

[0033] (2) Domain classification and intent recognition of user input questions;

[0034] (3) Domain classification: Obtain the domain label of the problem through the existing business database, vector database and knowledge graph;

[0035] (4) Intent recognition is the process of understanding security questions and answers or security task requirements. It mainly completes two aspects: intent strategy and entity relationship extraction. Among them, the intent strategy outputs the corresponding search and recall strategy to facilitate multi-database retrieval; after the entity relationship is extracted, the corresponding graph query will be performed, and the query results will be placed in the recall information for integration;

[0036] (5) Knowledge retrieval: including comprehensive data retrieval methods such as vector retrieval based on similarity and Es big data retrieval; full-text retrieval, keyword retrieval, and vector retrieval are performed based on domain labels and search recall strategies, and the retrieval results and knowledge graph query results are integrated to recall information;

[0037] (6) After knowledge synthesis, the answer is output, and the accuracy of the answer is improved by matching the prompt engineering method suitable for different coal mine safety application scenarios and the efficient fine-tuning process.

[0038] The present invention also provides a coal mine safety intelligent question and answer system based on a large language model, which is a system constructed using the steps of the above-mentioned method for constructing a coal mine safety intelligent question and answer system based on a large language model.

[0039] (III) Beneficial effects

[0040] The beneficial effects of the present invention are:

[0041] This coal mine safety intelligent question-and-answer system and construction method based on a large language model, by constructing an adaptation base that can be applied to different external large models, introduces the knowledge understanding ability, logical reasoning ability, decision-making planning ability, etc. of the general large language model, and constructs a coal mine safety intelligent question-and-answer system through prompt engineering, efficient fine-tuning and other methods. It can obtain a hub with intelligent processing capabilities in the field of coal safety, enable it to have the ability to understand proprietary knowledge, and can accurately and intelligently provide safety knowledge sharing and safety system promotion, effectively improve the level of coal mine safety management, and ensure the life and property safety of coal miners. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is an overall flow chart of the intelligent question answering system and method of the present invention;

[0043] Figure 2 This is a framework diagram of the coal mine safety intelligent body of the present invention;

[0044] Figure 3 This is a retrieval flow chart of the intelligent question answering system of the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] like Figure 1-3 As shown, the present invention provides a technical solution:

[0047] A question-answering method for a coal mine safety intelligent question-answering system based on a large language model comprises the following steps:

[0049] S1: Data processing and storage of coal mine safety data and coal mine safety knowledge, including:

[0050] Access, analyze, cleanse and create data indexes for various types of data;

[0051] Database storage of coal mine safety data;

[0052] Organize, summarize and store coal mine safety knowledge to form a coal mine safety knowledge base;

[0053] The various types of coal mine data that need to be collected mainly include: coal mine geology, geological structure, coal seam occurrence, gas emission rules, mine ventilation system, etc.;

[0054] The data types that need to be stored include: sending structured safety business data such as gas concentration, temperature and humidity, miner information, and production data into relational databases for storage; vectorizing and extracting safety knowledge-related data such as national safety standards, enterprise safety standards, and district team assessment standards, and then placing them in knowledge graphs, vector databases, ES and other storage units according to business needs to form a coal mine safety knowledge base.

[0055] S2: Build an adaptation base that can be used for different external big models, introduce a variety of domestic big models and analyze, study and adapt them, and have the knowledge understanding, logical reasoning, decision-making and planning capabilities of the base big models. The selection of base big models includes open source big models that can be privately deployed, such as Tsinghua's ChatGLM, Baichuan Big Model, Wudao-Tianying, etc., as well as Baidu Wenxin Yiyan, Alibaba's Tongyi Qianwen, and iFlytek's Spark, which provide shared cloud services;

[0056] S3: For the various domestic large models described in S2, a model adaptation tool is built to achieve the adaptation of the inference engines of different large models and complete the conversion of large model file formats. In the model adaptation layer, the large model file conversion is achieved through common formats such as ONNX and HugginFace. The inference engine composed of the FastChat inference framework and the vLLm inference backend is used to complete the adaptation of large models with different bases. In conjunction with the fine-tuning service of the algorithm service layer, a coal mine safety large model and its adaptation base are constructed.

[0057] S4: Based on the safety data stored in S1, the safety knowledge base and the model base built by S2 and S3, it performs core control and management of the coal mine safety intelligent question-and-answer system, including the management of various services of the large model, NLP management and other algorithm management. The various technical service management of the large model includes: prompt engineering prompt, model fine-tuning LoRa and question-and-answer service management;

[0058] NLP algorithms mainly include intent recognition required for knowledge understanding, QA enhancement methods required for large model data construction, text vectorization related methods required for knowledge retrieval, etc., while semantic understanding technologies such as keyword extraction and topic extraction required for security business professional model interaction are also included;

[0059] Algorithm management includes configuration management of large models and dictionary management involved in large model applications. Research contents such as machine learning, deep learning model training, and deployment involved in security business models and knowledge questions are also included in the algorithm management section;

[0060] S5: Build a coal mine safety intelligent agent framework to realize the capabilities of the intelligent agent hub, planning and decision-making components, storage components, execution components, and tool components. Apply the capabilities of various intelligent agents to specific safety business work in the form of intelligent question and answer. The coal mine safety intelligent agent framework, as the hub of the coal mine safety intelligent question and answer system, mainly realizes the calling capabilities of corresponding components, such as producing coal mine safety reports, retrieving coal mine safety documents, judging safety inspection results, and guiding user function operations;

[0061] The steps to build the coal mine safety agent framework include:

[0062] (1) Construct the intelligent agent center and select appropriate LLM to construct the intelligent agent center so that it has the ability to control, perceive and act;

[0063] (2) Storing memory into the agent, injecting relevant knowledge of safety business applications by using long-term memory (fine-tuning) and short-term memory (prompt context); using the memory of external auxiliary models, including external coal mine safety knowledge base, document retrieval based on questions, and question + related document input into the large model;

[0064] (3) External tool assistance: effectively use external tools to cooperate with query, retrieval, calculation, etc. to effectively perform security business tasks, including long-term memory, search, web browsing, code execution, file system, database, etc.; for example, if a user asks about the local weather today, what impact it will have on open-pit coal mining, and what preventive measures need to be taken, the intelligent agent first understands the user's needs, executes the search tool and obtains weather information, then retrieves the knowledge base and other memory outputs to match the open-pit coal mining prevention strategy under the weather, and finally organizes and summarizes the output results to the interface;

[0065] (4) Build a reasonable prompt word project, stimulate the model's capabilities through better prompt words, and transform more process "hard logic" that originally needed to be implemented through code into "dynamic logic" automatically generated by the model; In order to enable the language comprehension ability of the large model to fully understand the instructions and tasks in the field of coal mine safety, the following mode of dialogue training is required:

[0066] Input question: During the production of the coal mine excavation team, they excavated 10 meters, with 100 points per meter. They completed 10 anchor rods, with each anchor rod worth 5 points. The number of unqualified anchor rods was 2 points deducted for each anchor rod. Please calculate the total work points of this class?

[0067] Input suggestion: Calculator, used to perform various mathematical calculations to obtain accurate results, enter an expression, such as 1+1, and get the result...

[0068] Model generation content:

[0069] 1. Think: I need to use a calculator to calculate 10 times 100 plus 10 times 5 minus 1 times 2

[0070] 2. Action: Call the calculator

[0071] 3. Motion input: 10*100+10*5–1*2

[0072] 4. Observation results: 1048

[0073] The actual training process should construct various types of prompt words for specific coal mine safety business application scenarios;

[0074] S6: Build intelligent business application services based on intelligent question-answering, with intelligent question-answering for intelligent agents as the back-end service form, provide large model analysis results to the business front-end, and output knowledge retrieval and other services in the field of coal mine safety for customers.

[0075] The retrieval process of the coal mine safety intelligent question-answering system includes:

[0076] (1) The user enters a query;

[0077] (2) Domain classification and intent recognition of user input questions;

[0078] (3) Domain classification: Obtain the domain label of the problem through the existing business database, vector database and knowledge graph;

[0079] (4) Intent recognition is the process of understanding security questions and answers or security task requirements. It mainly completes two aspects: intent strategy and entity relationship extraction. Among them, the intent strategy outputs the corresponding search and recall strategy to facilitate multi-database retrieval; after the entity relationship is extracted, the corresponding graph query will be performed, and the query results will be placed in the recall information for integration;

[0080] (5) Knowledge retrieval: including comprehensive data retrieval methods such as vector retrieval based on similarity and Es big data retrieval; full-text retrieval, keyword retrieval, and vector retrieval are performed based on domain labels and search recall strategies, and the retrieval results and knowledge graph query results are integrated to recall information;

[0081] (6) After knowledge synthesis, the answer is output, and the accuracy of the answer is improved by matching the prompt engineering method suitable for different coal mine safety application scenarios and the efficient fine-tuning process.

[0082] The present invention also provides a coal mine safety intelligent question and answer system based on a large language model, which is a system constructed using the steps of the above-mentioned method for constructing a coal mine safety intelligent question and answer system based on a large language model.

[0083] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for constructing a coal mine safety intelligent question-answering system based on a large language model, characterized by: Includes the following step: S1: Data processing and storage of coal mine safety data and coal mine safety knowledge, including: Access, analyze, cleanse and create data indexes for various types of data; Database storage of coal mine safety data; Organize, summarize and store coal mine safety knowledge to form a coal mine safety knowledge base; S2: Build an adaptation base that can be used for different external large models, introduce a variety of domestic large models and conduct analysis, research, and adaptation, and have the knowledge understanding, logical reasoning, decision-making and planning capabilities of the base large models; S3: For the various domestic large models described in S2, build a model adaptation tool to achieve the adaptation of the inference engines of different large models and complete the large model file format conversion; S4: Based on the safety data and safety knowledge base stored in S1 and the model base built by S2 and S3, it performs core control and management of the coal mine safety intelligent question-answering system, including management of various services of the large model, NLP management, and other algorithm management; S5: Build a coal mine safety intelligent agent framework to realize the capabilities of the intelligent agent hub, planning and decision-making components, storage components, execution components, and tool components, and apply the capabilities of various intelligent agents to specific safety business work in the form of intelligent question and answer; S6: Build intelligent business application services based on intelligent question-answering, with intelligent question-answering for intelligent agents as the back-end service form, provide large model analysis results to the business front-end, and output knowledge retrieval and other services in the field of coal mine safety for customers.

2. The method for constructing a coal mine safety intelligent question-answering system based on a large language model according to claim 1, characterized in that: In step S1, the various types of coal mine data that need to be collected mainly include: coal mine geology, geological structure, coal seam occurrence, gas emission law, mine ventilation system, etc.; The types of data that need to be stored include: sending structured safety business data such as gas concentration, temperature and humidity, miner information, and production data into relational databases for storage; vectorizing and factor extracting data related to safety knowledge such as national safety standards, enterprise safety standards, and district team assessment standards, and then placing them into knowledge graphs, vector databases, ES and other storage units according to business needs to form a coal mine safety knowledge base.

3. The method for constructing a coal mine safety intelligent question-answering system based on a large language model according to claim 1, characterized in that: In step S2, the selection of the base large model includes an open source large model that can be privately deployed.

4. The method for constructing a coal mine safety intelligent question-answering system based on a large language model according to claim 1, characterized in that: In step S3, the large model file conversion is realized in the model adaptation layer through common formats such as ONNX and HugginFace, and the adaptation of different base large models is completed by using the inference engine composed of FastChat inference framework and vLLm inference backend, and the fine-tuning service of the algorithm service layer is cooperated to form a coal mine safety large model and its adaptation base.

5. The method for constructing a coal mine safety intelligent question-answering system based on a large language model according to claim 1, characterized in that: In step S4, the various technical service management of the large model includes: prompt engineering prompt, model fine-tuning LoRa and question-and-answer service management; NLP algorithms mainly include intent recognition required for knowledge understanding, QA enhancement methods required for large model data construction, text vectorization related methods required for knowledge retrieval, etc., while semantic understanding technologies such as keyword extraction and topic extraction required for security business professional model interaction are also included; Algorithm management includes configuration management of large models and dictionary management involved in large model applications. Research contents such as machine learning, deep learning model training, and deployment involved in security business models and knowledge questions are also included in the algorithm management section.

6. The method for constructing a coal mine safety intelligent question-answering system based on a large language model according to claim 1, characterized in that: In step S5, the coal mine safety intelligent body framework serves as the core of the coal mine safety intelligent question and answer system, and mainly realizes the calling capability of corresponding components, such as producing coal mine safety reports, retrieving coal mine safety documents, judging safety inspection results, guiding user function operations, etc.

7. The method for constructing a coal mine safety intelligent question-answering system based on a large language model according to claim 1, characterized in that: The steps of constructing the coal mine safety intelligent agent framework include: (1) Construct the intelligent agent center and select appropriate LLM to construct the intelligent agent center so that it has the ability to control, perceive and act; (2) Storing memory into the agent, injecting relevant knowledge of safety business applications by using long-term memory (fine-tuning) and short-term memory (prompt context); using the memory of external auxiliary models, including external coal mine safety knowledge base, document retrieval based on questions, and question + related document input into the large model; (3) External tool assistance: effectively use external tools to cooperate with query, retrieval, calculation, etc. to effectively perform security business tasks, including long-term memory, search, web browsing, code execution, file system, database, etc.; (4) Build a reasonable prompt word project, stimulate the model's capabilities through better prompt words, and transform more of the process "hard logic" that originally needed to be implemented through code into "dynamic logic" automatically generated by the model.

8. The method for constructing a coal mine safety intelligent question-answering system based on a large language model according to claim 1, characterized in that: The retrieval process of the coal mine safety intelligent question-answering system includes: (1) The user enters a query; (2) Domain classification and intent recognition of user input questions; (3) Domain classification: Obtain the domain label of the problem through the existing business database, vector database and knowledge graph; (4) Intent recognition is the process of understanding security questions and answers or security task requirements. It mainly completes two aspects: intent strategy and entity relationship extraction. Among them, the intent strategy outputs the corresponding search and recall strategy to facilitate multi-database retrieval; after the entity relationship is extracted, the corresponding graph query will be performed, and the query results will be placed in the recall information for integration; (5) Knowledge retrieval: including comprehensive data retrieval methods such as vector retrieval based on similarity and Es big data retrieval; full-text retrieval, keyword retrieval, and vector retrieval are performed based on domain labels and search recall strategies, and the retrieval results and knowledge graph query results are integrated to recall information; (6) After knowledge synthesis, the answer is output, and the accuracy of the answer is improved by matching the prompt engineering method suitable for different coal mine safety application scenarios and the efficient fine-tuning process.

9. A coal mine safety intelligent question-answering system based on a large language model, characterized by: A system constructed using the steps of the method for constructing a coal mine safety intelligent question-and-answer system based on a large language model as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Self-learning intelligent question answering system and method with long-term and short-term memory

    CN119829726A

  • A self-learning intelligent question-answering system and method with long short-term memory

    CN119829726B