An industrial safety operation and maintenance large model-oriented question and answer method and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]面向以上专用需求,已有通用分词方法在面临专业术语及上下文依赖较强的设备参数时,常出现切分不准确导致语义信息丢失等问题,进而影响知识库构建与大模型理解,本发明提出了一种面向工业安全运维大模型的问答方法及系统,提供面向工业安全运维大模型的知识库构建方法,能够有效提升知识库构建质量,确保检索增强问答系统为大模型检索并提供更精准、更相关的专业知识片段,从而显著增强大模型回答的专业性、准确性与场景贴合度,最终全面提升工业安全运维的可靠性与实用性
[0025] The advantages of this invention are as follows: By integrating multiple basic models through the solution provided by this invention, and assigning weights to each model and performing character-level label fusion using a genetic algorithm and similarity reliability distribution fusion method, the advantages of different models are fully utilized, significantly improving word segmentation accuracy and robustness, thereby constructing a professional domain knowledge base. This provides a high-quality data foundation for subsequent text segmentation and vectorized retrieval, ensuring that the retrieval enhancement generation system can recall more relevant and accurate knowledge fragments, thus enhancing the professionalism, accuracy, and scenario relevance of the large model's answers. Based on the constructed knowledge base, the large model can integrate safety regulations, historical records, and other knowledge from the enterprise's production process in real time, automatically analyzing industrial safety operation and maintenance issues raised by operation and maintenance personnel, and objectively providing accurate, reliable, and practical industrial safety operation and maintenance precautions and solutions. The entire analysis process requires no manual intervention, significantly improving the efficiency of safety production analysis, reducing reliance on professional personnel, and significantly saving labor costs. It has outstanding practical significance and promotional value in the field of industrial safety operation and maintenance.
Smart Images

