Mine risk hidden danger intelligent management and control system based on AI
By adopting the combination of BERT and LSTM models in mine risk assessment and hidden danger investigation, automated risk assessment and hidden danger investigation are achieved, and the problem of inadequate scientific and objective human assessment is solved, improving the accuracy and automation level of assessment are ensured. Safety production in coal mines.
Patent Information
- Application Number
- CN202410723046.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-06-05
AI Technical Summary
The existing mine risk assessment and hidden danger investigation rely on manual labor, resulting in incomplete, scientific and accurate assessment, and a large amount of repetitive work and human interference, affecting the objectivity of the assessment.
An intelligent management and control system for mining risk hazards based on AI is adopted, combined with BERT and LSTM models for intention identification and question-and-answer processing, automated risk assessment and hidden danger investigation, and improve the accuracy and objectivity of the assessment.
By automatically identifying intentions and generating answers, manual intervention is reduced, the accuracy and automation level of risk assessment and hidden danger investigation are improved, the universality and interpretability of the system are enhanced, and the objectivity of risk assessment and production safety are ensured.
Smart Images

Figure CN118916450A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet big data and risk management, and in particular to an AI-based intelligent management and control system for mine risk hazards. Background Art
[0002] With the development of the times, the status and role of energy resources in social development have become more prominent. Mines are the main source of mineral resources in my country. The core content of safety management of coal mine enterprises mainly includes risk classification control and hidden danger investigation and treatment.
[0003] At present, in the risk assessment stage, the main method is to combine qualitative and quantitative methods, and comprehensively consider the types of accidents that may be caused by risk sources, the degree of impact, the possibility of occurrence and other factors to rate the risks. In this process, it is necessary to find out the possible sources of danger based on relevant laws and regulations, production safety management requirements, the status of equipment operation, the working environment and other data, conduct qualitative and quantitative analysis of the sources of danger, evaluate the probability of occurrence, scope and degree of impact, determine the risk level, formulate relevant disposal control measures, and continuously improve. In the hidden danger investigation stage, the main purpose is to prevent accidents by discovering and eliminating hidden dangers. At present, the hidden danger investigation mainly involves relevant personnel using various methods and means to conduct inspections and assessments based on corresponding laws, regulations and technical standards, and to find hidden dangers and rectify, inspect and accept the hidden dangers.
[0004] However, the applicant found that the existing methods of manual risk assessment and hidden danger screening still have the following problems: 1) Due to the limited knowledge of human beings, it is impossible to achieve comprehensive, scientific and practical assessment, screening and treatment, and because human experience is very difficult to spread and not easy to share, the accuracy of existing risk assessment and hidden danger screening is poor. 2) There is a lot of repetitive work in risk assessment and hidden danger screening, which mainly depends on the work experience of the screening personnel, that is, risk assessment and hidden danger screening have a large number of human interference factors and a heavy subjective consciousness, resulting in poor objectivity of risk assessment and hidden danger screening. Therefore, how to improve the accuracy and objectivity of risk assessment and hidden danger screening is a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is: how to provide an AI-based intelligent management and control system for mine risk hazards, accurately identify various intent types in user questions through a combined model of BERT and LSTM, and realize risk assessment and hazard detection through the question and answer results generated by the question and answer model, thereby improving the accuracy and objectivity of risk assessment and hazard detection.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] The AI-based intelligent management and control system for mine risk hazards includes:
[0008] The question entry module is used to obtain user question text containing risk assessment and hidden danger troubleshooting intentions;
[0009] The multi-intent recognition module is used to take the user question text as input, perform intent recognition through the intent recognition model built based on the BERT model and the LSTM model, and output the corresponding multiple intent categories and the description target of each intent category;
[0010] The question-answering processing module is used to retrieve the description target of each intent category, obtain the retrieval information corresponding to each intent category, and then input the user question text and the retrieval information of all intent categories into the question-answering model, and output the corresponding question answer text;
[0011] The hidden danger analysis module is used to implement risk assessment and hidden danger detection based on the text of the question answer.
[0012] Preferably, the processing steps of the intent recognition model are as follows:
[0013] S101: Input the user question text into the encoder of the BERT model to generate the corresponding hidden vector;
[0014] The formula is:
[0015] c i =BERT-Encoder(ω 0:n ,i);
[0016] Where: c i represents the hidden vector; ω 0:n Represents the user question text, 1≤i≤n;
[0017] S102: Input the hidden vector into the forward neural network and obtain the probability distribution of the intent category through the Sigmoid function;
[0018] The formula is:
[0019] p = Sigmoid(MLP(c i ));
[0020] Where: p represents the probability distribution of intent category, which is a 1*n-dimensional vector, and each dimension represents the probability of identifying an intent category; MLP is a fully connected neural network;
[0021] S103: Connect the intent category probability distribution with the hidden vector to obtain a fused probability distribution;
[0022] The formula is:
[0023]
[0024] Where: h i represents the fusion probability distribution;
[0025] S104: Input the fused probability distribution into the LSTM model to generate the corresponding slot filling probability distribution, and output the intent category of each word in the user question text through the Sigmoid function, that is, the description target;
[0026] The formula is:
[0027] r i =Sigmoid(LSTM(h i ));
[0028] Where: r i Represents the intent category of the i-th word in the user's question text, that is, the i-th description target.
[0029] Preferably, the loss function when training the intent recognition model is as follows:
[0030]
[0031] in
[0032] Where: p i 、r i Represents the probability distribution of intent categories predicted by the intent recognition model and describes the target; Represents the probability distribution of intent categories and the true label describing the target; y i For r i or p i ; for or
[0033] Preferably, the processing steps of the question-answer processing module are as follows:
[0034] S201: taking multiple intent categories and description targets of each intent category as input;
[0035] S202: Determine the information source of the retrieved information based on the intent category;
[0036] S203: searching in corresponding information sources based on the description target of each intent category to obtain search information corresponding to each intent category;
[0037] S204: Input the user question text and the retrieved information into the question-answering model, and output the corresponding question answer text.
[0038] Preferably, in step S204, the processing steps of the question-answering model are as follows:
[0039] S2041: Encoding the user question text and the retrieved information through an embedding layer to obtain an embedded representation of the user question text and the retrieved information, so as to convert the user question text and the retrieved information into a form understandable to the question-answering model;
[0040] S2042: Input the embedding representation of the user question text and the retrieval information into the stacked multi-layer Transformer, and output the embedding representation of the answer;
[0041] S2043: Decode the embedded representation of the answer to generate the question answer text.
[0042] Preferably, in step S202, the intent categories include safety knowledge base, risk level classification, risk measure formulation, accident hazard investigation and hazard disposal measures;
[0043] The information sources for retrieving information include six information sources corresponding to the safety knowledge base, risk level classification, risk measure formulation, accident hazard investigation and hazard disposal measures.
[0044] Preferably, in step S202, the information source is constructed by the following steps:
[0045] S2021: Obtain public and private documents related to coal mine production business scenarios;
[0046] S2022: Preprocess the public documents and private domain documents to obtain preprocessed texts; the preprocessing includes denoising, cleaning, format unification and text segmentation;
[0047] S2023: segment the preprocessed text to obtain text segments;
[0048] S2024: Generate text content according to the text fragment by using the trained mine safety model; wherein the text content includes text content structure and text content attributes;
[0049] S2025: Extract keywords and determine text types based on text content structure and text content attributes, and finally classify text fragments into safety knowledge base, risk level classification, risk measure formulation, accident hazard investigation and hazard disposal measures.
[0050] Preferably, in step S202, during retrieval, the cosine similarity between each vector in the description target of the intent category and each vector in the information source is calculated, and k vectors with the highest cosine similarity in the information source are selected as retrieval information for the intent category.
[0051] Preferably, in step S204, the question answer text output by the question-answering model includes any one or more of a risk identification list to be confirmed, a risk control list to be confirmed, a hidden danger investigation standard library, risk hidden danger handling measures, automatic classification of risk hidden dangers, and knowledge base question results.
[0052] Preferably, the hidden danger analysis module realizes any one or more functions of risk identification, risk management, hidden danger investigation, risk hidden danger handling, risk hidden danger classification and safety question response according to the question answer text.
[0053] Compared with the prior art, the AI-based intelligent mine risk management and control system in the present invention has the following beneficial effects:
[0054] The intelligent risk assessment and hidden danger detection system in the present invention predicts the intention of user questions through the intention recognition model constructed based on the BERT model and the LSTM model, and obtains multiple intention categories and description targets for each intention category. First, the BERT of the intention recognition model can capture the contextual information of the text, while LSTM is good at processing long-term dependencies in sequence data. Therefore, through the combined model of BERT and LSTM, it is possible to more accurately identify multiple types of intentions in the user question text, thereby improving the accuracy of risk assessment and hidden danger detection. Secondly, by identifying multiple intent categories, the system can handle a wider range of and more complex user problems, enhancing the versatility and practicality of the system, and each intent category is equipped with a description target, so that the system can give more specific and easier to understand feedback, enhancing the interpretability and user-friendliness of the system. Finally, by automatically identifying intent, the need for manual intervention is reduced, and the automation level of hidden danger detection and risk management is improved.
[0055] Based on the identification of multiple intent categories and the description targets of each intent category, the present invention retrieves corresponding information for each intent and inputs the user question text and all the retrieval information into the question-answering model constructed based on the multi-layer Transformer to obtain the question answer text. First, by retrieving the retrieval information related to the intent category, the question-answering model can generate answers based on broader and more comprehensive information, thereby improving the accuracy and richness of the answers, thereby further improving the accuracy of risk assessment and hidden danger detection. Secondly, the multi-layer Transformer structure enables the question-answering model to better capture the contextual information of the text, thereby generating answers that are more in line with the context, which is conducive to improving the accuracy of risk assessment and hidden danger detection. Finally, based on the automatic identification of intent, automated retrieval and question-answering are further realized. On the one hand, it can quickly respond to user questions and improve the response speed and efficiency of the system. On the other hand, the entire process does not need to rely on human work experience, and there is no interference from human subjective factors, thereby improving the objectivity of risk assessment and hidden danger detection.
[0056] The present invention generates corresponding hidden danger assessment results and hidden danger treatment measures according to the question answer text. First, the risk hidden danger assessment results can timely discover potential risks and provide early warning information for the safe production of coal mines. Secondly, the risk hidden danger treatment measures can provide a scientific basis for the decision-making level of the coal mine and guide the formulation of effective risk prevention and control strategies. Finally, by timely checking and handling hidden dangers, accidents can be reduced or avoided, ensuring the production safety of coal mines and the personal safety of employees. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0058] Figure 1 This is the network structure diagram of the multi-intent recognition module in the system;
[0059] Figure 2 This is the network structure diagram of the question-answering processing module in the system;
[0060] Figure 3 A schematic diagram of the information sources. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but only represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.
[0062] It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. In the description of the present invention, it should be noted that the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, or the orientation or position relationship in which the invention product is usually placed when used, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance. In addition, the terms "horizontal", "vertical", etc. do not mean that the components are required to be absolutely horizontal or suspended, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted. In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0063] The following is a further detailed description through specific implementation methods:
[0064] Example:
[0065] This embodiment discloses an AI-based intelligent management and control system for mine risk hazards.
[0066] The AI-based intelligent management and control system for mine risk hazards includes:
[0067] The question entry module is used to obtain user question text containing risk assessment and hidden danger troubleshooting intentions;
[0068] In this embodiment, the user question text is similar to "If the methane sensor is suspended vertically and is greater than 300 mm from the top plate, does it comply with regulations? If not, please provide a rectification plan."
[0069] Combination Figure 1As shown in the figure, the multi-intent recognition module is used to take the user question text as input, perform intent recognition through the intent recognition model built based on the BERT model and the LSTM model, and output the corresponding multiple intent categories and the description target of each intent category;
[0070] In this embodiment, taking "If the methane sensor is suspended vertically and is more than 300mm from the top plate, does it comply with the regulations? If not, please provide a rectification plan." as an example of the user question text, the intent categories output by the multi-intention recognition module include security knowledge base query and hidden danger handling measures, where the description target of the security knowledge base query is: 1) query target: methane sensor, 2) state: vertical suspension, 3) state data: more than 300mm from the top plate. The description target of the hidden danger handling measures is: 1) rectification target description: if the methane sensor is suspended vertically, 2) more than 300mm from the top plate.
[0071] Combination Figure 2 As shown in the figure, the question-answering processing module is used to retrieve according to the description target of each intent category, obtain the retrieval information corresponding to each intent category, and then input the user question text and the retrieval information of all intent categories into the question-answering model built based on the multi-layer Transformer, and output the corresponding question answer text;
[0072] In this embodiment, taking "If the methane sensor is suspended vertically and is more than 300mm from the top plate, does it comply with the regulations? If not, please provide a rectification plan." as an example of the user question text, the intent categories output by the multi-intention recognition module include security knowledge base query and hidden danger handling measures, where the description target of the security knowledge base query is: 1) query target: methane sensor, 2) state: vertical suspension, 3) state data: more than 300mm from the top plate. The description target of the hidden danger handling measures is: 1) rectification target description: if the methane sensor is suspended vertically, 2) more than 300mm from the top plate.
[0073] The answer text of the question output by the question and answer processing module is that the vertical suspension of the methane sensor complies with regulations, but the distance between the methane sensor and the top plate is more than 300mm, which is not in compliance with regulations. There are slight risks and hidden dangers. The distance between the methane sensor and the top plate needs to be corrected to within 250mm.
[0074] The hidden danger analysis module is used to implement risk assessment and hidden danger detection based on the text of the question answer.
[0075] In this embodiment, taking the user question text "If the methane sensor is hung vertically and is more than 300mm away from the top plate, does it comply with regulations? If not, please provide a rectification plan." as an example, the question answer text output by the question and answer processing module is that the vertical hanging of the methane sensor complies with regulations, but the distance between the methane sensor and the top plate is more than 300mm, which does not comply with regulations. There is a slight wind direction and hidden dangers, and the distance between the methane sensor and the top plate needs to be corrected to within 250mm.
[0076] The hidden danger analysis module evaluated that the methane sensor was suspended vertically and was more than 300mm away from the top plate, which was not in compliance with regulations. There were slight risks and hidden dangers, and the distance between the methane sensor and the top plate needed to be lowered to within 250mm.
[0077] The intelligent risk assessment and hidden danger detection system in the present invention predicts the intention of user questions through the intention recognition model constructed based on the BERT model and the LSTM model, and obtains multiple intention categories and description targets for each intention category. First, the BERT of the intention recognition model can capture the contextual information of the text, while LSTM is good at processing long-term dependencies in sequence data. Therefore, through the combined model of BERT and LSTM, it is possible to more accurately identify multiple types of intentions in the user question text, thereby improving the accuracy of risk assessment and hidden danger detection. Secondly, by identifying multiple intent categories, the system can handle a wider range of and more complex user problems, enhancing the versatility and practicality of the system, and each intent category is equipped with a description target, so that the system can give more specific and easier to understand feedback, enhancing the interpretability and user-friendliness of the system. Finally, by automatically identifying intent, the need for manual intervention is reduced, and the automation level of hidden danger detection and risk management is improved.
[0078] Based on the identification of multiple intent categories and the description targets of each intent category, the present invention retrieves corresponding information for each intent and inputs the user question text and all the retrieval information into the question-answering model constructed based on the multi-layer Transformer to obtain the question answer text. First, by retrieving the retrieval information related to the intent category, the question-answering model can generate answers based on broader and more comprehensive information, thereby improving the accuracy and richness of the answers, thereby further improving the accuracy of risk assessment and hidden danger detection. Secondly, the multi-layer Transformer structure enables the question-answering model to better capture the contextual information of the text, thereby generating answers that are more in line with the context, which is conducive to improving the accuracy of risk assessment and hidden danger detection. Finally, based on the automatic identification of intent, automated retrieval and question-answering are further realized. On the one hand, it can quickly respond to user questions and improve the response speed and efficiency of the system. On the other hand, the entire process does not need to rely on human work experience, and there is no interference from human subjective factors, thereby improving the objectivity of risk assessment and hidden danger detection.
[0079] The present invention generates corresponding hidden danger assessment results and hidden danger treatment measures according to the question answer text. First, the risk hidden danger assessment results can timely discover potential risks and provide early warning information for the safe production of coal mines. Secondly, the risk hidden danger treatment measures can provide a scientific basis for the decision-making level of the coal mine and guide the formulation of effective risk prevention and control strategies. Finally, by timely checking and handling hidden dangers, accidents can be reduced or avoided, ensuring the production safety of coal mines and the personal safety of employees.
[0080] In the specific implementation process, the processing steps of the intent recognition model are as follows:
[0081] S101: Input the user question text into the encoder of the BERT model to generate the corresponding hidden vector;
[0082] The formula is:
[0083] c i =BERT-Encoder(ω 0:n ,i);
[0084] Where: c i represents the hidden vector; ω 0:n Represents user input (it can be the input user question text or the input instruction), 1≤i≤n;
[0085] In this embodiment, the BERT (Bidirectional Encoder Representations from Transformers) model is a pre-trained language representation model based on the Transformer architecture, which was proposed by Google AI in 2018. The core feature of BERT is to use a bidirectional Transformer encoder to learn deep semantic representations of text data.
[0086] The BERT model includes:
[0087] Input layer: The input user question text is converted into a format that the BERT model can process, including embedding layers (word embeddings) and positional encoding.
[0088] Transformer encoder: The BERT model uses a multi-layer Transformer encoder to process input data. Each Transformer encoder contains a self-attention mechanism and a feed-forward neural network.
[0089] Self-attention mechanism: This is the core of the Transformer and allows the model to capture contextual information by taking into account all other words in the sentence when processing each word.
[0090] Feedforward Neural Network: After each self-attention layer, BERT uses a feedforward neural network to further process the representation of each position.
[0091] Output layer: After pre-training, the BERT model can be used for various downstream tasks, such as text classification, question answering, named entity recognition, etc. Usually, one or more task-specific layers are added on top of the BERT model for fine-tuning.
[0092] S102: Input the hidden vector into the feed-forward neural network and obtain the probability distribution of the intent category through the Sigmoid function;
[0093] The formula is:
[0094] p = Sigmoid(MLP(c i ));
[0095] Where: p represents the probability distribution of intent category, which is a 1*n-dimensional vector, and each dimension represents the probability of identifying an intent category; MLP is a fully connected neural network;
[0096] S103: Connect the intent category probability distribution with the hidden vector to obtain a fused probability distribution;
[0097] The formula is:
[0098]
[0099] Where: h i represents the fusion probability distribution;
[0100] S104: Input the fused probability distribution into the LSTM model to generate the corresponding slot filling probability distribution, and output the intent category of each word in the user question text (the unique hot encoding of each token) through the Sigmoid function, that is, the description target;
[0101] The formula is:
[0102] r i =Sigmoid(LSTM(h i ));
[0103] Where: r i Represents the intent category of the i-th word in the user's question text, that is, the i-th description target.
[0104] In this embodiment, the LSTM (Long Short-Term Memory) model is a special recurrent neural network (RNN) architecture that is specifically designed to solve the gradient vanishing and gradient exploding problems encountered by traditional RNNs when processing long sequence data. LSTM maintains long-term dependencies by introducing a series of structures called "gates", allowing the network to effectively learn and memorize information in long sequences.
[0105] The LSTM model consists of:
[0106] The cell state is the core of LSTM, which runs through the entire sequence and carries long-term information. The cell state can be regarded as a "memory" unit that can store or forget information.
[0107] The Forget Gate determines which information should be forgotten or retained from the cell state. It uses a Sigmoid function to output a value between 0 and 1, where 0 means completely forgotten and 1 means completely retained.
[0108] The Input Gate determines what new information will be stored in the cell state. It consists of two parts: a sigmoid layer that determines which values we will update, and a tanh layer that creates a new vector of candidate values that will be added to the state.
[0109] The output gate determines the final output based on the updated cell state. It uses the Sigmoid function to determine which parts of the cell state will be output, then passes the cell state through the tanh function (to get a value between -1 and 1), and multiplies it with the output of the Sigmoid gate to determine the final output.
[0110] The present invention predicts intent through an intent recognition model built based on a BERT model and a LSTM model. First, the BERT of the intent recognition model can capture the contextual information of the text, while the LSTM is good at processing long-term dependencies in sequence data. Therefore, through the combined model of BERT and LSTM, it is possible to more accurately identify various types of intent in the user question text, thereby improving the accuracy of subsequent risk hidden danger prediction. Secondly, by identifying multiple intent categories, the system can handle a wider range of and more complex user problems, enhancing the versatility and practicality of the system, and each intent category is equipped with a descriptive target, so that the system can give more specific and easier to understand feedback, enhancing the interpretability and user-friendliness of the system. Finally, by automatically identifying intent, the need for manual intervention is reduced, and the level of automation of hidden danger detection and risk management is improved.
[0111] In the specific implementation process, the loss function when training the intent recognition model is as follows:
[0112]
[0113] in
[0114] Where: p i 、r i Represents the probability distribution of intent categories predicted by the intent recognition model and describes the target; Represents the probability distribution of intent categories and the true label describing the target (i.e., slot filling); i For r i or p i ; for or
[0115] In this embodiment, the multiple intentions input by the user are represented as a 1*N dimensional vector. For example, a 1*5 vector can be used to represent that the user wants to use one or more functions of the safety knowledge base, risk level classification, risk measure formulation, accident hazard investigation, and hazard treatment measures. For example, [1,0,0,0] is a function that requires the use of the safety knowledge base. Slot filling refers to the probability of predicting that each word in the user input sentence is a certain intention, which can be considered as a probability distribution of intent recognition, but this probability distribution describes the intent category of a certain word under a certain intention.
[0116] During the specific implementation, the processing steps of the question and answer processing module are as follows:
[0117] S201: taking multiple intent categories and description targets of each intent category as input;
[0118] S202: Determine the information source of the retrieved information based on the intent category;
[0119] S203: searching in the corresponding information source based on the description target of each intent category to obtain the search information corresponding to each intent category; when searching, calculating the cosine similarity between each vector in the description target of the intent category and each vector in the information source, and selecting the k vectors with the highest cosine similarity in the information source as the search information of the intent category;
[0120] The calculation formula of cosine similarity is expressed as:
[0121]
[0122] In the formula: A and B are two different vectors; ||A|| and ||B|| represent the magnitudes of vector A and vector B respectively.
[0123] The present invention uses cosine similarity to realize information retrieval. Cosine similarity is an efficient similarity calculation method, especially when processing high-dimensional data or text data, it can evaluate their similarity by calculating the cosine value of the angle between two vectors without considering the absolute length of the vector, which makes the calculation process faster. Secondly, cosine similarity can be applied to various types of information retrieval scenarios, including text retrieval or image retrieval, in which cosine similarity can effectively measure the similarity between the query and the document or image. Finally, the calculation formula of cosine similarity is simple and clear, easy to understand and implement, it only needs to calculate the sum of the products of the corresponding elements of the two vectors, and then divide it by the product of the module lengths of the two vectors, so that the information retrieval system based on cosine similarity can be quickly developed and deployed.
[0124] S204: Input the user question text and the retrieved information into a question-answering model built based on a multi-layer Transformer, and output the corresponding question answer text.
[0125] In this embodiment, the question answer text output by the question-answering model includes any one or more of a risk identification list to be confirmed, a risk control list to be confirmed, a hidden danger investigation standard library, risk hidden danger handling measures, automatic classification of risk hidden dangers, and knowledge base question results.
[0126] The hidden danger analysis module realizes any one or more functions of risk identification, risk management, hidden danger investigation, risk hidden danger handling, risk hidden danger classification and safety question response according to the text of the answer to the question.
[0127] In the specific implementation process, the intent categories include safety knowledge base, risk level classification, risk measure formulation, accident hazard investigation and hazard disposal measures. Figure 3 As shown, the information sources for retrieving information include six information sources corresponding to the safety knowledge base, risk level classification, risk measure formulation, accident hazard investigation and hazard disposal measures.
[0128] In this embodiment, if a network search engine is used for retrieval, the search engine's API interface is first called to select the first X (adjustable) links, and the text of the links is divided into N (unknown) text blocks and vectorized, and finally k text blocks are selected as retrieval information. In the specific operation, the cosine similarity algorithm can be used to select k text blocks with the highest correlation as retrieval information.
[0129] Specifically, the information source is constructed through the following steps:
[0130] S2021: Obtain public and private documents related to coal mine production business scenarios;
[0131] In this embodiment, the documents are divided into public documents and private domain documents according to their disclosure. Public documents mainly include mandatory and recommended standards related to safety from the state, industry, ministries and commissions, and the Safety Supervision Bureau. Private domain documents mainly include the safety management system, records and experience of coal mine enterprises. The document materials are used for learning and enhancing the mine safety model base.
[0132] This system supports a variety of different types of documents (pictures, PDF, Excel, Word) as input. For pictures, you must first use OCR technology to convert the pictures into text, and then use word segmentation tools and cleaning tools to perform basic processing on the text to generate standardized text. The text can also be segmented to prevent information loss or confusion and improve reasoning efficiency.
[0133] S2022: Preprocess the public documents and private domain documents to obtain preprocessed texts; the preprocessing includes denoising, cleaning, format unification and text segmentation;
[0134] In this embodiment, irrelevant information in the document, such as advertisements, watermarks, headers and footers, etc., is removed; the document is converted into a unified format, such as PDF to text or XML, etc., for subsequent processing; and the text is segmented to facilitate subsequent keyword extraction and text classification.
[0135] S2023: Segment the preprocessed text to obtain text segments (words or vocabulary units);
[0136] S2024: Generate text content based on text fragments through the trained mine safety big model; the text content includes text content structure and text content attributes; the text content structure is mainly distinguished from the four dimensions of personnel, equipment or devices, environment and management, which is used to describe the location, equipment, people and behaviors, the consequences, whether there are dangers and other related situations. The text content attributes mainly include hidden danger investigation and determination, risk level assessment, hidden danger treatment measures, hidden danger system planning, hidden danger investigation methods, hidden danger investigation of each production subsystem, safe production training, worker operating procedures, safe production standardization and other content attributes.
[0137] In this embodiment, the mine safety model can be selected from existing mature models. The mine safety model can be constructed and trained in the following manner:
[0138] 1) Data collection and preprocessing: Collect data related to mine safety, including public documents, private documents, mine structure, staff, equipment status, production conditions, environmental parameters, etc. Clean and preprocess the data to ensure its accuracy and completeness. This may include removing duplicate data, processing missing values, outliers, etc. Perform feature engineering on the data as needed to extract meaningful features to better describe the mine safety status.
[0139] 2) Establish model structure: Select the appropriate model structure according to the problem requirements and data characteristics. The mine safety model can be a deep learning model, such as a neural network or a recurrent neural network. First, determine the input and output of the model. The input is the preprocessed mine safety related data, and the output is the prediction or classification result of the mine safety status; then design the hierarchical structure of the model, including the number of hidden layers, the number of neurons in each layer, etc. The selection of these parameters will affect the performance and generalization ability of the model.
[0140] 3) Model training and optimization: Divide the preprocessed data into training set, validation set and test set. The training set is used to train the model, the validation set is used to adjust the model parameters and hyperparameters, and the test set is used to evaluate the performance of the model. First, select a suitable loss function and optimizer. The loss function is used to measure the gap between the model's predicted results and the actual results, and the optimizer is used to adjust the model parameters to minimize the loss function; then use the training set to train the model, and update the model parameters through the back propagation algorithm. During the training process, the validation set can be used for model verification and early stopping to prevent overfitting; then adjust the model parameters and hyperparameters according to the performance of the validation set, such as learning rate, batch size, regularization term, etc. The selection of these parameters will affect the training speed and performance of the model. Finally, use the test set to evaluate the performance of the model (evaluation indicators include accuracy, recall rate, F1 score, etc.), and further adjust and optimize the model according to the evaluation results.
[0141] S2025: Extract keywords and determine text types based on text content structure and text content attributes, and finally classify text fragments into safety knowledge base, risk level classification, risk measures formulation, accident hazard investigation and hazard disposal measures. It is necessary to vectorize the text fragments, and design a database structure or database for storing and managing data for the safety knowledge base, risk level classification, risk measures formulation, accident hazard investigation and hazard disposal measures, and construct the corresponding data structure.
[0142] In this embodiment, keyword extraction refers to the use of natural language processing technology (NLP) to extract keywords related to safe production from documents; keyword classification refers to matching the extracted keywords with predefined categories (such as security knowledge base, risk level classification, etc.) to preliminarily determine the category to which the document belongs.
[0143] In the specific implementation, the question-answering model is built based on the RAG (Retrieval-Augmented Generation) architecture, which combines the natural language processing model architecture of two key NLP (natural language processing) tasks: retrieval and generation. RAG aims to improve the performance of the model by combining relevant information retrieved from large text data and generation modules to generate output text, especially in tasks involving specific domain knowledge or requiring reference to external information.
[0144] In the RAG architecture, the question-answering model usually includes the following main steps:
[0145] Indexing: Split documents into smaller parts (often called "chunks") and encode these chunks into vectors, which are then stored in a vector database. This step allows the model to quickly retrieve the parts of the document that are relevant to the query.
[0146] Retrieval: Based on the query entered by the user, the model uses some similarity measure (such as cosine similarity) to retrieve the top k chunks that are most relevant to the query. These chunks contain the information needed to answer the query.
[0147] Generation: The original query and the retrieved chunks are fed into a large language model (LLM) to generate the final answer. This step leverages the text generation capabilities of the LLM to generate a natural and fluent answer based on the retrieved relevant information.
[0148] The application of RAG architecture in question-answering systems has many advantages. First, by combining the two tasks of retrieval and generation, RAG can better utilize the information in external knowledge bases and corpora to answer complex questions. Secondly, the RAG architecture has high flexibility and scalability and can adapt to different fields and types of questions. Finally, because RAG combines the latest NLP technologies such as Transformer and BERT, it can generate more accurate and natural answers.
[0149] Specifically, the processing steps of the question-answering model in the present invention are as follows:
[0150] S2041: Encode the user question text and the retrieved information through an embedding layer to obtain an embedded representation of the user question text and the retrieved information, so as to convert the user question text and the retrieved information into a form understandable to the question-answering model;
[0151] In this embodiment, the question-answering model may also perform additional processing on the retrieval information, such as enhancing the retrieval information through an attention mechanism to highlight the part of the retrieval information that is most relevant to the user's question.
[0152] S2042: Input the embedding representation of the user question text and the retrieval information into a stacked multi-layer Transformer, and output the embedding representation of the answer; the Transformer model uses a self-attention mechanism to capture the dependencies between different positions in the user question text and the retrieval information, and implements global context modeling, which means that the model can consider all information in the question and the retrieval information at the same time to more accurately understand the intent and context of the question. The embedding representation of the generated answer can be directly generated text (in a generative question-answering system) or a fragment selected from the retrieval information (in an extractive question-answering system). For a generative question-answering system, the model outputs a probability distribution indicating the likelihood of each word or character being part of the answer, and can then select the sequence with the highest probability as the answer. For an extractive question-answering system, the model evaluates the relevance of each fragment in the retrieval information to the question and selects the most relevant fragment as the answer.
[0153] In this embodiment, in each layer of the Transformer, a self-attention mechanism is used to process the input, so that the model can consider the relationship between each position in the input sequence and all other positions, and update the representation of each position based on these relationships, which helps the model capture the key information in the question and retrieval information and their relationship with each other. In addition to the self-attention mechanism, each layer of the Transformer also contains a feedforward neural network for further processing the input data. In order to ensure that the model can be trained deeper without the problem of gradient disappearance or explosion, the Transformer uses residual connections and layer normalization techniques. By stacking multiple layers of Transformers, the present invention allows the model to learn more complex feature representations and improve the accuracy of question answering.
[0154] S2043: Decode the embedded representation of the answer to generate the question answer text.
[0155] In this embodiment, when generating the answer text, the question-answering model may adopt some strategies to ensure that the generated text is relevant to the question, fluent and meaningful. For example, greedy search, beam search and other algorithms may be used to generate candidate answers, and some scoring functions (such as language model scores, BLEU scores, etc.) may be used to evaluate the quality of these candidate answers and select the best answer as output.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.
Claims
1. The AI-based intelligent management and control system for mine risk hazards is characterized by: include: The question entry module is used to obtain user question text containing risk assessment and hidden danger troubleshooting intentions; The multi-intent recognition module is used to take the user question text as input, perform intent recognition through the intent recognition model built based on the BERT model and the LSTM model, and output the corresponding multiple intent categories and the description target of each intent category; The question-answering processing module is used to retrieve the description target of each intent category, obtain the retrieval information corresponding to each intent category, and then input the user question text and the retrieval information of all intent categories into the question-answering model, and output the corresponding question answer text; The hidden danger analysis module is used to implement risk assessment and hidden danger detection based on the text of the question answer.
2. The AI-based intelligent management and control system for mine risk hazards according to claim 1, characterized in that: The processing steps of the intent recognition model are as follows: S101: Input the user question text into the encoder of the BERT model to generate the corresponding hidden vector; The formula is: c i =BERT encoder(ω 0:n ,i); Where: c i represents the hidden vector; ω 0:n Represents the user question text, 1≤i≤n; S102: Input the hidden vector into the forward neural network and obtain the probability distribution of the intent category through the Sigmoid function; The formula is: p=Sigmoid(MLP(c i )); Where: p represents the probability distribution of intent category, which is a 1*n-dimensional vector, and each dimension represents the probability of identifying an intent category; MLP is a fully connected neural network; S103: Connect the intent category probability distribution with the hidden vector to obtain a fused probability distribution; The formula is: Where: h i represents the fusion probability distribution; S104: Input the fused probability distribution into the LSTM model to generate the corresponding slot filling probability distribution, and output the intent category of each word in the user question text through the Sigmoid function, that is, the description target; The formula is: r i =Sigmoid(LSTM(h i )); Where: r i Represents the intent category of the i-th word in the user's question text, that is, the i-th description target.
3. The AI-based intelligent management and control system for mine risk hazards according to claim 2 is characterized in that: The loss function when training the intent recognition model is as follows: in Where: p i 、r i Represents the probability distribution of intent categories predicted by the intent recognition model and describes the target; Represents the probability distribution of intent categories and the true label describing the target; y i For r i or p i ; for or 4. The AI-based intelligent management and control system for mine risk hazards according to claim 1, characterized in that: The processing steps of the question-answer processing module are as follows: S201: taking multiple intent categories and description targets of each intent category as input; S202: Determine the information source of the retrieved information based on the intent category; S203: searching in corresponding information sources based on the description target of each intent category to obtain search information corresponding to each intent category; S204: Input the user question text and the retrieved information into the question-answering model, and output the corresponding question answer text.
5. The AI-based intelligent management and control system for mine risk hazards according to claim 4 is characterized in that: In step S204, the processing steps of the question-answering model are as follows: S2041: Encode the user question text and the retrieved information through the embedding layer to obtain an embedded representation of the user question text and the retrieved information, so as to convert the user question text and the retrieved information into a form understandable to the question-answering model; S2042: Input the embedding representation of the user question text and the retrieval information into the stacked multi-layer Transformer, and output the embedding representation of the answer; S2043: Decode the embedded representation of the answer to generate the question answer text.
6. The AI-based intelligent management and control system for mine risk hazards according to claim 4 is characterized in that: In step S202, the intent categories include safety knowledge base, risk level classification, risk measure formulation, accident hazard investigation and hazard disposal measures; The information sources for retrieving information include six information sources corresponding to the safety knowledge base, risk level classification, risk measure formulation, accident hazard investigation and hazard disposal measures.
7. The AI-based intelligent management and control system for mine risk hazards according to claim 5, characterized in that: In step S202, the information source is constructed through the following steps: S2021: Obtain public and private documents related to coal mine production business scenarios; S2022: preprocessing the public document and the private domain document to obtain preprocessed text; Preprocessing includes denoising, cleaning, format unification and text segmentation; S2023: segment the preprocessed text to obtain text segments; S2024: Generate text content according to the text fragment by using the trained mine safety model; wherein the text content includes text content structure and text content attributes; S2025: Extract keywords and determine text types based on text content structure and text content attributes, and finally classify text fragments into safety knowledge base, risk level classification, risk measure formulation, accident hazard investigation and hazard disposal measures.
8. The AI-based intelligent management and control system for mine risk hazards according to claim 4, characterized in that: In step S202, during retrieval, the cosine similarity between each vector in the description target of the intent category and each vector in the information source is calculated, and k vectors with the highest cosine similarity in the information source are selected as the retrieval information of the intent category.
9. The AI-based intelligent management and control system for mine risk hazards according to claim 1, characterized in that: In step S204, the question answer text output by the question-answering model includes any one or more of a risk identification list to be confirmed, a risk control list to be confirmed, a hidden danger investigation standard library, risk hidden danger handling measures, automatic classification of risk hidden dangers, and knowledge base question results.
10. The AI-based intelligent management and control system for mine risk hazards according to claim 9, characterized in that: The hidden danger analysis module realizes any one or more functions of risk identification, risk management, hidden danger investigation, risk hidden danger handling, risk hidden danger classification and safety question response according to the text of the answer to the question.
Citation Information
Patent Citations
Display apparatus and semantic understanding method
CN115146652A
Text data processing method and device
CN115238027A
Method for combining multi-intention detection and overlapped groove filling based on information extraction
CN115292463A
Semantic understanding method and system based on text information of dialogue system in financial field
CN117453865A
Intelligent question answering method and system based on domain knowledge graph
CN117648984A
Cited By
Knowledge base document intention recognition method based on layout recognition
CN121072695A
