Method and device for generating accident modular emergency drill script based on scenario construction
By using modular design and neural network models to generate coal mine accident emergency drill scripts, the problems of low efficiency and lack of scientificity in manual design in existing technologies are solved. The emergency drill scripts can cover a variety of accident scenarios efficiently and scientifically, thus improving the scientificity and flexibility of the drills.
Patent Information
- Application Number
- CN202510812821.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-06-18
AI Technical Summary
Existing coal mine accident emergency drill scripts rely on manual design, which is inefficient, lacks scientificity, cannot fully cover possible accident scenarios, lack modular design, and have low flexibility.
By combining modular design with neural network models, the accident scenario is divided into multiple task modules, the script elements are determined, and the initial emergency drill script is generated through the script generation model. Automated evaluation and correction are performed, and real accident cases are used to fit new cases for training.
It improves the scientificity and comprehensiveness of emergency drill scripts, can quickly generate reasonable emergency drill scripts, cover a variety of accident scenarios, and enhance the realism and effectiveness of drills.
Smart Images

Figure CN120335782B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of emergency management technology, and in particular to a method and device for generating modular emergency drill scripts for accidents based on scenario construction. Background Art
[0002] In daily coal mine safety management, conducting evacuation, escape, and rescue drills for various accident scenarios has become a crucial component in improving emergency response capabilities. Scientific and rational coal mine emergency response plans and drills are fundamental to improving mine safety production. Systematic emergency plan development and regular drills not only enhance coal mine enterprises' emergency response capabilities but also strengthen miners' safety awareness and emergency self-rescue capabilities, minimizing casualties and economic losses caused by accidents. However, current coal mine emergency response drills face numerous challenges, hindering further improvement in their effectiveness. Traditional coal mine emergency response drill script design often relies on manual methods, typically written by designers based on their own experience or limited case studies. This approach is not only inefficient, but also can lead to inadequate and incomplete scripts due to the designer's lack of experience or incomplete information, resulting in inadequate and incomplete coverage of all possible accident scenarios. Furthermore, traditional scripts are typically tailored to a single scenario and lack a modular design concept, resulting in limited flexibility in drill content and difficulty in rapid adjustment and reorganization to meet the specific needs of individual coal mines.
[0003] With the continuous improvement of the modernization level of coal mine production, the in-depth application of digital and intelligent technologies has provided new possibilities for the optimization of accident emergency drills. Based on the modular design concept, combined with intelligent algorithms and big data technology, the coal mine accident emergency drill script can be split into multiple functional modules, and customized drill scripts can be quickly generated for different accident types, mine structures and rescue needs. This modular script generation method not only improves the efficiency of script design, but also ensures the scientificity and comprehensiveness of the script content. Therefore, the development of a modular emergency drill script generation system and method for coal mine accidents can significantly improve the efficiency and effectiveness of emergency drills, provide coal mine enterprises with more efficient and intelligent drill tools, help strengthen coal mine emergency management capabilities, and provide strong guarantees for mine safety production. Summary of the Invention
[0004] The purpose of this application is to at least provide a scenario-based modular accident emergency drill script generation method and device, which can at least solve the problems that emergency drill scripts rely on manual design, are inefficient, not scientific and reasonable, and cannot fully cover possible accident scenarios.
[0005] In a first aspect, a scenario-based modular emergency drill script generation method is provided, comprising:
[0006] Using the task decomposition method, the target accident scenario of the pre-drill is divided into multiple target task modules according to the accident emergency rescue procedure; determining the target script elements of each target task module, wherein the target script elements include the accident scenario evolution elements and the emergency rescue task elements; the accident scenario evolution elements include at least one of the accident cause elements, the accident location elements, the accident evolution situation elements, and the accident consequence elements; and the emergency rescue task elements include at least one of the emergency rescue method elements, the emergency rescue personnel elements, and the material and equipment elements;
[0007] Inputting the plurality of target task modules and their corresponding plurality of target script elements into a trained script generation model to obtain an initial emergency drill script output by the script generation model;
[0008] Evaluate the initial emergency drill script; and
[0009] If the evaluation result indicates that the initial emergency drill script has preset errors, the emergency drill script is revised to obtain a revised emergency drill script, and the revised emergency drill script is used as the target emergency drill script for the drill, wherein the preset errors include at least one of grammatical errors, logical errors, information omissions, and format errors.
[0010] Among them, new accident cases are reconstructed by fitting the accident cases of the accident scenarios, and new scripts are generated for the new accident cases. The new accident cases and new scripts are used as training data to train the script generation model, so that the script generation model can be trained more targetedly when accident cases and scenarios are limited.
[0011] In a second aspect, a scenario-based modular emergency drill script generation device is provided, comprising:
[0012] A division module is used to divide the target accident scenario of the pre-drill into multiple target task modules according to the accident emergency rescue procedures using the task decomposition method;
[0013] a determination module, configured to determine target script elements of each target task module, wherein the target script elements include accident scenario evolution elements and emergency rescue task elements; the accident scenario evolution elements include at least one of accident cause elements, accident location elements, accident evolution situation elements, and accident consequence elements; and the emergency rescue task elements include at least one of emergency rescue method elements, emergency rescue personnel elements, and material and equipment elements;
[0014] an acquisition module, configured to input the plurality of target task modules and their corresponding plurality of target script elements into a trained script generation model to obtain an initial emergency drill script output by the script generation model;
[0015] an evaluation module, configured to evaluate the initial emergency drill script; and
[0016] a correction module, configured to correct the emergency drill script to obtain a corrected emergency drill script if the evaluation result indicates that the initial emergency drill script has preset errors, and use the corrected emergency drill script as a target emergency drill script for the drill, wherein the preset errors include at least one of grammatical errors, logical errors, information omissions, and format errors;
[0017] Among them, new accident cases are reconstructed by fitting the accident cases of the accident scenarios, and new scripts are generated for the new accident cases. The new accident cases and new scripts are used as training data to train the script generation model, so that the script generation model can be trained more targetedly when accident cases and scenarios are limited.
[0018] In a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned method.
[0019] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, and the computer program implements the above method when executed by a processor.
[0020] In a fifth aspect, a computer program product is provided, which includes computer program instructions, and when the computer program instructions are executed by a processor, the processor is caused to perform the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] One or more embodiments are exemplarily described by the figures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments.
[0022] Figure 1 is a flowchart of a scenario-based method for generating modular emergency drill scripts for accidents in some embodiments of the present application;
[0023] Figure 2 is a schematic diagram of modular division of accident scenarios in some embodiments of the present application;
[0024] Figure 3 is a schematic diagram of modular division of accident scenarios in some embodiments of the present application;
[0025] Figure 4 is a schematic diagram of a training method for a script generation model in some embodiments of the present application;
[0026] Figure 5 This is a block diagram of a device for generating scenario-based modular emergency drill scripts for accidents in some embodiments of the present application;
[0027] Figure 6 It is a schematic structural diagram of an electronic device in some embodiments of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below with reference to the accompanying drawings. However, it will be understood by those skilled in the art that in each embodiment of the present application, many technical details are proposed to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation on the specific implementation of the present application. The various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0029] Accident emergency plans and drills are important means to improve the scientific nature and effectiveness of drills and ensure safe production. By developing and rehearsing emergency plans, risky production enterprises can enhance their emergency response capabilities, strengthen workers' safety awareness and self-rescue capabilities, and thus minimize accident losses. Traditional emergency drill methods rely primarily on manually designed drill scripts. This approach is not only inefficient but can also lead to inadequate and inappropriate scripts due to the designer's lack of experience or incomplete information, failing to fully cover all possible accident scenarios.
[0030] Based on this, the present application proposes a method for generating modular emergency drill scripts for accidents based on scenario construction. Through the combination of modular design and neural network model, in the script generation model, the corresponding emergency drill script is generated by inputting modular script elements, and the generated emergency drill script is automatically evaluated, which can quickly discover and modify problems such as grammatical and logical errors in the emergency script, and guide the efficient conduct of accident emergency drills. The generated emergency drill script is more scientific and reasonable through modular design, and can fully cover possible accident scenarios, thereby improving the realism and effectiveness of emergency drills. The generation method of the present application can be used for, but not limited to, the generation of emergency drill scripts for coal mining enterprises.
[0031] The following is a detailed description of the implementation details of the evaluation method of the present application in conjunction with the accompanying drawings and specific embodiments. The following content is only provided for ease of understanding and is not necessary for implementing this solution.
[0032] The generation method of the embodiment of the present application can be applied to electronic devices with communication, computing and data storage capabilities.
[0033] like Figure 1 As shown, according to some embodiments of the present application, a method for generating a scenario-based modular emergency drill script is provided, comprising:
[0034] Step S110: using a task decomposition method to divide the target accident scenario of the pre-drill into multiple target task modules according to the accident emergency rescue procedures;
[0035] Step S120: Determine target script elements for each target task module, wherein the target script elements include accident scenario evolution elements and emergency rescue task elements; the accident scenario evolution elements include at least one of accident cause elements, accident location elements, accident evolution situation elements, and accident consequence elements; and the emergency rescue task elements include at least one of emergency rescue method elements, emergency rescue personnel elements, and material and equipment elements;
[0036] Step S130: Input multiple target task modules and their corresponding multiple target script elements into a script generation model to obtain an initial emergency drill script output by the script generation model;
[0037] Step S140: Evaluate the initial emergency drill script; and
[0038] Step S150: If the evaluation result indicates that the initial emergency drill script contains preset errors, the emergency drill script is corrected to obtain a corrected emergency drill script, and the corrected emergency drill script is used as the target emergency drill script for the drill. The preset errors include at least one of grammatical errors, logical errors, information omissions, and format errors.
[0039] In the above method steps, the accident scenario is divided into multiple task modules, and the script elements for each task module are determined separately (the script elements corresponding to the target task module are also called "target script elements"). These script elements can be divided into two categories: accident scenario evolution elements and emergency rescue task elements. For example, accident scenario evolution elements may include at least one of the accident cause elements, accident location elements, accident evolution situation elements, and accident consequence elements; emergency rescue task elements may include at least one of the emergency rescue method elements, emergency rescue personnel elements, and supplies and equipment elements. The multiple task modules and their corresponding script elements are then input into a script generation model to generate the corresponding emergency drill script. Thus, the combination of modular design and neural network models can improve the efficiency of script generation, and the modular design enables the script generation method to comprehensively cover possible accident scenarios. Furthermore, automated evaluation and correction of emergency drill scripts facilitates the development of scientific and reasonable emergency drill scripts.
[0040] Among them, new accident cases are reconstructed by fitting the accident cases of the accident scenarios, and new scripts are generated for the new accident cases. The new accident cases and new scripts are used as training data to train the script generation model, so that the script generation model can be trained more targetedly when accident cases and scenarios are limited.
[0041] Given that the number of real accident cases may not be sufficient for model training, this disclosure proposes a method for adding new accident cases through fitting based on real accident cases to compensate for the lack of training data and improve the accuracy of model predictions. New scripts can be generated for these new accident cases. These new scripts can be manually determined, for example, through expert input to develop new cases and case scripts.
[0042] The emergency drill script is generated based on the accident scenario (i.e., accident scenario). Different accident scenarios correspond to different emergency drill scripts. However, after modular design, the task modules included in different accident scenarios are basically the same, but the script elements of different story scenarios may be different. Taking coal mining enterprises as an example, accident scenarios include gas explosions, coal dust explosions, fires, water seepage, roof collapse, etc. Even if the accident scenarios are different, according to the time of the accident, the accident scenarios can basically include the accident incubation stage module, internal disposal module, external rescue module and emergency end module (such as Figure 2 (As shown in the figure), only the script elements of different accident scenarios are different. Therefore, the modular design can fully cover all possible accident scenarios.
[0043] As mentioned above, taking coal mining enterprises as an example, accident scenarios may include gas explosion, coal dust explosion, fire, water seepage, roof collapse, etc. Other production enterprises also have corresponding accident scenarios, which will not be listed here one by one.
[0044] In some embodiments, for the coal mining industry, the scenario script may include disaster status information and disaster status change information of the coal mine accident scene on the timeline.
[0045] In some embodiments, using the task decomposition method to divide the target accident scenario into multiple target task modules according to the accident emergency rescue procedure may include:
[0046] Based on the time process of the accident, the target accident scenario is divided into multiple target task modules.
[0047] As described above, accident scenarios can be divided into the accident incubation phase module, the internal handling module, the external rescue module, and the emergency termination module based on the time course of the accident. It is understood that, depending on different accident scenarios, the modules can also be divided into parts of the accident incubation phase module, the internal handling module, the external rescue module, and the emergency termination module. It is also understood that other methods can be used to modularize accident scenarios.
[0048] In some embodiments, inputting multiple target task modules and their corresponding multiple target script elements into a script generation model includes: combining the multiple target task modules and their corresponding multiple target script elements according to the time of the accident to obtain model input information; and inputting the model input information into the script generation model. Thus, the multiple target task modules and their corresponding multiple target script elements can be organically combined according to the time of the accident to form a representation of the overall target accident scenario, so that the script generation model can consider the logical relationships between each module and each element and generate a more scientific and reasonable emergency drill script.
[0049] Regarding the target script elements of the target task module, the accident causal factors of different accidents are different, and the causal factors of the same accident are also different.
[0050] Regarding the evolution factors of accident scenarios:
[0051] Different accident scenarios require multiple causal factors to be identified from multiple perspectives and levels, then paired and combined to determine the final causal factors. Accident location factors can include, for example, equipment, personnel, and distress situations. From the accident location list, the accident site is selected, and the necessary equipment, personnel, and distress situations for personnel after the accident are determined. Accident evolution factors can include, for example, the size of the accident and the target of the emergency response. Small-scale accidents can be addressed by internal company resources, while large-scale accidents can require external rescue efforts. Regarding the accident consequence factor, different accident consequences caused during the rescue process, such as poisoning and burns due to high temperatures, asphyxiation due to ventilation system damage, and entrapment due to impact damage to support structures, can be selected. Accident severity (injury and damage) varies with the size of the accident, necessitating different emergency response methods.
[0052] About emergency rescue mission elements:
[0053] The emergency rescue method element may include the specific rescue measures and routes for implementing the emergency rescue. The emergency rescue personnel element includes the composition and distribution of the organizations and personnel involved in the emergency rescue. The material and equipment element includes the types and quantities of materials mobilized for the emergency rescue, as well as the equipment required for the specific rescue operation.
[0054] In some embodiments, the target task module can be further divided into multiple subtask modules at the second level. In this case, the target script elements of each subtask module can be clearly defined, including elements such as people, objects, equipment, fixed actions, and flexible actions, thereby increasing flexibility and improving the efficiency of modular design. Furthermore, multiple subtask modules can be divided into flexible replacement submodules and fixed submodules. Fixed submodules can be directly added during module design. Fixed submodules are universal, reducing the difficulty of modular design and improving efficiency.
[0055] For example, the target task module can be divided into multiple subtask modules based on the emergency rescue space. These subtask modules can include at least one of a map submodule, a disaster submodule, a personnel submodule, and a material and equipment submodule. For example, in a coal mining enterprise, the map submodule can include several modularized roadway categories, such as tunneling tunnels, mining working faces, and general roadways; the disaster submodule can include modules for gas explosions, roof collapse accidents, and fire accidents; the personnel submodule can include modules for staff, management personnel, and rescue personnel; and the equipment submodule can include modules for production equipment, essential equipment, and rescue equipment. These four subtask modules are independent of each other, forming a modular system for emergency rescue drill scenarios. Each subtask module and its corresponding target script elements can be designed based on specific accident scenarios. For example, for the accident incubation phase module, the map submodule can include an initial scenario submodule and a hidden danger scenario submodule. The initial scenario submodule can also include accident location script elements, including on-site personnel, equipment, and work locations. The hidden danger scenario submodule can also be designed based on the specific accident situation. The hidden danger factors (such as the accident location element) in the hidden danger scenario submodule can be set.
[0056] The fixed submodule may, for example, include at least one of an alarm submodule, a plan activation submodule, an alarm receiving submodule, an alarm dispatching submodule, and an accident site investigation submodule.
[0057] According to some embodiments of the present application, using the task decomposition method to divide the target accident scenario into multiple target task modules according to the accident emergency rescue procedure includes: dividing the target accident scenario into multiple target task modules based on the time process of the accident; dividing the target task module into multiple subtask modules based on the spatial scene of the emergency rescue. Wherein, the target task module includes part or all of the accident incubation stage module, the internal disposal module, the external rescue module and the emergency end module, and the multiple subtask modules include at least one of the map submodule, the disaster submodule, the personnel submodule and the material and equipment submodule. In this case, determining the target script element of each target task module includes: determining the target script element of each subtask module of the target task module. Accordingly, inputting the multiple target task modules and their corresponding multiple target script elements into the script generation model includes: combining the multiple target task modules according to the time of the accident, and combining the multiple subtask modules of each target task and their corresponding multiple target script elements according to the space where the accident occurred to obtain model input information; and inputting the model input information into the script generation model. In this way, it is possible to decompose and classify the target accident scenario, analyze each scenario element, clarify the content of the accident scenario construction, scene parameters and granular elements of each module, classify the scenario element categories, set granular content such as personnel and equipment, and find dynamic nodes; then divide the accident stage into multiple modules at the first and second levels according to the time of the accident and the space of emergency rescue, determine the script elements of each module, clarify the content of people, objects, equipment, fixed modules and flexible modules in the system, and make each module and element organically combined according to a certain logic to form a description of the overall target accident scenario, so that the script generation model can consider the logical relationship between each module and each element, and generate a more scientific and reasonable emergency drill script.
[0058] The following will illustrate the module division method of the target accident scenario with reference to an exemplary embodiment.
[0059] like Figure 3As shown, taking a coal mining enterprise as an example, the target accident scenario can be divided into the accident incubation phase module, internal handling module, external rescue module, and emergency termination module according to the timeline of the accident. Each module is further divided into multiple subtask modules based on the scope of the emergency plan. Specifically, the accident incubation phase module is divided into two map submodules: the initial scenario submodule and the hidden danger scenario submodule. The accident location script elements of the initial scenario submodule include on-site personnel, equipment, and work location. The hidden danger scenario submodule is designed based on the specific accident situation. The hidden danger factors (such as accident location elements) of the hidden danger scenario submodule are set. The personnel submodule of the internal handling module includes the on-site disaster avoidance submodule. The accident location script elements of the on-site disaster avoidance submodule include personal safety protection, etc. The disaster submodule of the internal handling module includes the information reporting submodule. The accident phase elements of the information reporting submodule include dispatch room reporting, etc. The personnel submodule of the internal handling module can also include the plan initiation submodule, the alarm reception submodule, the alarm dispatch submodule, and the mine investigation submodule. The accident location element of the plan activation submodule includes the mine manager's instructions, while the accident location elements of the alarm reception and dispatch submodules include the alarm handling telephone number. The accident location element of the mine investigation submodule includes the establishment of an underground rescue base. The equipment submodule of the internal response module includes the internal emergency response submodule, while the accident location elements of the external emergency response submodule may include ventilation equipment, fire extinguishing equipment, and so on. The personnel submodule of the external rescue module may include the group emergency plan activation submodule, the alarm submodule, the alarm reception submodule, the dispatch submodule, and the mine investigation submodule. The accident location elements of the group emergency plan activation submodule include the transfer of command authority, the alarm submodule includes the supervisor's report, the alarm reception submodule and the dispatch submodule include the alarm assembly, and the mine investigation submodule includes the receipt of the rescue mission. The materials and equipment submodule of the external rescue module may include the external emergency response submodule, while the accident location elements of the external emergency response submodule may include equipment for sealing the working face and nitrogen injection fire extinguishing equipment. The alarm reception submodule and the dispatch submodule may be combined into a single submodule. The equipment submodule of the emergency end module may include a personnel lifting submodule. The personnel submodule of the emergency end module may include a rescue report summary submodule and a return to team submodule.
[0060] The multiple subtask modules can be divided into flexible replacement submodules and fixed submodules. The fixed submodules can include alarm submodule, plan activation submodule, alarm receiving submodule, alarm dispatching submodule and well investigation submodule. The subtask modules other than the fixed submodules are flexible replacement submodules. Figure 4 As shown, according to some embodiments of the present application, the training process of the script generation model may include:
[0061] Step S410: establishing a database of accident emergency drill scripts;
[0062] Step S420: Obtain a real accident emergency drill script from the database;
[0063] Step S430: Divide the real accident emergency drill script into multiple sample task modules using the task decomposition method;
[0064] Step S440: determining the sample script elements of each sample task module;
[0065] Step S450: Input multiple sample task modules and their corresponding multiple sample script elements into a script generation model, and train the script generation model so that the loss between the predicted emergency drill script output by the script generation model and the real accident emergency drill script meets the requirements.
[0066] The script generation model trained by the above training method can predict the emergency drill script based on the input multiple task modules and their corresponding script elements, so that the predicted emergency drill script is close to the real emergency drill script.
[0067] In some embodiments, using coal mining enterprises as an example, a word segmentation tool can be used to preliminarily screen the actual emergency drill scripts from collected real-world coal mine accident emergency drill guidance documents and related drill cases, eliminating duplicated emergency drill scripts and building a database of coal mine accident emergency drill scripts. It is understood that similar methods can be used to build a database of emergency drill scripts for other production enterprises.
[0068] Among them, the module division method and script element determination method for real accident emergency drill scripts are similar to the above-mentioned related methods for target accident scenarios and will not be described in detail here.
[0069] Based on a database of accident emergency drill scripts, a modular system for emergency rescue drill scenarios is used to generate model sample input information. This information is then used to train the script generation model for emergency rescue drill scripts. For example, a script element for a coal mine gas explosion accident might include the accident cause element ("gas explosion caused by gas outburst"); the accident location element ("underground working face No. 5 in the east area of the coal mine"); the accident phase element ("the explosion blocked two tunnels, resulting in multiple injuries"); the accident consequence element ("five people trapped, two people slightly injured"); and the script elements for fixed submodules (such as the alarm submodule, external rescue submodule, and mine reconnaissance submodule). This information is structured and then fed into the script generation model.
[0070] In some embodiments, the script generation model primarily uses the Transformer architecture as its core algorithm. By applying multi-head attention to the model's sample input information, it captures the relationships between input features and generates natural language text. The neural network model first converts the script elements into text or a structured input format. A tokenizer is then used to decompose the input text into word units and convert them into vectors. A self-attention mechanism is then used to calculate the relevance of each word in the input sequence to other words.
[0071]
[0072] Q is the query vector, K is the key vector, V is a value vector, is the dimension of the vector, for K The transposed vector of .
[0073] The decoder then predicts the next word based on the previously generated text. Masked Self-Attention is used during the decoding process to ensure that only previously generated content is focused. The loss (e.g., cross-entropy loss) between the generated text (i.e., the predicted emergency drill script) and the target text (the actual accident emergency drill script) is minimized to optimize the text and form a preliminary emergency drill script.
[0074] In some embodiments, during the process of training the script generation model, targeted training is performed using at least one of the following:
[0075] Similarity calculation is performed on accident cases, and accidents with similarity higher than a first threshold are regarded as a similar accident set. The sample task modules and their corresponding sample script elements corresponding to the similar accident set are then input into the script generation model for intensive training on accidents, so as to enhance the script generation model's sensitivity to accidents and improve the accuracy of prediction.
[0076] Similarity calculation is performed on the scripts, and the scripts with similarity higher than the second threshold are regarded as a similar script set. The sample task modules corresponding to the similar script set and their corresponding sample script elements are input into the script generation model for intensive training of the scripts, so as to enhance the sensitivity of the script generation model to the scripts and improve the accuracy of the prediction.
[0077] Thereby, the sensitivity of the scenario generation model to the accident scenario and the accuracy of the prediction can be enhanced, and / or the sensitivity of the scenario generation model to the scenario and the accuracy of the prediction can be enhanced.
[0078] The accident cases in the above method embodiments may be real accident cases in the database of accident emergency drill scripts, or may be newly added accident cases reconstructed through a fitting algorithm.
[0079] For example, the similarity between accident cases and / or scripts may be calculated by cosine similarity, Euclidean distance, or Manhattan distance.
[0080] Those skilled in the art should understand that the “threshold value” mentioned in this application is not a specific fixed value, but a value that can be changed and adjusted.
[0081] In other embodiments, during the process of training the script generation model, targeted training is carried out using at least one of the following methods:
[0082] Calculate the correlation degree for accident cases, and identify accidents with a correlation degree higher than the third threshold as a set of related accidents. Then, input the sample task modules and their corresponding sample script elements corresponding to the related accident set into the script generation model for intensive training on accidents, thereby enhancing the script generation model's sensitivity to accidents and improving prediction accuracy.
[0083] The correlation degree is calculated for the scripts, and the scripts with correlation degrees higher than the fourth threshold are regarded as a similar script set. The sample task modules corresponding to the associated script set and their corresponding sample script elements are input into the script generation model for intensive training of the scripts, so as to enhance the sensitivity of the script generation model to the scripts and improve the accuracy of the prediction.
[0084] The correlation in the correlation degree includes temporal correlation and / or spatial correlation.
[0085] For example, for temporal correlation, accident cases that are close in time can be considered as a set of related accidents, and the temporal correlation degree can be determined, for example, based on the difference between the occurrence times of the accidents. For another example, for spatial correlation, accident cases that are close in space can be considered as a set of related accidents, and the spatial correlation degree can be determined, for example, based on the distance between the accidents. Of course, temporal correlation and spatial correlation can also be combined, in which case multiple accidents that are close in time and space can be considered as a set of related accidents. Similarly, those skilled in the art should understand that the "threshold" mentioned here is not a specific fixed value, but a value that can be changed and adjusted.
[0086] Thus, the sensitivity of the scenario generation model to the accident scenario and the accuracy of the prediction can be enhanced, and / or the sensitivity of the scenario generation model to the scenario and the accuracy of the prediction can be enhanced.
[0087] It is understandable that the script generation model can also be trained specifically in combination with the above two method embodiments, which can further enhance the sensitivity of the script generation model to accident scenarios and improve the accuracy of predictions, and / or enhance the sensitivity of the script generation model to scripts and improve the accuracy of predictions.
[0088] Considering the relatively small number of real-world accident cases for a certain type of manufacturing enterprise, the script generation model can be pre-trained using real-world accident cases from all types of manufacturing enterprises to obtain an initial script generation model. When applied to a specific type of manufacturing enterprise, the script generation model can be fine-tuned using real-world accident cases from that type of enterprise, enabling the resulting script generation model to generate more accurate emergency drill scripts for that type of enterprise. During this fine-tuning process, the script generation model can be trained using the aforementioned method embodiments.
[0089] In some embodiments, the real accident emergency drill scripts in the coal mine accident emergency drill script database can be classified according to the accident scenario type. During the application process, the initial emergency drill script output by the script generation model can be compared with the real accident emergency drill script corresponding to the target accident scenario in the database for similarity to achieve an evaluation of the initial emergency drill script. In other words, the evaluation of the initial emergency drill script includes:
[0090] Comparing the initial emergency drill script with the real accident emergency drill script corresponding to the target accident scenario in the database for similarity;
[0091] If the similarity between the initial emergency drill script and the real accident emergency drill script is less than a fifth threshold, it is determined that the initial emergency drill script has preset errors, which include at least one of grammatical errors, logical errors, information omissions and format errors.
[0092] Therefore, it is possible to determine whether there are preset errors in the initial emergency drill script based on the similarity comparison, and to promptly correct the erroneous initial emergency drill script to make it more scientific and reasonable.
[0093] Exemplarily, if the similarity between the initial emergency drill script and the real accident emergency drill script is less than the fifth threshold, the predefined rules are used to check and correct the script. For example, if grammatical and spelling errors such as "rescue teams are dispatched to carry life detectors into the mine to confirm the specific location of trapped people" are found in the script, the SpaCy tool is used to detect grammatical, spelling, and punctuation errors in the script, and it is modified through Python to "dispatch rescue teams carrying life detectors into the mine to confirm the specific location of trapped people" and then checked through a dedicated script verification framework; if logical errors, information omissions, or formatting issues are found in the emergency script such as "before the accident, arrange for a team to arrive at the scene of the accident and provide timely treatment", the fine-tuned OpenAI API model is used to modify it to "after the accident, arrange for a medical team to arrive at the scene of the accident and provide timely treatment", and finally a coal mine explosion accident emergency drill script that is consistent with industry standards is generated to guide the efficient implementation of coal mine accident emergency drills.
[0094] For example, the similarity between the initial emergency drill script and the real accident emergency drill script can be calculated by cosine similarity, Euclidean distance or Manhattan distance.
[0095] In some embodiments, if the similarity between the initial emergency drill script and the real accident emergency drill script is not less than a fifth threshold, the initial emergency drill script is directly used as the target emergency drill script for the drill.
[0096] For example, emergency drill scripts can be divided into gas accident scenario emergency drill scripts, dust accident scenario emergency drill scripts, roof accident scenario emergency drill scripts, mine flood accident scenario emergency drill scripts, and electromechanical accident scenario emergency drill scripts based on different accident types. Real accident emergency drill scripts in the database can be divided based on these accident scenario types.
[0097] The emergency drill script generation method in the embodiment of the present application can establish an emergency drill model based on accident emergency drill guidance documents and related drill cases. By inputting modular script elements, a corresponding emergency drill script is generated to guide the efficient conduct of accident emergency drills. The method can adapt to a variety of different accident drill scenarios and can quickly adjust and reorganize emergency scripts according to the actual needs of different production enterprises. In addition, the generated emergency drill scripts can also be automatically evaluated to quickly identify and correct grammatical and logical errors in the emergency drill scripts, ensuring the correctness of the emergency drill scripts.
[0098] like Figure 5As shown, according to some embodiments of the present application, a scenario-based modular emergency drill script generation device 500 is provided, which is used to perform the steps in the aforementioned method embodiments. The modular emergency drill script generation device 500 includes:
[0099] A division module 510 is used to divide the target accident scenario of the pre-drill into multiple target task modules according to the accident emergency rescue procedures using a task decomposition method;
[0100] Determination module 520, configured to determine target scenario elements for each target task module, wherein the target scenario elements include accident scenario evolution elements and emergency rescue task elements; the accident scenario evolution elements include at least one of accident cause elements, accident location elements, accident evolution situation elements, and accident consequence elements; and the emergency rescue task elements include at least one of emergency rescue method elements, emergency rescue personnel elements, and supplies and equipment elements;
[0101] An acquisition module 530 is configured to input the plurality of target task modules and their corresponding plurality of target script elements into a trained script generation model to obtain an initial emergency drill script output by the script generation model;
[0102] An evaluation module 540 is configured to evaluate the initial emergency drill script; and
[0103] a correction module 550 configured to correct the emergency drill script to obtain a corrected emergency drill script if the evaluation result indicates that the initial emergency drill script has preset errors, and use the corrected emergency drill script as a target emergency drill script for the drill, wherein the preset errors include at least one of grammatical errors, logical errors, information omissions, and format errors;
[0104] Among them, new accident cases are reconstructed by fitting the accident cases of the accident scenarios, and new scripts are generated for the new accident cases. The new accident cases and new scripts are used as training data to train the script generation model, so that the script generation model can be trained more targetedly when accident cases and scenarios are limited.
[0105] In some embodiments, the scenario-based modular emergency drill script generation device further includes a training module for:
[0106] Establish a database of accident emergency drill scripts;
[0107] Obtaining real accident emergency drill scripts from the database;
[0108] The task decomposition method is used to divide the real accident emergency drill script into multiple sample task modules;
[0109] Determining sample script elements for each of the sample task modules;
[0110] The multiple sample task modules and their corresponding multiple sample script elements are input into a script generation model, and the script generation model is trained so that the loss between the predicted emergency drill script output by the script generation model and the real accident emergency drill script meets the requirements.
[0111] In some embodiments, the training module is further configured to:
[0112] When training a script to generate a model, use at least one of the following methods to perform targeted training:
[0113] Calculate the similarity of accident cases, and take accident cases with similarity higher than a first threshold as a similar accident set. Then, input the sample task modules and their corresponding sample script elements corresponding to the similar accident set into the script generation model for intensive training on accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the accuracy of prediction.
[0114] Similarity calculation is performed on the scripts, and the scripts with similarity higher than the second threshold are regarded as a similar script set. The sample task modules corresponding to the similar script set and their corresponding sample script elements are input into the script generation model for intensive training of the scripts, so as to enhance the sensitivity of the script generation model to the scripts and improve the accuracy of the prediction.
[0115] In some embodiments, the training module is further configured to:
[0116] When training a script to generate a model, use at least one of the following methods to perform targeted training:
[0117] Calculate the correlation degree of accident cases, and take accident cases with a correlation degree higher than the third threshold as a set of related accidents. Then input the sample task modules and their corresponding sample script elements corresponding to the related accident set into the script generation model for intensive training on accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the accuracy of prediction.
[0118] Calculate the correlation degree of the scripts, and take the scripts with correlation degree higher than the fourth threshold as a similar script set. Then input the sample task modules and their corresponding sample script elements corresponding to the related script set into the script generation model for script intensive training, so as to enhance the sensitivity of the script generation model to the script and improve the accuracy of prediction.
[0119] The correlation of the correlation degree includes temporal correlation and / or spatial correlation.
[0120] In some embodiments, the evaluation module 540 is configured to:
[0121] Comparing the initial emergency drill script with the real accident emergency drill script corresponding to the target accident scenario in the database for similarity;
[0122] In response to the similarity between the initial emergency drill script and the real accident emergency drill script being less than a fifth threshold, it is determined that a preset error exists in the initial emergency drill script.
[0123] In some embodiments, the evaluation module 540 is further configured to:
[0124] In response to the similarity between the initial emergency drill script and the real accident emergency drill script being no less than a fifth threshold, the initial emergency drill script is used as a target emergency drill script for the drill.
[0125] In some embodiments, the partitioning module 510 is configured to:
[0126] Based on the time course of the accident, the target accident scenario is divided into multiple target task modules;
[0127] Based on the spatial scenario of emergency rescue, the target task module is divided into multiple subtask modules;
[0128] The target task module includes part or all of the accident incubation stage module, the internal disposal module, the external rescue module, and the emergency termination module; and the multiple subtask modules include at least one of the map submodule, the disaster submodule, the personnel submodule, and the material and equipment submodule.
[0129] Accordingly, the determination module 520 is configured to:
[0130] Determine the target script element of each subtask module of the target task module;
[0131] The acquisition module 530 is used to input the multiple target task modules and their corresponding multiple target script elements into the script generation model, including:
[0132] Combining the multiple target task modules according to the time of the accident, and combining the multiple subtask modules of each target task module and the corresponding multiple target script elements according to the space of the accident to obtain model input information;
[0133] The model input information is input into the script generation model.
[0134] In some embodiments, the multiple subtask modules are divided into flexible replacement submodules and fixed submodules, and the fixed submodules include at least one of an alarm submodule, a plan activation submodule, an alarm receiving submodule, an alarm dispatching submodule and an accident site investigation submodule.
[0135] In some embodiments, the script generation model is based on a self-attention mechanism.
[0136] All modules involved in this embodiment are logical modules. In actual applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, to highlight the innovation of this application, this embodiment does not include units that are not closely related to solving the technical problem proposed by this application. However, this does not mean that other units do not exist in this embodiment.
[0137] According to some embodiments of the present application, an electronic device is provided, such as Figure 6 As shown, it includes: at least one processor 601; and a memory 602 that is communicatively connected to the at least one processor 601; wherein the memory 602 stores instructions that can be executed by the at least one processor 601, and the instructions are executed by the at least one processor 601 to enable the at least one processor 601 to execute the generation method in the above-mentioned embodiments.
[0138] The memory and processor are connected using a bus, which can include any number of interconnected buses and bridges. The bus connects various circuits of one or more processors and memories. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits. These are all well known in the art and are therefore not described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over a wireless medium via an antenna. Furthermore, the antenna receives data and transmits it to the processor.
[0139] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0140] In one example, the electronic device may further include an input device 603 and an output device 604 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0141] In addition, the input device 603 may include, for example, a keyboard, a mouse, and the like.
[0142] The output device 604 can output various information to the outside, including determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0143] Of course, to simplify, Figure 6 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application scenarios.
[0144] According to some embodiments of the present application, a computer-readable storage medium is provided, storing a computer program, which implements the above method embodiments when executed by a processor.
[0145] Computer-readable storage media can be any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0146] Those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a program. The program is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps in the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, and other media that can store program code.
[0147] According to some embodiments of the present application, a computer program product is further provided, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes the above-mentioned generation method.
[0148] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and that in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A scenario-based modular emergency drill script generation method, characterized in that: include: Using the task decomposition method, the target accident scenario of the pre-drill is divided into multiple target task modules according to the accident emergency rescue procedures; Determining target script elements for each target task module, wherein the target script elements include accident scenario evolution elements and emergency rescue task elements; the accident scenario evolution elements include at least one of accident cause elements, accident location elements, accident evolution situation elements, and accident consequence elements; and the emergency rescue task elements include at least one of emergency rescue method elements, emergency rescue personnel elements, and material and equipment elements; Inputting the multiple target task modules and their corresponding multiple target script elements into a trained Transformer architecture script generation model to obtain an initial emergency drill script output by the script generation model; Evaluating the initial emergency drill script includes: comparing the initial emergency drill script with a real accident emergency drill script corresponding to the target accident scenario in a database for similarity; in response to the similarity between the initial emergency drill script and the real accident emergency drill script being less than a fifth threshold, determining that the initial emergency drill script has a preset error; and If the evaluation result indicates that the initial emergency drill script has preset errors, the emergency drill script is revised to obtain a revised emergency drill script, and the revised emergency drill script is used as the target emergency drill script for the drill, wherein the preset errors include at least one of grammatical errors, logical errors, information omissions, and format errors. If the evaluation result indicates that the initial emergency drill script has logical errors, the logical errors are corrected using the fine-tuned designated model to obtain a revised emergency drill script; Among them, new accident cases are reconstructed by fitting accident cases of accident scenarios, and new scripts are generated for the new accident cases. The new accident cases and new scripts are used as training data to train the script generation model, so that more targeted training can be performed on the script generation model when accident cases and scenarios are limited; The training process of the script generation model includes: Establish a database of accident emergency drill scripts; Obtaining real accident emergency drill scripts from the database; The task decomposition method is used to divide the real accident emergency drill script into multiple sample task modules; Determining sample script elements for each of the sample task modules; Inputting the plurality of sample task modules and their corresponding plurality of sample script elements into a script generation model, and training the script generation model so that the loss between the predicted emergency drill script output by the script generation model and the actual accident emergency drill script meets the requirements; In the process of training the script generation model, at least one of the following is used to carry out targeted training: Calculate the correlation degree of accident cases, and take accident cases with a correlation degree higher than the third threshold as a set of related accidents. Then input the sample task modules and their corresponding sample script elements corresponding to the related accident set into the script generation model for intensive training on accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the accuracy of prediction. Calculate the correlation degree of the scripts, and take the scripts with correlation degree higher than the fourth threshold as a similar script set. Then input the sample task modules and their corresponding sample script elements corresponding to the related script set into the script generation model for script intensive training, so as to enhance the sensitivity of the script generation model to the script and improve the accuracy of prediction. The correlation of the correlation degree includes temporal correlation and / or spatial correlation.
2. The method according to claim 1, characterized in that When training a script to generate a model, use at least one of the following methods to perform targeted training: Calculate the similarity of accident cases, and take accident cases with similarity higher than a first threshold as a similar accident set. Then, input the sample task modules and their corresponding sample script elements corresponding to the similar accident set into the script generation model for intensive training on accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the accuracy of prediction. Similarity calculation is performed on the scripts, and the scripts with similarity higher than the second threshold are regarded as a similar script set. The sample task modules corresponding to the similar script set and their corresponding sample script elements are input into the script generation model for intensive training of the scripts, so as to enhance the sensitivity of the script generation model to the scripts and improve the accuracy of the prediction.
3. The method according to claim 1, characterized in that Also includes: In response to the similarity between the initial emergency drill script and the real accident emergency drill script being no less than a fifth threshold, the initial emergency drill script is used as a target emergency drill script for the drill.
4. The method according to claim 1, wherein Using the task decomposition method, the target accident scenario is divided into multiple target task modules according to the accident emergency rescue process, including: Based on the time course of the accident, the target accident scenario is divided into multiple target task modules; Based on the spatial scenario of emergency rescue, the target task module is divided into multiple subtask modules; The target task module includes part or all of the accident incubation stage module, the internal disposal module, the external rescue module, and the emergency termination module; and the multiple subtask modules include at least one of the map submodule, the disaster submodule, the personnel submodule, and the material and equipment submodule. Determining the target script elements of each target task module includes: Determine the target script element of each subtask module of the target task module; The step of inputting the plurality of target task modules and their corresponding plurality of target script elements into the script generation model comprises: Combining the multiple target task modules according to the time of the accident, and combining the multiple subtask modules of each target task module and the corresponding multiple target script elements according to the space of the accident to obtain model input information; The model input information is input into the script generation model.
5. The method according to claim 4, characterized in that The multiple subtask modules are divided into flexible replacement submodules and fixed submodules, and the fixed submodules include at least one of an alarm submodule, a plan activation submodule, an alarm receiving submodule, an alarm dispatching submodule and an accident site investigation submodule.
6. The method according to any one of claims 1 to 5, characterized in that The script generation model is based on the self-attention mechanism.
7. A scenario-based modular emergency drill script generation device, characterized in that: include: A division module is used to divide the target accident scenario of the pre-drill into multiple target task modules according to the accident emergency rescue procedures using the task decomposition method; A determination module is used to determine the target script elements of each target task module, wherein the target script elements include accident scenario evolution elements and emergency rescue task elements; the accident scenario evolution elements include at least one of the accident cause elements, accident location elements, accident evolution situation elements and accident consequence elements, and the emergency rescue task elements include at least one of the emergency rescue method elements, emergency rescue personnel elements, and material and equipment elements; an acquisition module is used to input the multiple target task modules and their corresponding multiple target script elements into a script generation model of a trained Transformer architecture to obtain an initial emergency drill script output by the script generation model; an evaluation module, configured to evaluate the initial emergency drill script, comprising: comparing the initial emergency drill script with a real accident emergency drill script corresponding to the target accident scenario in a database for similarity; and determining that the initial emergency drill script contains a preset error in response to the similarity between the initial emergency drill script and the real accident emergency drill script being less than a fifth threshold; and a correction module, configured to, if an evaluation result indicates that the initial emergency drill script contains preset errors, correct the emergency drill script to obtain a corrected emergency drill script, and use the corrected emergency drill script as a target emergency drill script for the drill, wherein the preset errors include at least one of grammatical errors, logical errors, information omissions, and format errors; wherein, if the evaluation result indicates that the initial emergency drill script contains logical errors, correct the logical errors using a fine-tuned designated model to obtain a corrected emergency drill script; Among them, new accident cases are reconstructed by fitting accident cases of accident scenarios, and new scripts are generated for the new accident cases. The new accident cases and new scripts are used as training data to train the script generation model, so that more targeted training can be performed on the script generation model when accident cases and scenarios are limited; The training process of the script generation model includes: Establish a database of accident emergency drill scripts; Obtaining real accident emergency drill scripts from the database; The task decomposition method is used to divide the real accident emergency drill script into multiple sample task modules; Determining sample script elements for each of the sample task modules; Inputting the plurality of sample task modules and their corresponding plurality of sample script elements into a script generation model, and training the script generation model so that the loss between the predicted emergency drill script output by the script generation model and the actual accident emergency drill script meets the requirements; In the process of training the script generation model, at least one of the following is used to carry out targeted training: Calculate the correlation degree of accident cases, and take accident cases with a correlation degree higher than the third threshold as a set of related accidents. Then input the sample task modules and their corresponding sample script elements corresponding to the related accident set into the script generation model for intensive training on accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the accuracy of prediction. Calculate the correlation degree of the scripts, and take the scripts with correlation degree higher than the fourth threshold as a similar script set. Then input the sample task modules and their corresponding sample script elements corresponding to the related script set into the script generation model for script intensive training, so as to enhance the sensitivity of the script generation model to the script and improve the accuracy of prediction. The correlation of the correlation degree includes temporal correlation and / or spatial correlation.
Citation Information
Patent Citations
Standardized design method for emergency drilling script of emergency
CN111832953A
Training sample generation method and device, computer equipment and storage medium
CN113361629A