Figure CN122549601A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing technology in artificial intelligence, and in particular relates to a question-answering method and system for a large-scale industrial safety operation and maintenance model. Background Technology
[0002] For critical equipment in industries such as marine propulsion systems, chemical production equipment, and pressure vessels, on-the-go maintenance can effectively improve their efficiency and reduce downtime. Due to the high degree of customization of the equipment and the uniqueness of the operating environment, maintenance solutions and processes are highly specialized, requiring maintenance personnel to undergo extensive and lengthy training to even begin to meet the basic maintenance requirements.
[0003] Therefore, it is necessary to design a comprehensive operation and maintenance model for different devices. Relevant personnel can proactively learn operation and maintenance knowledge through this model before, during, and after maintenance operations, which is beneficial for systematically and rapidly improving their specialized capabilities. However, the operation and maintenance of specific devices involves a large amount of specialized terminology, and the types of questions asked by relevant personnel are diverse. Relying solely on the pre-trained knowledge of the comprehensive model to answer these questions often results in insufficient professionalism and a disconnect from specific scenarios. Building a dedicated retrieval-enhanced question-answering system can retrieve relevant operation and maintenance procedures, cases, and data from a structured knowledge base, enhancing the contextual understanding and generation basis of the comprehensive model. This provides more accurate, reliable, and practical professional answers, which can, to a certain extent, help various industries improve the capabilities of their operation and maintenance personnel and increase operational efficiency. Summary of the Invention
[0004] To address the specific needs mentioned above, existing general word segmentation methods often suffer from inaccurate segmentation and loss of semantic information when dealing with technical terms and context-dependent equipment parameters. This, in turn, affects knowledge base construction and large-scale model understanding. This invention proposes a question-answering method and system for large-scale industrial safety operation and maintenance models. It provides a knowledge base construction method for large-scale industrial safety operation and maintenance models, which can effectively improve the quality of knowledge base construction. This ensures that the retrieval-enhanced question-answering system provides more accurate and relevant professional knowledge fragments for large-scale model retrieval, thereby significantly enhancing the professionalism, accuracy, and scenario relevance of the large-scale model's answers, and ultimately comprehensively improving the reliability and practicality of industrial safety operation and maintenance.
[0005] According to a first aspect of the present invention, a question-answering method for a large-scale industrial safety operation and maintenance model is provided, the method comprising:
[0006] S1. Collect and preprocess industrial safety operation and maintenance text data.
[0007] S2. Construct a label recognition framework BMES, use a sliding window strategy to segment the preprocessed text data and input them into four word segmentation models respectively, and obtain the similarity confidence distribution of each character in each segmented text data with respect to the BMES label.
[0008] S3. Construct a similarity reliability distribution fusion model, fuse the four similarity reliability distributions in S2, obtain the fused word segmentation results, vectorize the word segmentation results, and construct an industrial safety operation and maintenance knowledge base.
[0009] S4. Input the industrial safety operation and maintenance questions raised by users into the retrieval enhancement module, recall texts similar to the questions in the industrial safety operation and maintenance knowledge base, and use a large language model to comprehensively analyze, reason and integrate the recalled texts and industrial safety operation and maintenance questions to deduce industrial safety operation and maintenance precautions and operation and maintenance solutions.
[0010] Specifically, S1 includes the following steps:
[0011] Collect and filter national standards related to industrial safety operation and maintenance, as well as historical records, technical documents, and enterprise standards and procedures related to enterprise safety operation and maintenance, and then clean the text data.
[0012] Specifically, S2 includes the following steps:
[0013] S21, the BMES label recognition framework , among which, tags A tag represents the first character of a word. This represents the middle character of a word. If there are multiple middle characters, then there are multiple [characters / characters]. Each character has a corresponding ,Label A tag represents the last word of a word. Represents single-character words. , , and These represent characters in the text data that belong to the tags. , , and Similarity reliability, similarity reliability , , and The emission score, obtained by adding the emission score and the attention weight, represents the normalized probability value of the BMES label output by the word segmentation model for each character in the input sentence. The attention weight is generated by linearly projecting the character-level context features using a multi-head attention mechanism layer, producing a query matrix, a key matrix, and a value matrix. The attention distribution is obtained by calculating the scaled dot product similarity between the query matrix and the key matrix, normalizing it using the Softmax function, and then outputting it after multi-head parallel computation, concatenation, and linear mapping fusion. The character-level context features are obtained by adding the text vector obtained from text vectorization to the position vector obtained from position encoding.
[0014] S22. The four word segmentation models are as follows: the first is composed of BERT (Transformer-based bidirectional encoding representation), BiLSTM (Bidirectional Long Short-Term Memory Network), Attention (Multi-head Attention Mechanism), and CRF (Conditional Random Field) connected in series; the second is composed of BERT (Transformer-based bidirectional encoding representation), BiGRU (Bidirectional Gated Recurrent Unit), Attention (Multi-head Attention Mechanism), and CRF (Conditional Random Field) connected in series; the third is composed of ALBERT (Lightweight Transformer-based bidirectional encoding representation), BiLSTM (Bidirectional Long Short-Term Memory Network), Attention (Multi-head Attention Mechanism), and CRF (Conditional Random Field) connected in series; and the fourth is composed of ALBERT (Lightweight Transformer-based bidirectional encoding representation), BiGRU (Bidirectional Gated Recurrent Unit), Attention (Multi-head Attention Mechanism), and CRF (Conditional Random Field) connected in series.
[0015] S23. Perform initial segmentation of the industrial safety operation and maintenance text data described in S1 by line. Perform secondary segmentation of each line of text after the initial segmentation based on punctuation marks. Set the block length and block overlap to segment the text after secondary segmentation. Input each segmented text data H into four word segmentation models for word segmentation processing. Obtain the similarity reliability distribution of the BMES tags corresponding to each character in each segmented text data H for each word segmentation model.
[0016] Specifically, S3 includes the following steps:
[0017] S31. Obtain the weights of each word segmentation model using a genetic algorithm. Calculate the overall reliability of each word segmentation model with respect to its respective word segmentation results. ,in Representing the One model, It consists of three parts: vocabulary matching degree, the average emission score of each character in a sentence, and the average attention weight of each character in the segmented text data H. The vocabulary matching degree is calculated by dividing the number of times the word predicted by the word segmentation model appears in the vocabulary by the total number of predicted words.
[0018] Obtain the similarity reliability distribution of each word segmentation model in S2 for each character in the text data corresponding to BMES tags. Then, perform tag-level fusion of the word segmentation results of the four models by fusing the similarity reliability distributions. The calculation process of similarity reliability distribution fusion is described as follows: First, obtain... The word segmentation results of each word segmentation model, and the overall reliability of the segmented text data H obtained based on the respective word segmentation results. And the similarity reliability distribution of the four word segmentation models with respect to BMES tags at the same position in the word segmentation results. Then, weights are assigned to each word segmentation result based on a genetic algorithm. After weighting, the similarity reliability distribution after discounting is obtained: Finally, the overall reliability of the first and second word segmentation models is fused using a similarity reliability distribution fusion expression. Calculate each position The fusion reliability of each label , This indicates the position of the first word segmentation model. The corresponding similarity reliability; This indicates the position of the second word segmentation model. The corresponding similarity reliability; in position Four fusion confidence scores were obtained respectively. , , , Based on the principle of maximizing reliability, the maximum fusion reliability is obtained, and the label corresponding to the fusion reliability is used as the final label for fusion with the similarity reliability distribution of the third word segmentation model. This process is repeated until all four word segmentation models are fused to obtain the word segmentation result after reliability fusion.
[0019] S32. Using an embedding model, the word segmentation results obtained in S31 after confidence fusion are converted into vectors and normalized. Then, based on Euclidean distance search, a bidirectional mapping relationship is established between each text data H and its corresponding vector features to obtain the industrial safety operation and maintenance knowledge base.
[0020] A second aspect of the present invention provides a question-and-answer system for a large-scale industrial safety operation and maintenance model, the system comprising a text data module, a similarity reliability module, an industrial safety operation and maintenance knowledge base module, and a safety operation and maintenance question and answer output module.
[0021] The text data module is used to collect and preprocess text data related to industrial safety operations and maintenance.
[0022] The similarity reliability module is used to construct the label recognition framework BMES. It uses a sliding window strategy to segment the preprocessed text data and input them into four word segmentation models to obtain the similarity reliability distribution of each character in each segmented text data with respect to the BMES label.
[0023] The Industrial Safety Operation and Maintenance Knowledge Base module is used to construct a similarity reliability distribution fusion model, fuse the similarity reliability distribution, obtain the fused word segmentation results, vectorize the word segmentation results, and construct the Industrial Safety Operation and Maintenance Knowledge Base.
[0024] The security operation and maintenance question and answer output module is used to input the industrial security operation and maintenance questions raised by users into the retrieval enhancement module, recall texts similar to the questions in the industrial security operation and maintenance knowledge base, and use a large language model to comprehensively analyze, reason and integrate the recalled texts and industrial security operation and maintenance questions to deduce industrial security operation and maintenance precautions and operation and maintenance solutions.
[0025] The advantages of this invention are as follows: By integrating multiple basic models through the solution provided by this invention, and assigning weights to each model and performing character-level label fusion using a genetic algorithm and similarity reliability distribution fusion method, the advantages of different models are fully utilized, significantly improving word segmentation accuracy and robustness, thereby constructing a professional domain knowledge base. This provides a high-quality data foundation for subsequent text segmentation and vectorized retrieval, ensuring that the retrieval enhancement generation system can recall more relevant and accurate knowledge fragments, thus enhancing the professionalism, accuracy, and scenario relevance of the large model's answers. Based on the constructed knowledge base, the large model can integrate safety regulations, historical records, and other knowledge from the enterprise's production process in real time, automatically analyzing industrial safety operation and maintenance issues raised by operation and maintenance personnel, and objectively providing accurate, reliable, and practical industrial safety operation and maintenance precautions and solutions. The entire analysis process requires no manual intervention, significantly improving the efficiency of safety production analysis, reducing reliance on professional personnel, and significantly saving labor costs. It has outstanding practical significance and promotional value in the field of industrial safety operation and maintenance. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings.
[0027] Figure 1 This is a flowchart illustrating the method of the present invention;
[0028] Figure 2 This is a block diagram illustrating the system principle of this invention;
[0029] Figure 3 This is a flowchart of the similarity reliability module of the present invention;
[0030] Figure 4 This is a flowchart of the industrial safety operation and maintenance knowledge base module of this invention;
[0031] Figure 5 This is a flowchart of the security operation and maintenance question and answer output module of the present invention. Detailed Implementation
[0032] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0033] Please see Figure 1 This is a flowchart of the question-and-answer method for a large-scale industrial safety operation and maintenance model provided by the present invention, which includes the following steps:
[0034] Step S1: Data collection and processing: Collect the industrial safety operation and maintenance text data to be processed, and perform preprocessing such as noise reduction, cleaning and standardization on the data.
[0035] Step S2, Similarity Reliability Acquisition: Construct the sequence label-based label recognition framework BMES, use the sliding window strategy to segment the text data in S1 and input them into four word segmentation models in parallel, and obtain the similarity reliability distribution of each character in each segmented text data with respect to the BMES label.
[0036] Step S3, Knowledge Base Construction: Construct a similarity reliability distribution fusion model, weightedly fuse the four similarity reliability distributions from S2, obtain the word segmentation result with the highest reliability after fusion, convert the segmentation result into vector features, and thus construct an industrial safety operation and maintenance knowledge base.
[0037] Step S4, Question-Answering Reasoning: Input the industrial safety operation and maintenance questions raised by users into the retrieval enhancement module. Recall texts similar to the questions in the industrial safety operation and maintenance knowledge base through cosine similarity matching. Use a large language model to comprehensively analyze, reason and integrate the recalled texts and industrial safety operation and maintenance questions to deduce industrial safety operation and maintenance precautions and operation and maintenance solutions.
[0038] S1 further includes the following steps:
[0039] S11. Collect and filter national standards related to industrial safety operation and maintenance, as well as historical records, technical documents, and enterprise standards and procedures related to enterprise safety operation and maintenance, and other industrial safety operation and maintenance text data.
[0040] S12. Perform noise reduction operations on the text data, such as removing HTML tags, extra spaces, headers and footers; cleaning operations such as semantic deduplication and desensitization; and formatting operations such as aligning entity names and terms.
[0041] S2 further includes the following steps:
[0042] S21, the BMES label recognition framework , among which, tags A tag represents the first word of a word. The middle character representing a word, a label The final character of a word; if there are multiple characters in the middle, then multiple meanings exist. Each character has a corresponding ,Label The single characters representing words formed by individual characters (e.g., "deeply cultivating industrial safety operation and maintenance, building a solid defense line to safeguard efficient production," after word segmentation:
deeply cultivating
industrial safety operation and maintenance
,
building a solid defense line to safeguard
efficient production
industrial safety operation and maintenance
[0043] S22. The four word segmentation models mentioned include BERT (Transformer-based bidirectional encoding representation), ALBERT (lightweight Transformer-based bidirectional encoding representation), BiLSTM (Bidirectional Long Short-Term Memory network), BiGRU (Bidirectional Gated Recurrent Unit), Attention (multi-head attention mechanism), and CRF (Conditional Random Field). These six basic models are constructed through different combinations. The first basic model is BERT: it converts the input text into a context embedding vector. The second basic model is ALBERT: it is a lightweight improvement on BERT, significantly reducing model size and computational cost through parameter sharing and factorization techniques, while maintaining... The system boasts powerful contextual semantic representation capabilities; the third foundational model, BiLSTM, captures bidirectional long-distance semantic dependencies in sentences, outputting a hidden state sequence containing contextual information; the fourth foundational model is BiGRU, which extracts bidirectional long-distance features from sequences, offering a simpler structure and higher training efficiency compared to BiLSTM; the fifth foundational model is Attention, employing a multi-head attention mechanism to dynamically enhance the weights of key features and extract contextual sequences that reflect globally important information; and the sixth foundational model is CRF, used to establish dependencies between labels and obtain the optimal sequence through global optimization, thus providing the best word segmentation result for the input text, as detailed below:
[0044] S221, The first basic model BERT model: used to construct contextual semantic representation, specifically as follows: (1) The original input text is segmented into a word sequence using the WordPiece word segmentation algorithm, and special placeholders are inserted at the beginning and end of the sequence respectively; (2) Each word is mapped to a word embedding vector, and the segment embedding vector used to distinguish sentences and the position embedding vector used to record temporal information are superimposed to synthesize the final input features; (3) The synthesized vector is fed into a multi-layer bidirectional Transformer encoder, and the deep connection between words is learned through the self-attention mechanism to output a high-dimensional feature vector that can reflect the complex semantic environment.
[0045] S222, The second basic model, ALBERT model: used to construct contextual semantic representation in a lightweight way, as follows: (1) The original input text is divided into word sequences using the WordPiece word segmentation algorithm, and special placeholders are inserted at the beginning and end of the sequence respectively; the initial input feature vector is generated by superimposing word embedding vectors, fragment embedding vectors and position embedding vectors. (2) The large vocabulary is mapped to a low-dimensional space and then projected back to a high-dimensional space through matrix factorization, which greatly reduces the number of parameters in the embedding layer. (3) All Transformer encoding layers share the same self-attention and fully connected parameters, which reduces memory usage and improves generalization ability. (4) After the initial input feature vector passes through these encoding layers, the output is a feature sequence rich in deep semantic information.
[0046] S223, the third basic model, BiLSTM model: is used to further capture long-distance semantic dependencies based on the semantic features output by BERT / ALBERT, as follows: (1) The feature sequence output by BERT or ALBERT model is used as input, and the internal cell state is finely controlled through forget gate, input gate and output gate, which can effectively store key historical information in long texts and alleviate the gradient vanishing problem; (2) The forward LSTM layer captures the dependency information from the beginning of the text to the current position, and the backward LSTM layer captures the inverse dependency information from the end of the text to the current position; (3) The bidirectional hidden states are concatenated to output an enhanced feature sequence containing complete contextual dependencies.
[0047] S224, the fourth basic model, BiGRU model: used to efficiently extract bidirectional temporal features from the output features of BERT / ALBERT, as follows: (1) The context feature sequence output by the BERT or ALBERT model is used as input and fed into the forward and backward GRU units. The internal reset gate controls the degree of forgetting of historical information, and the update gate determines the contribution ratio of the current input to the state; (2) The forward unit encodes the historical context from left to right, and the backward unit encodes the future context from right to left. GRU achieves fast modeling of long-distance dependencies through a simplified parameter structure; (3) The forward and backward hidden states at each time step are dimensionally concatenated to output a sequence containing bidirectional local temporal features.
[0048] S225, the fifth basic model, Attention model: used to capture global key feature weights, specifically as follows: (1) Receive the output sequence of BiLSTM or BiGRU model, calculate the scaling dot product between each position vector, and obtain the importance score of each character in the sequence for the overall semantics; (2) Use the Softmax function to normalize the score, generate attention distribution weights, and dynamically enhance key information and suppress noise information by the weights; (3) Weight the original sequence vector with the corresponding weights to generate a context feature vector sequence with a global perspective and a focus.
[0049] S226, the sixth basic model, CRF model: used for optimal decoding and constraint of sequence labels, as follows: (1) Project the features output by the Attention model to the label space through a fully connected layer, and calculate the emission score of each position in the sequence belonging to each label; (2) Maintain a label transition matrix to record the legality probability of mutual conversion between labels; (3) Based on the Viterbi dynamic programming algorithm, comprehensively consider the emission score and the transition score, and search for the global optimal path with the highest score among all possible label combinations, as the final word segmentation result output.
[0050] S23. The industrial safety operation and maintenance text data described in S1 is initially segmented by line. Each line of text after the initial segmentation is then segmented a second time according to punctuation marks. Next, the block length is set to 1000 and the block overlap is set to 100 to segment the text after the second segmentation. The segmented data is obtained and input into four word segmentation models for word segmentation processing. The similarity reliability distribution of the BMES tags corresponding to each character in the text data and the corresponding word segmentation results are obtained for each model.
[0051] S3 further includes the following steps:
[0052] S31. The optimal weight combination is adaptively searched using a genetic algorithm to obtain the weights for each word segmentation model. Calculate the overall reliability of each word segmentation model with respect to its respective word segmentation results. ,in Representing the One model, It consists of three parts added together in a ratio of 6:3:1: vocabulary matching degree, the average emission score of each character in a sentence, and the average attention weight of each character in the segmented text data H. The vocabulary matching degree is calculated by dividing the number of times the word predicted by the word segmentation model appears in the vocabulary by the total number of predicted words (for example, if the text "What are the possible risks and accidents?" is segmented into 8 words, and only 4 of these 8 words appear in the vocabulary, then the vocabulary matching degree is 0.5).
[0053] Obtain the similarity reliability distribution of each word segmentation model in S2 for each character in the text data corresponding to BMES tags. Then, perform tag-level fusion of the word segmentation results of the four models by fusing the similarity reliability distributions. The calculation process of similarity reliability distribution fusion is described as follows: First, obtain... The word segmentation results of each word segmentation model, and the overall reliability of the segmented text data H obtained based on the respective word segmentation results. And the similarity reliability distribution of the four word segmentation models with respect to BMES tags at the same position in the word segmentation results. ,in Then, weights are assigned to each word segmentation result based on a genetic algorithm. After weighting, the similarity reliability distribution after discounting is obtained: Finally, the overall reliability of the first and second word segmentation models is fused using a similarity reliability distribution fusion expression. Calculate each position The fusion reliability of each label , This indicates the position of the first word segmentation model. The corresponding similarity reliability; This indicates the position of the second word segmentation model. The corresponding similarity reliability; in position Four fusion confidence scores were obtained respectively. , , , The maximum fusion reliability is obtained according to the principle of maximizing reliability, and the label corresponding to the fusion reliability is used as the final label for fusion with the similarity reliability distribution of the third word segmentation model. This process is repeated until all four word segmentation models are fused, resulting in the word segmentation result after reliability fusion (for example, at index position 2, the final fusion reliability obtained are: , , , If the label corresponding to the second position is B, then the fusion confidence of each position is calculated sequentially. When fusing with subsequent word segmentation models, the fusion confidence of each position is used to continue calculating new fusion confidence until all word segmentation models are fused. Finally, the final word segmentation result is obtained based on the label with the maximum fusion confidence of each position.
[0054] S32. Using the embedding model BAAI / bge-m3, the word segmentation results obtained in S31 after confidence fusion are converted into vectors and normalized. The discrete word segmentation results are mapped to a dense vector space. Then, based on Euclidean distance search, the geometric distance between each vector is calculated, and a bidirectional mapping relationship between each text data H and its corresponding vector features is established to obtain the industrial safety operation and maintenance knowledge base.
[0055] S4 further includes the following steps:
[0056] The user-submitted industrial safety operation and maintenance questions are input into the retrieval enhancement module. By calculating the cosine similarity between each text in the industrial safety operation and maintenance knowledge base and the industrial safety operation and maintenance questions, the top 5 texts with the highest similarity are recalled. The large language model qwen3.5-plus is used to comprehensively analyze, reason, and integrate the recalled texts and industrial safety operation and maintenance questions to deduce industrial safety operation and maintenance precautions and operation and maintenance solutions.
[0057] Example:
[0058] The specific application scenarios of the present invention will be further described below with reference to specific embodiments:
[0059] Scenario 1: Example of word segmentation fusion calculation:
[0060] Original text: The designation of fixed hot work areas should be determined after approval by the hazardous chemical enterprise and clearly marked.
[0061] Reference word segmentation: [The setting of fixed hot work areas should be determined by the hazardous chemical enterprise after approval, and clear signs should be set up.]
[0062] Model 1: Word segmentation results: [Fixed hot work area][Setting][Should be][Approved][by][Hazardous chemical enterprise][and][Determined][,][Setting][Clear signs] [。 ]
[0063] Model 2: Word segmentation results: [The setting of fixed hot work areas should be determined by the hazardous chemicals enterprise after approval, and clear signs should be set up.]
[0064] Model 3: Word segmentation results: [The setting of fixed hot work areas should be determined by the hazardous chemicals enterprise after approval, and clear signs should be set up].
[0065] Model 4: Word segmentation results: [Fixed hot work area][Set][Should be determined by][Hazardous chemical enterprise][After approval][,][Set][Clear sign] [. ]
[0066] Fusion Model: Fusion_Model segmentation results: [Fixed hot work area] [The] [setting] [should be] [determined] [after approval] [by] [the] [hazardous chemical enterprise] [and] [set] [clear signs] [. ]
[0067] Fusion process:
[0068] Overall reliability of Model 1 word segmentation results: fusion weight The similarity reliability distribution of each label at index position 5 is as follows:
[0069] Overall reliability of Model 2 word segmentation results: fusion weight The similarity reliability distribution of each label at index position 5 is as follows:
[0070] Overall reliability of Model 3 word segmentation results: fusion weight The similarity reliability distribution of each label at index position 5 is as follows:
[0071] Overall reliability of Model 4 word segmentation results: fusion weight The similarity reliability distribution of each label at index position 5 is as follows:
[0072] After discount:
[0073] The similarity reliability distribution of each label at index position 5 in Model 1 is as follows:
[0074]
[0075] The similarity reliability distribution of each label at index position 5 in Model 2 is as follows:
[0076]
[0077] The similarity reliability distribution of each label at index position 5 in Model 3 is as follows:
[0078]
[0079] The similarity reliability distribution of each label at position 5 in Model 4 is as follows:
[0080]
[0081] Similarity fusion reliability between Model 1 and Model 2 at label B at index position 5:
[0082] Similarly, the fusion confidence of the tag M at index position 5 is:
[0083] The fusion confidence of the tag E at index position 5 is <0Reason for testing: To ensure that workers are not in an oxygen-rich environment or lack oxygen (an oxygen-rich environment greatly increases the risk of combustion).
[0097] The acceptable standard is that the oxygen content should be between 19.5% and 23.5% (volume fraction).
[0098] (3) Concentration of toxic gases:
[0099] Reason for testing: To prevent workers from being poisoned.
[0100] Acceptable standards: Exposure levels must be below the occupational exposure limits specified in national or industry standards, typically referring to "Occupational Exposure Limits for Hazardous Factors in the Workplace Part 1: Chemical Hazardous Factors" (GBZ 2.1). For example, the maximum permissible concentration for hydrogen sulfide (H2S) is usually required to be below 10 mg / m³ (or 6.6 ppm), and the time-weighted average permissible concentration for carbon monoxide (CO) is below 20 mg / m³ (approximately 17 ppm). Specific values need to be determined based on the process medium at the site, and are generally required to be undetectable (or below the alarm limit of the detection instrument).
[0101] In addition, gas detection must be carried out within 30 minutes before hot work, and the sampling analysis must be representative. If the work is interrupted for more than 30 minutes, the detection and analysis must be carried out again.
[0102] Recall text block 1: Before any hot work operation, the content of flammable gases, toxic and harmful gases, and oxygen within a 15-meter radius of the work site must be analyzed. Gas analysis should be conducted within 30 minutes before the hot work operation; if the operation is interrupted for more than 30 minutes, the analysis must be repeated. Sampling should be representative; for internal equipment operations, internal samples should be taken; for external operations, samples should be taken from ditches, sewer wells, valve wells, etc., around the hot work site.
[0103] Recall text block 2: Combustible gases: Level 1 alarm ≤ 10% LEL, Level 2 alarm ≤ 20% LEL. Toxic gases: Set according to GBZ 2.1 occupational exposure limits, typically Level 1 alarm is 50% of the limit, and Level 2 alarm is 100% of the limit. For example, hydrogen sulfide (H2S) Level 1 alarm is set at 5 ppm, and Level 2 alarm is set at 10 ppm. Oxygen: Alarm triggered when below 19.5% or above 23.5%.
[0104] Recall text block 3: The working gas environment in confined spaces must continuously meet the following requirements: Oxygen concentration: 19.5%~23.5%. Combustible gas concentration: < 5% LEL. Toxic and hazardous substance concentration: Complies with GBZ 2.1, with continuous mechanical ventilation and monitoring as necessary.
[0105] Please see Figure 2 This is a system principle block diagram of the large-scale question-and-answer system for industrial safety operation and maintenance provided by the present invention.
[0106] The text data module is used to collect industrial safety operation and maintenance text data to be processed, and to perform preprocessing such as noise reduction, cleaning and standardization on the data (noise reduction: removing garbled characters, emoticons, etc.; cleaning: unifying entity references, such as unifying "air compressor" and "air compressor" as "air compressor"; standardization: unifying the output format, using half-width and UTF-8 encoding for all texts and removing blank lines, etc.).
[0107] like Figure 3 As shown, the similarity reliability module is used to obtain the similarity reliability distribution of each character in the industrial safety operation and maintenance text data with respect to the BMES label by fusing four word segmentation models, and to construct a similarity reliability distribution fusion model.
[0108] The industrial safety operation and maintenance knowledge base module is used to construct a similarity reliability distribution fusion model, fuse the similarity reliability distribution, obtain the fused word segmentation results, vectorize the word segmentation results, and construct the industrial safety operation and maintenance knowledge base.
[0109] The security operation and maintenance question and answer output module is used to input the industrial security operation and maintenance questions raised by users into the retrieval enhancement module, recall texts similar to the questions in the industrial security operation and maintenance knowledge base, and use a large language model to comprehensively analyze, reason and integrate the recalled texts and industrial security operation and maintenance questions to deduce industrial security operation and maintenance precautions and operation and maintenance solutions.
[0110] The similarity reliability module further includes a preprocessing unit and a tag fusion unit. The preprocessing unit uses a sliding window strategy to segment the raw industrial safety operation and maintenance data to obtain N segmented data H. The tag fusion unit uses four word segmentation models to obtain the similarity reliability distribution of each character in each segmented data H with respect to BMES tags and performs tag fusion to construct a similarity reliability distribution fusion model.
[0111] The industrial safety operation and maintenance knowledge base module further includes: a word segmentation unit and an index building unit. The word segmentation unit is used to call the similarity confidence distribution fusion model to perform word segmentation processing on the segmented industrial safety operation and maintenance text data. The index building unit is used to build corresponding vector indexes for the segmented industrial safety operation and maintenance text data to build an industrial safety operation and maintenance knowledge base.
[0112] The safety operation and maintenance question-and-answer output module further includes a recall unit and an output unit. The recall unit, based on the retrieval enhancement generation system, receives user input of industrial safety operation and maintenance questions and recalls the top 5 text fragments in the industrial safety operation and maintenance knowledge base that are semantically most relevant to the question. The output unit integrates a large language model to comprehensively analyze, reason, and integrate the relevant texts recalled by the recall unit with the industrial safety operation and maintenance questions, inferring industrial safety operation and maintenance precautions and solutions (e.g., user question: The 10kV high-voltage switchgear in the factory has recently experienced an abnormal increase in internal temperature, and local...). What should be done if the discharge monitoring value exceeds the standard? Recall Text 1: Article 4.2 of the "Operation and Maintenance Procedures": When the temperature inside the switchgear exceeds 65℃ or the temperature rise rate exceeds 5℃ / h, it should be judged as abnormal heating; Recall Text 2: The "Technical Guidelines" state: When the partial discharge of a 10kV switchgear exceeds 50pC, attention should be paid; Reasoning: Personal safety first: It is strictly forbidden to directly open the switchgear door for temperature measurement or visual inspection without power off and without wearing complete insulating protective equipment. Before performing any operation, the four electrical safety steps of "power off, voltage testing, grounding, and hanging identification signs" must be followed.
[0113] Please see Figure 3 This is a flowchart of the similarity reliability module of the large-scale question-answering system for industrial safety operation and maintenance provided by the present invention. Its workflow is as follows:
[0114] The industrial safety operation and maintenance text data is segmented according to the sliding window strategy to obtain segmented data H. Then, based on four word segmentation models, the similarity reliability distribution of each character in the segmented data H with respect to the BMES label is obtained and the label is fused. The similarity reliability distribution fusion method is used to fuse the label of the similarity reliability distribution of the four models. According to the principle of maximizing reliability, the word segmentation result of each position in the segmented data H is obtained, and a similarity reliability distribution fusion model is constructed (for example, four word segmentation models are used to segment the industrial safety operation and maintenance data respectively to obtain the corresponding reliability distribution. The four word segmentation models are assigned reliability coefficients (e.g., 0.8, 0.6, 0.75, 0.85) by a genetic algorithm, and the reliability distributions obtained by each model are fused using the similarity reliability distribution fusion method to obtain the fused similarity reliability distribution fusion model of the industrial safety operation and maintenance data).
[0115] Please see Figure 4 This is a flowchart of the industrial security operation and maintenance knowledge base module of the large-scale question-and-answer system for industrial security operation and maintenance provided by the present invention. Its workflow is as follows:
[0116] First, the segmented data H is segmented and fused using the similarity reliability distribution fusion model obtained from the similarity reliability module. Then, the segmented data after segmentation is vectorized using the BAAI / bge-m3 embedding model to generate corresponding semantic vectors. Finally, the index relationship between each segmented data H and the vector is constructed (for example: segmented data 1: When performing hot work on equipment for producing, using, and storing oxygen, the oxygen content in the equipment should not exceed 23.5% by volume, corresponding to semantic vector 1: [0.3214, 0.1523, 0.421, ..., 0, 032], a total of 1024 dimensions), thus obtaining the industrial safety operation and maintenance knowledge base.
[0117] Please see Figure 5 This is a flowchart of the security operation and maintenance question and answer output module of the large-scale question and answer system for industrial security operation and maintenance provided by the present invention. Its workflow is as follows:
[0118] Industrial safety operation and maintenance questions are fed into the retrieval enhancement generation system to recall relevant text. A large language model is then used to comprehensively analyze, reason, and integrate the recalled text with the industrial safety operation and maintenance questions, deriving industrial safety operation and maintenance precautions and solutions. Table 1 shows some examples: A user raises an industrial safety operation and maintenance question: Before entering this confined space, what principles and steps should be followed for gas detection? Which main gases need to be detected? If the detector alarms, what should be done? Recall text (excerpt): Gas detection must be performed before entering a confined space, and a "Gas Detection Record Form" must be filled out. The detection work should be carried out by a trained work supervisor or a designated person. Industrial safety operation and maintenance Q&A system output (excerpt): Before entering a confined space, the principle of "ventilation first, detection second, and work third" must be strictly followed. Detection steps: First, force mechanical ventilation of the wastewater tank should be carried out for no less than 30 minutes. After ventilation, a pump-type or portable multi-gas detector should be used to detect gases at different depths (especially the bottom) from top to bottom and from near to far through the manhole.
Claims
1. A question-and-answer method for a large-scale industrial safety operation and maintenance model, characterized in that, Includes the following steps: S1. Collect and preprocess industrial safety operation and maintenance text data. S2. Construct the label recognition framework BMES, use the sliding window strategy to segment the preprocessed text data and input them into four word segmentation models respectively, and obtain the similarity confidence distribution of each character in each segmented text data with respect to the BMES label. S3. Construct a similarity reliability distribution fusion model, fuse the similarity reliability distribution, obtain the fused word segmentation results, vectorize the word segmentation results, and construct an industrial safety operation and maintenance knowledge base. S4. Match the industrial security operation and maintenance questions raised by users with the industrial security operation and maintenance knowledge base, and deduce the precautions and operation and maintenance solutions for industrial security operation and maintenance.
2. The question-answering method for a large-scale industrial safety operation and maintenance model according to claim 1, characterized in that, S1 specifically includes: collecting and filtering national standards related to industrial safety operation and maintenance, as well as historical records, technical documents and enterprise standards and procedures related to enterprise safety operation and maintenance, and then cleaning the text data.
3. The question-and-answer method for a large-scale industrial safety operation and maintenance model according to claim 1, characterized in that, S2 specifically includes the following process: S21. Construct the BMES label recognition framework , among which, tags A tag represents the first character of a word. This represents the middle character of a word. If there are multiple middle characters, then there are multiple [characters / characters]. Each character has a corresponding ,Label A tag represents the last word of a word. Represents single-character words. , , and These represent characters in the text data that belong to the tags. , , and Similarity reliability; S22. Construct four word segmentation models; S23. Perform initial segmentation on the preprocessed text data of S1 by line. Perform secondary segmentation on each line of text after the initial segmentation based on punctuation marks. Set the block length and block overlap to segment the text after secondary segmentation. Input each segmented text data H into four word segmentation models for word segmentation processing. Obtain the similarity reliability distribution of the BMES tags corresponding to each character in each segmented text data H for each word segmentation model.
4. The question-answering method for a large-scale industrial safety operation and maintenance model according to claim 3, characterized in that, Similarity reliability , , and It is obtained by adding the emission score and the attention weight. The emission score is the normalized probability value of the BMES label output by the word segmentation model for each character in the input sentence. attention Weights: The character-level context features are linearly projected by a multi-head attention mechanism layer to generate the query matrix, key matrix, and value matrix, respectively. The attention distribution is obtained by calculating the scaling dot product similarity between the query matrix and the key matrix, normalizing it using the Softmax function, and then outputting it after multi-head parallel computation, concatenation, and linear mapping. The character-level context features are obtained by adding the text vector after text vectorization to the position vector obtained by position encoding.
5. The question-and-answer method for a large-scale industrial safety operation and maintenance model according to claim 4, characterized in that, The four word segmentation models are as follows: The first word segmentation model consists of a Transformer-based bidirectional encoding representation BERT, a bidirectional long short-term memory network BiLSTM, a multi-head attention mechanism Attention, and a conditional random field CRF connected in series. The second word segmentation model consists of a Transformer-based bidirectional encoding representation BERT, a bidirectional gated recurrent unit (BiGRU), a multi-head attention mechanism (Attention), and a conditional random field (CRF) connected in series. The third word segmentation model consists of a lightweight Transformer-based bidirectional encoding representation ALBERT, a bidirectional long short-term memory network BiLSTM, a multi-head attention mechanism Attention, and a conditional random field CRF, which are sequentially connected. The fourth word segmentation model consists of a lightweight Transformer-based bidirectional encoding representation ALBERT, a bidirectional gated recurrent unit BiGRU, a multi-head attention mechanism Attention, and a conditional random field CRF, which are sequentially connected in series.
6. The question-and-answer method for a large-scale industrial safety operation and maintenance model according to claim 5, characterized in that, The S3 specifically The process includes the following: S31. Obtain the weights of each word segmentation model using a genetic algorithm. Calculate the overall reliability of each word segmentation model with respect to its respective word segmentation results. ,in Representing the One model, It consists of three parts: vocabulary matching degree, the average emission score of each character in a sentence, and the average attention weight of each character in the segmented text data H. The vocabulary matching degree is calculated by dividing the number of times the word predicted by the word segmentation model appears in the vocabulary by the total number of predicted words. Obtain the similarity reliability distribution of each word segmentation model in S2 for each character in the text data corresponding to BMES tags. Then, perform tag-level fusion of the word segmentation results of the four models by fusing the similarity reliability distributions. The calculation process of similarity reliability distribution fusion is described as follows: First, obtain... The word segmentation results of each word segmentation model, and the overall reliability of the segmented text data H obtained based on the respective word segmentation results. And the similarity reliability distribution of the four word segmentation models with respect to BMES tags at the same position in the word segmentation results. Then, weights are assigned to each word segmentation result based on a genetic algorithm. After weighting, the similarity reliability distribution after discounting is obtained: Finally, the overall reliability of the first and second word segmentation models is fused using a similarity reliability distribution fusion expression. Calculate each position The fusion reliability of each label , This indicates the position of the first word segmentation model. The corresponding similarity reliability; This indicates the position of the second word segmentation model. The corresponding similarity reliability; In position Four fusion confidence scores were obtained respectively. , , , Based on the principle of maximizing reliability, the maximum fusion reliability is obtained, and the label corresponding to the fusion reliability is used as the final label for fusion with the similarity reliability distribution of the third word segmentation model. This process is repeated until all four word segmentation models are fused to obtain the word segmentation result after reliability fusion. S32. Using an embedding model, the word segmentation results obtained in S31 after confidence fusion are converted into vectors and normalized. Then, based on Euclidean distance search, a bidirectional mapping relationship is established between each text data H and its corresponding vector features to obtain the industrial safety operation and maintenance knowledge base.
7. The question-answering method for a large-scale industrial safety operation and maintenance model according to claim 6, characterized in that, The specific implementation of S4 is as follows: inputting the industrial safety operation and maintenance question raised by the user into the retrieval enhancement module, recalling texts similar to the question in the industrial safety operation and maintenance knowledge base, and using a large language model to comprehensively analyze, reason and integrate the recalled text and the industrial safety operation and maintenance question to deduce industrial safety operation and maintenance precautions and operation and maintenance solutions.
8. A question-answering system for a large-scale industrial safety operation and maintenance model, used to implement the question-answering method according to any one of claims 1 to 7, characterized in that, Includes the following modules: The text data module is used to collect and preprocess text data related to industrial safety operations and maintenance. The similarity reliability module is used to construct the label recognition framework BMES. It uses a sliding window strategy to segment the preprocessed text data and input them into four word segmentation models to obtain the similarity reliability distribution of each character in each segmented text data with respect to the BMES label. The Industrial Safety Operation and Maintenance Knowledge Base module is used to build a similarity reliability distribution fusion model, fuse the similarity reliability distribution, obtain the fused word segmentation results, vectorize the word segmentation results, and build an industrial safety operation and maintenance knowledge base. The security operation and maintenance question and answer output module is used to input the industrial security operation and maintenance questions raised by users into the retrieval enhancement module, recall texts similar to the questions in the industrial security operation and maintenance knowledge base, and use a large language model to comprehensively analyze, reason and integrate the recalled texts and industrial security operation and maintenance questions to deduce industrial security operation and maintenance precautions and operation and maintenance solutions.