Enterprise safety accident scene simulation construction method based on generative large model
By applying a generative large-scale enterprise safety accident scenario simulation construction method in the safety management of power generation enterprises, combined with RAG technology, the problem that traditional methods are difficult to identify complex safety risks is solved, and efficient and accurate safety accident simulation and response are achieved.
Patent Information
- Application Number
- CN202411698075.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional safety management methods of power generation enterprises rely on manual experience and historical cases, making it difficult to effectively identify and deal with complex and changeable safety risks. The question-and-answer system lacks effective retrieval and utilization of external knowledge when generating answers, resulting in insufficient accuracy and reliability of answers.
The enterprise safety accident situation simulation construction method based on a generative large model is adopted, combined with the prompt function of information retrieval technology and the large language model, information is retrieved from the data source as the context and answers are generated, and the accuracy of generated content is improved using RAG technology.
It has achieved accurate identification and simulation of safety accident scenarios in power generation enterprises, improved the efficiency of safety risks identification and response, provided scientific prediction and evaluation, and provided support for enterprises to formulate effective preventive measures and emergency plans.
Smart Images

Figure CN119623633A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic data processing, and in particular to a method for constructing enterprise safety accident scenario simulation based on a generative large model. Background Art
[0002] In the field of safety management of power generation enterprises, traditional methods mainly rely on manual experience, retrospective analysis of historical accident cases, and regular safety inspections. Although these methods can identify and respond to some safety risks to a certain extent, their limitations are becoming increasingly prominent. First, manual experience is often limited by the individual's cognitive ability and memory range, and it is difficult to fully cover the existing safety risks. Secondly, although historical accident cases have reference value, emerging safety threats and complex and changing operating environments make it difficult to directly apply historical experience. Finally, although regular safety inspections can discover some explicit safety hazards, it is difficult to effectively identify potential and hidden risks.
[0003] With the advancement of power generation technology and the increasing complexity of power grid structure, the safety risks faced by power generation companies in the production process are also increasing. In order to meet these challenges, power generation companies urgently need a more efficient and intelligent safety management method. This method needs to be able to identify potential safety risks in real time and accurately, provide scientific predictions and evaluations, and provide strong support for companies to formulate effective preventive measures and emergency plans. Therefore, applying advanced artificial intelligence technology to the field of safety management of power generation companies has become a hot topic and trend in current research. However, when generating answers, traditional question-answering systems lack effective retrieval and utilization of external knowledge, resulting in insufficient accuracy and reliability of answers. Summary of the invention
[0004] In order to solve the technical problems existing in the background technology, the present invention proposes a method for constructing enterprise safety accident scenario simulation based on a generative big model.
[0005] This technology combines information retrieval technology and the prompting function of a large language model to retrieve information from data sources as context and generate answers based on this to solve safety accident scenarios in power generation companies. Safety accidents in power generation companies mainly include fires, equipment, casualties, production system safety, information security, environmental safety and other safety accidents.
[0006] The present invention proposes a method for constructing enterprise safety accident scenario simulation based on a generative large model, comprising the following steps:
[0007] S1. Integrate historical accident cases of power generation enterprises into a data set;
[0008] S2. Build a knowledge base of production safety scenarios;
[0009] S3. Fine-tune the generative large model based on the initial data set to enable the model to understand and generate text information related to the safety of power generation enterprises;
[0010] S4. Define the key elements of the power generation enterprise safety scenario and use RAG technology to improve the accuracy of the content generated by the large model. The specific steps are as follows:
[0011] S5. Evaluate and optimize the security scenario construction content generated by the large model;
[0012] For the application scenarios of hydropower enterprises, expert review and model self-assessment can be used to determine whether they are reasonable and authentic. For scenarios that do not meet expectations, the model parameters should be adjusted or the input conditions should be changed and regenerated until satisfactory results are obtained. Experts should be organized to evaluate the generated safety scenarios, adjust the model parameters according to the evaluation results, and optimize the scenario simulation.
[0013] S6. Provide timely voice broadcast of the results of RAG technical evaluation and output the optimized safety scenario text in voice form to facilitate staff to understand and respond.
[0014] As a further optimized solution of the present invention, step S1 specifically includes:
[0015] S10. Collect some historical case data, some documents, equipment information, operation data, etc. related to power generation enterprises. Specifically, the operation data of the hydropower generation process can be collected from the monitoring system, equipment management system and other channels of the power enterprise, including historical data such as equipment failure, abnormal water level fluctuation, and sudden change of water flow;
[0016] S11, de-duplication, filter, compress, and format the collected information;
[0017] S12. Clean and standardize these data, for example, remove special characters, segment, sentence, etc., to facilitate subsequent processing, and use natural language processing technology, such as regular expressions, etc.;
[0018] S13. Extract key information from the data, including date, event, operation data, and processing method, and then annotate the data so that it can be deeply understood and learned through deep learning algorithms; finally, the data needs to be converted into a format suitable for model fine-tuning training.
[0019] As a further optimized solution of the present invention, specifically in S2:
[0020] S20, embed the dataset of S1 into the Embedding vectorization model. The core task is to convert text and text topics into vector form;
[0021] S21. Use the Embedding vectorization model to vectorize the data and build a vector database for subsequent efficient retrieval and matching;
[0022] Using the Embedding vectorization model, the collected hydropower text data is converted into vector form and stored in a vector database. This database optimizes the efficiency of processing and storing large-scale vector data, so that when faced with massive knowledge vectors, the most relevant information for user queries can be quickly retrieved.
[0023] As a further optimized solution of the present invention, step S3 specifically comprises:
[0024] S30, preprocess the data, such as text cleaning, word segmentation, and conversion into a format acceptable to the model;
[0025] S31. Use this data set to fine-tune the large model, mainly including full parameter fine-tuning, LORA fine-tuning, and PrefixTuning fine-tuning;
[0026] S32. Optimize the collaborative working effect of the retrieval module and the generation module to improve the overall accuracy.
[0027] As a further optimized solution of the present invention, step S4 specifically includes:
[0028] S40. Define key elements based on the safety scenario of the power generation enterprise;
[0029] S41: Use RAG technology, combined with a vector database, to retrieve documents or fragments related to the query;
[0030] Specifically, during the search query process, the text question or topic input by the user is vectorized, and the vectorization result is linearly weighted to obtain an input vector; the text information Q and text topic T input by the user are vectorized using vectorization to obtain Qv and Tv, and Qv and Tv are linearly weighted to obtain the final input vector, which is Iv. The formula is: Iv = alpha*Qv+(1-alpha)*Tv, alpha is an adjustable parameter, and the value range of alpha is 0-1; alpha can be set by the contribution weight of the input vector. In some embodiments, alpha is 0.73, and the retrieval accuracy is further increased by linearly weighting the query vector.
[0031] S42: The retrieval results are used as additional context information and input into the generation model.
[0032] As a further optimized solution of the present invention, step S5 specifically comprises:
[0033] S50, evaluating the relevance between the user's question and the queried reference context;
[0034] S51, evaluating the relevance of the response content generated by the large model;
[0035] S52. According to the evaluation result, adjust the model parameters or input conditions to optimize the scenario simulation. Specifically, the adjustment of the model parameters includes adjusting the alpha value of the input vector.
[0036] As a further optimized solution of the present invention, step S6 includes:
[0037] S60, preprocessing, text analysis, phonetic synthesis, and waveform generation of the generated safety scenario text;
[0038] S61. Output the safety scenario description in voice form.
[0039] RAG technology combines the capabilities of generative big models and knowledge retrieval, and can automatically retrieve and integrate relevant external knowledge when generating text, thereby improving the quality and accuracy of the generated text. In the construction of safety scenarios for power generation companies, RAG technology can make full use of the large amount of safety documents, historical accident cases and other valuable resources accumulated by power generation companies, conduct in-depth learning and understanding through generative big models, and build safety accident scenarios that meet the actual situation of the company. At the same time, RAG technology can also dynamically update the knowledge base based on real-time data and new security threats to ensure the timeliness and accuracy of safety accident scenarios. The results generated by RAG are reported in a timely manner through TTS technology.
[0040] In the present invention, the proposed enterprise safety accident scenario simulation construction method based on the generative big model takes the emergency plan process of a hydroelectric power station as an example. First, some safety documents about fire are collected, and case information is used to build a knowledge database. The generative big model is used to vectorize these scenario data documents and build a vector database for subsequent efficient retrieval and matching. According to the production accident scenario definition, a query statement is generated and input into the generative big model. The RAG technology is used to combine the knowledge vectors in the vector database to retrieve documents or fragments related to the query. These retrieval results are input into the generative model as additional context information; the generative model generates a safety scenario description that conforms to the actual situation of the power generation enterprise based on the input query and retrieval results. Finally, experts are organized to evaluate the generated safety scenario to verify its authenticity, rationality and feasibility; based on the evaluation results, the scenario is corrected and improved. The improved evaluation results are output in the form of voice.
[0041] The present invention uses advanced knowledge retrieval technology to provide a new idea and method for the safety management of power generation enterprises. The method has the advantages of strong emergency preparedness and low safety risk, and is of great significance for improving the safety management level of power generation enterprises.
[0042] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flowchart of the operation steps of the present invention;
[0044] Figure 2 This is a system architecture diagram of the present invention. DETAILED DESCRIPTION
[0045] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar symbols throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0046] like Figure 1-Figure 2 The method for constructing enterprise safety accident scenario simulation based on a generative large model is shown in the figure. Taking the emergency plan process of a hydropower station as an example, the specific implementation steps are as follows:
[0047] S1. Integrate historical accident cases of power generation enterprises into a data set;
[0048] The specific methods for forming a data set include:
[0049] S10. Collect some historical case data, some documents, equipment information, operation data, etc. related to power generation enterprises. Specifically, the operation data of the hydropower generation process can be collected from the monitoring system, equipment management system and other channels of the power enterprise, including historical data such as equipment failure, abnormal water level fluctuation, and sudden change of water flow;
[0050] S11, de-duplication, filter, compress, and format the collected information;
[0051] S12. Clean and standardize these data, for example, remove special characters, segment, sentence, etc., to facilitate subsequent processing, and use natural language processing technology, such as regular expressions, etc.;
[0052] S13. Extract key information from the data, including date, event, operation data, and processing methods, and then annotate the data so that it can be deeply understood and learned through deep learning algorithms. Finally, the data needs to be converted into a format suitable for model fine-tuning training.
[0053] S2. Build a safety production scenario knowledge base; specifically include the following steps:
[0054] S20, embed the dataset of S1 into the Embedding vectorization model. The core task is to convert text and text topics into vector form;
[0055] S21. Use the Embedding vectorization model to vectorize the data and build a vector database for subsequent efficient retrieval and matching;
[0056] Using the Embedding vectorization model, the collected hydropower text data is converted into vector form and stored in a vector database. This database optimizes the efficiency of processing and storing large-scale vector data, so that when faced with massive knowledge vectors, the most relevant information for user queries can be quickly retrieved;
[0057] S3. Fine-tune the generative large model based on the initial data set to enable the model to understand and generate text information related to the safety of power generation enterprises; specifically:
[0058] S30, preprocess the data, such as text cleaning, word segmentation, and conversion into a format acceptable to the model;
[0059] S31. Use this data set to fine-tune the large model, mainly including full parameter fine-tuning, LORA fine-tuning, and PrefixTuning fine-tuning;
[0060] S32. Optimize the collaborative working effect of the retrieval module and the generation module to improve the overall accuracy;
[0061] Of course, you can also use the large language model for fine-tuning. Currently, the large language model uses the existing large language models in the industry, such as ChatGLM, ChatGPT, Qwen, LLAMA, etc. During the specific fine-tuning, adjust the learning rate, batch size, training rounds and other parameters to perform Lora fine-tuning. During the fine-tuning process, the model will adjust its weights according to the training data to better adapt to specific tasks and enhance the text topic generation ability of the large language model. During the fine-tuning process, use the validation set regularly to evaluate the model performance, and adjust the fine-tuning parameters based on the evaluation results;
[0062] S4. Define the key elements of the power generation enterprise safety scenario and use RAG technology to improve the accuracy of the content generated by the large model. The specific steps are as follows:
[0063] S40. Define key elements based on the safety scenario of the power generation enterprise;
[0064] S41: Use RAG technology, combined with a vector database, to retrieve documents or fragments related to the query;
[0065] Vectorize the text question or topic input by the user, and linearly weight the vectorization result to obtain the input vector; use vectorization to vectorize the text information Q and text topic T input by the user respectively to obtain Qv and Tv, and linearly weight Qv and Tv to obtain the final input vector, which is Iv. The formula is: Iv = alpha*Qv+(1-alpha)*Tv;
[0066] Qv is the vectorized text information; Tv is the vectorized text topic; alpha is an adjustable parameter, and the value range of alpha is 0-1; alpha can be set by the contribution weight of the input vector, and in some embodiments, alpha is 0.73;
[0067] S42, using the search results as additional context information and inputting them into the generation model;
[0068] According to the vector similarity between the final input vector and the knowledge slices in the vector database, the knowledge slices with high similarity to the user input text are recalled as the final knowledge base slice recall result. The user's question will be input into the embedding model for vectorization processing, and the system will search for knowledge text or historical conversation records that are semantically similar to the question vector in the vector database and return them. In the present invention, a vector database is used for retrieval and recall. According to the similarity between the final input vector Iv and the vector of the knowledge slice in the vector database, the knowledge base slices with high similarity to the user text Q are recalled in descending order, and deduplication processing is performed, and the top N are selected as the knowledge base recall result.
[0069] S5. Evaluate and optimize the security scenario construction content generated by the large model;
[0070] S50, evaluating the relevance between the user's question and the queried reference context;
[0071] S51, evaluating the relevance of the response content generated by the large model;
[0072] S52. Adjust model parameters or input conditions based on the evaluation results to optimize scenario simulation;
[0073] Specifically, it can be evaluated and optimized through a large language model;
[0074] For the application scenarios of hydropower enterprises, expert review and model self-assessment can be used to determine whether they are reasonable and authentic. For scenarios that do not meet expectations, the model parameters should be adjusted or the input conditions should be changed and regenerated until satisfactory results are obtained. Experts should be organized to evaluate the generated safety scenarios, adjust the model parameters according to the evaluation results, and optimize the scenario simulation.
[0075] S6. Provide timely voice broadcast of the results of RAG technical evaluation and output the optimized safety scenario text in voice form to facilitate staff to understand and respond.
[0076] The qualified scenario simulation results are used to guide the formulation of the enterprise's safety management strategy, such as formulating emergency plans and strengthening equipment maintenance plans. Organize relevant personnel to go to the scene to conduct investigations and surveys to fully understand the specific circumstances of the accident. According to the characteristics and degree of harm of the accident, take targeted emergency response actions, including but not limited to cutting off the source of the accident, demarcating and isolating dangerous areas, and safely and effectively evacuating surrounding personnel. At the same time, conduct a comprehensive assessment of the damaged equipment, accurately determine the extent of the damage, and immediately start the necessary repair work. If the equipment or components are severely damaged due to the accident and need to be replaced, immediately start the procurement process and ensure that the installation and replacement work is completed efficiently. In addition, pay close attention to the potential impact of the accident on the surrounding environment.
[0077] Through the Retrieval Augmented Generation (RAG) method, more accurate and comprehensive answers are generated by combining user questions with relevant information in the vector knowledge base, which improves the accuracy and reliability of the answers generated by the system, enabling the system to provide more comprehensive and well-founded answers;
[0078] Furthermore, the accuracy and reliability of the method are further increased by linearly weighting the user's question vector, and further, the output result is adjusted by analysis.
[0079] While generating answers, the output text results are displayed in the form of audio, which enhances the intuitiveness and reference value of the answers, allowing users to more comprehensively understand and utilize the information in the answers without being restricted by scenarios, thereby improving work efficiency.
[0080] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for constructing enterprise safety accident scenario simulation based on a generative big model, characterized in that: The steps include: S1. Integrate historical accident cases of power generation enterprises into a data set; S2. Build a knowledge base of production safety scenarios; S3. Fine-tune the generative large model based on the initial data set to enable the model to understand and generate text information related to the safety of power generation enterprises; S4. Define the key elements of the safety scenario for power generation companies; S5. Evaluate and optimize the security scenario construction content generated by the large model; S6. Provide timely voice broadcast of the results of RAG technical evaluation.
2. The method for constructing enterprise safety accident scenario simulation based on a generative big model according to claim 1 is characterized in that: Step S1 includes: S10. Collect some historical case data related to power generation enterprises, including documents, equipment information, and operation data; S11, de-duplication, filter, compress, and format the collected information; S12. Clean and standardize these data.
3. The method for constructing enterprise safety accident scenario simulation based on a generative big model according to claim 2 is characterized in that: Step S12 includes removing special characters, segments, and sentences.
4. The method for constructing enterprise safety accident scenario simulation based on a generative big model according to claim 1 is characterized in that: Step S2 includes: S20, embed the dataset of S1 into the Embedding vectorization model, and convert the text and text topics into vector form; S21. Use the Embedding vectorization model to vectorize the data and build a vector database.
5. The method for constructing enterprise safety accident scenario simulation based on a generative big model according to claim 1 is characterized in that: Step S3 includes: S30, preprocess the data, including text cleaning, word segmentation, and conversion into a format acceptable to the model; S31, fine-tune the large model using the data set of S30, S32. Optimize the collaborative working effect of the retrieval module and the generation module.
6. The method for constructing enterprise safety accident scenario simulation based on a generative big model according to claim 5 is characterized in that: Step S31 includes: all-parameter fine-tuning, LORA fine-tuning, and Prefix Tuning fine-tuning.
7. The method for constructing enterprise safety accident scenario simulation based on a generative big model according to claim 1 is characterized in that: Step S4 includes: S40. Define key elements based on the safety scenario of the power generation enterprise; S41: Use RAG technology, combined with a vector database, to retrieve documents or fragments related to the query; S42: The retrieval results are used as additional context information and input into the generation model.
8. The method for constructing enterprise safety accident scenario simulation based on a generative big model according to claim 7 is characterized in that: In step S41: In the retrieval query process, the text question or topic input by the user is vectorized, and the vectorization result is linearly weighted to obtain the input vector; the text information Q and text topic T input by the user are vectorized respectively using vectorization to obtain Qv and Tv, and Qv and Tv are linearly weighted to obtain the final input vector Iv, the formula is: Iv=alpha*Qv+(1-alpha)*Tv; Wherein: Qv is the vectorized text information; Tv is the vectorized text topic; alpha is an adjustable parameter, and the value range of alpha is 0-1.
9. The method for constructing enterprise safety accident scenario simulation based on a generative big model according to claim 1, characterized in that: Step S5 includes: S50, evaluating the relevance between the user's question and the queried reference context; S51, evaluating the relevance of the response content generated by the large model; S52. Adjust model parameters or input conditions based on the evaluation results to optimize scenario simulation.
10. The method for constructing enterprise safety accident scenario simulation based on a generative big model according to claim 1, characterized in that: Step S6 includes: S60, preprocessing, text analysis, phonetic synthesis, and waveform generation of the generated safety scenario text; S61. Output the safety scenario description in voice form.
Citation Information
Patent Citations
Emergency plan generation system and method based on large language model
CN117668155A
Medical question and answer text generation method and equipment based on retrieval enhancement generation
CN117763114A
Water affair industry knowledge question-answering system implementation method and system based on large language model
CN118193711A
Intelligent voice query method for content of industrial manual
CN118227734A
Rainf integrated battery case top plate assembly structure
KR102824776B1