Accident modular emergency drill script generation method and device based on scene construction
Through modular design and neural network model, the coal mine accident emergency drill scripts are generated and evaluated, and the problems of low efficiency and insufficient scientificity of manual design in the existing technology are solved, and efficient and scientific emergency drill script generation is achieved to adapt to a variety of accident scenarios.
Patent Information
- Application Number
- CN202510812821.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-06-18
AI Technical Summary
The existing coal mine accident emergency drill scripts rely on manual design, are inefficient and lack scientific nature, cannot fully cover possible accident scenarios, lack modular design, and have low flexibility.
Using a combination of modular design and neural network model, the accident scenario is divided into multiple task modules, script elements are determined, and emergency drill scripts are generated through the script generation model, automated evaluation and correction are performed, and new scenarios are fitted with real accident cases for training.
It improves the generation efficiency and scientificity of emergency drill scripts, can fully cover accident scenarios, ensures the scientific rationality and flexibility of drills, and enhances emergency response capabilities.
Smart Images

Figure CN120335782A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of emergency management, and in particular to a method and device for generating an accident modular emergency drill script based on scenario construction. Background Art
[0002] In the daily safety management of coal mines, conducting personnel evacuation, accident escape, and rescue drills for different accident scenarios has become an important task for improving emergency response capabilities. Scientific and reasonable coal mine accident emergency plans and drills are the basis for improving the safety production level of mines. Through systematic emergency plan formulation and regular drills, not only can the emergency response capabilities of coal mine enterprises be improved, but also the safety awareness and emergency self-rescue capabilities of miners can be enhanced, minimizing the casualties and economic losses caused by accidents. However, there are many problems in the current coal mine accident emergency drills, which restrict the further improvement of drill effects. The script design of traditional coal mine accident emergency drills mostly relies on manual methods, usually written by designers based on their own experience or limited cases. This method is not only inefficient, but also may lead to an unscientific and unreasonable drill script due to insufficient experience or incomplete information of the designers, unable to comprehensively cover all possible accident scenarios. In addition, traditional script writing usually targets a single scenario and lacks a modular design concept, resulting in low flexibility of drill content and difficulty in quickly adjusting and reorganizing according to the actual needs of different coal mines.
[0003] With the continuous improvement of the modernization level of coal mine production, the in-depth application of digital and intelligent technologies provides new possibilities for optimizing accident emergency drills. Based on the modular design concept, combined with intelligent algorithms and big data technologies, 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 requirements. This modular script generation method not only improves the efficiency of script design, but also ensures the scientificity and comprehensiveness of script content. Therefore, developing a modular emergency drill script generation system and method for coal mine accidents can significantly improve the efficiency and effectiveness of emergency drills, provide more efficient and intelligent drill tools for coal mine enterprises, help strengthen coal mine emergency management capabilities, and provide a strong guarantee for mine safety production. Summary of the Invention
[0004] The purpose of the present application is to provide at least a method and device for generating an accident modular emergency drill script based on scenario construction, which can at least solve the problems that the emergency drill script depends on manual design, is inefficient, unscientific and unreasonable, and cannot comprehensively cover all possible accident scenarios.
[0005] In a first aspect, a method for generating an accident modular emergency drill script based on scenario construction is provided, including: Using the task decomposition method, the target accident scenarios for pre-exercise are divided into multiple target task modules according to the accident emergency rescue procedures; determine the target script elements of each of the target task modules, where 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 trend 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; Input the multiple target task modules and their corresponding multiple target script elements into a trained script generation model to obtain an initial emergency exercise script output by the script generation model; Evaluate the initial emergency exercise script; and If the evaluation result indicates that the initial emergency exercise script has a preset error, correct the emergency exercise script to obtain a corrected emergency exercise script, and use the corrected emergency exercise script as the target emergency exercise script for the exercise. The preset errors include at least one of syntax errors, logical errors, information omissions, and format errors. 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 as to perform more targeted training on the script generation model when the accident cases and scenarios are limited.
[0006] In a second aspect, there is provided an accident modular emergency exercise script generation device based on scenario construction, including: A division module, configured to divide the target accident scenarios for pre-exercise into multiple target task modules according to the accident emergency rescue procedures by using the task decomposition method; A determination module, configured to determine the target script elements of each of the target task modules, where 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 trend 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; An acquisition module, configured to input the multiple target task modules and their corresponding multiple target script elements into a trained script generation model to obtain an initial emergency exercise script output by the script generation model; An evaluation module, configured to evaluate the initial emergency exercise script; and A correction module, configured to correct the emergency drill script if the evaluation result indicates that the initial emergency drill script has a preset error, so as to obtain a corrected emergency drill script, and use the corrected emergency drill script as the target emergency drill script for the drill. The preset error includes at least one of syntax errors, logical errors, information omissions, and format errors; 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 as to perform more targeted training on the script generation model when the accident cases and scenarios are limited.
[0007] In a third aspect, an electronic device is provided, including: 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 so that the at least one processor can execute the above method.
[0008] In a fourth aspect, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0009] In a fifth aspect, a computer program product is provided, which includes computer program instructions, and when the computer program instructions are run by a processor, the processor is caused to execute the above method. Description of the Drawings
[0010] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings, and these exemplary illustrations do not limit the embodiments.
[0011] Figure 1 It is a schematic flowchart of a method for generating a modular emergency drill script for accidents based on scenarios in some embodiments of the present application; Figure 2 It is a schematic diagram of the modular division of an accident scenario in some embodiments of the present application; Figure 3 It is a schematic diagram of the modular division of an accident scenario in some embodiments of the present application; Figure 4 It is a schematic diagram of a training method for a script generation model in some embodiments of the present application; Figure 5 It is a block diagram of the composition of a device for generating a modular emergency drill script for accidents based on scenarios in some embodiments of the present application; Figure 6 It is a schematic diagram of the structure of an electronic device in some embodiments of the present application. Detailed Description of the Embodiments
[0012] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will elaborate on each embodiment of this application in conjunction with the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of this application, many technical details are provided to help readers better understand this application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in this application can still be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined and cross-referenced with each other on the premise of no contradiction.
[0013] Accident emergency plans and drills are important means to improve the scientificity and effectiveness of drills and ensure safe production. By formulating and conducting emergency plans, the emergency response capabilities of risk-producing enterprises can be improved, the safety awareness and self-rescue capabilities of staff can be enhanced, and thus the accident losses can be minimized to the greatest extent. Traditional accident emergency drill methods mainly rely on manually designing drill scripts. This method is not only inefficient but also may lead to unscientific and unreasonable drill scripts due to insufficient experience or incomplete information of the designers, and cannot comprehensively cover all possible accident scenarios.
[0014] Based on this, this application proposes a method for generating modular accident emergency drill scripts based on scenario construction. By combining modular design and neural network models, in the script generation model, corresponding emergency drill scripts are generated by inputting modular script elements, and the generated emergency drill scripts are automatically evaluated, which can quickly detect and correct problems such as grammar and logic errors in the emergency scripts, and guide the efficient progress of accident emergency drills. Through modular design, the generated emergency drill scripts are more scientific and reasonable, and can comprehensively cover all possible accident scenarios, thereby improving the realism and effectiveness of emergency drills. The generation method of this application can be used, for example, but not limited to, the generation of emergency drill scripts for coal mining enterprises.
[0015] The following will specifically describe the implementation details of the evaluation method of this application in conjunction with the accompanying drawings and specific embodiments. The following content is only implementation details provided for convenient understanding and is not necessary for implementing this solution.
[0016] The generation method of the embodiments of this application can be applied to electronic devices with communication, computing, and data storage capabilities.
[0017] As Figure 1 shown, in some embodiments of this application, a method for generating modular accident emergency drill scripts based on scenario construction is provided, including: Step S110: Use the task decomposition method to divide the target accident scenario to be pre-drilled into multiple target task modules according to the accident emergency rescue procedure; Step S120: Determine the target script elements for each of the target task modules. 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 trend elements, and accident consequence elements. The emergency rescue task elements include at least one of emergency rescue method elements, emergency rescue personnel elements, and material and equipment elements. 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. Step S140: Evaluate the initial emergency drill script; and Step S150: If the evaluation result indicates that there are preset errors in the initial emergency drill script, then correct the emergency drill script to obtain a corrected emergency drill script, and use the corrected emergency drill script as the target emergency drill script for the drill. The preset errors include at least one of syntax errors, logical errors, information omissions, and format errors.
[0018] In the above method steps, the accident scenario is divided into multiple task modules, and the script elements for each task module are determined respectively (the script elements corresponding to the target task module are also called "target script elements"). These script elements can be divided into two categories, namely: accident scenario evolution elements and emergency rescue task elements. For example, the accident scenario evolution elements can include at least one of accident cause elements, accident location elements, accident evolution trend elements, and accident consequence elements; the emergency rescue task elements can include at least one of emergency rescue method elements, emergency rescue personnel elements, and material and equipment elements. Then, multiple task modules and their corresponding script elements are input into the script generation model to generate the corresponding emergency drill script. Thus, through the combination of modular design and neural network model, the efficiency of script generation can be improved, and the modular design enables the script generation method to comprehensively cover possible accident scenarios. In addition, by automatically evaluating and correcting the emergency drill script, it is beneficial to obtain a scientific and reasonable emergency drill script.
[0019] Among them, new accident cases are reconstructed by fitting the accident cases of the accident scenario, 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 as to conduct more targeted training on the script generation model when the accident cases and scenarios are limited.
[0020] Given that the number of real accident cases may not be sufficient for model training, the present disclosure proposes a method for adding accident cases by fitting based on real accident cases to make up for the deficiency in the amount of training data and improve the accuracy of model prediction. For the newly added accident cases, new scripts can be generated. These new scripts can be determined manually, such as formulating new cases and case scripts through expert opinions.
[0021] The emergency drill script is generated based on the accident scenario (i.e., accident situation). The corresponding emergency drill scripts for different accident scenarios are different. However, after modular design, the task modules included in different accident scenarios are basically the same, but the script elements of different accident scenarios may vary. Taking coal mining enterprises as an example, the accident scenarios include gas explosion, coal dust explosion, fire, water inrush, roof collapse, etc. Even though the accident scenarios are different, according to the time of accident occurrence, the accident scenarios can basically be divided into modules of accident gestation stage, internal disposal module, external rescue module, and emergency end module (as Figure 2 shown), only the script elements of different accident scenarios are different. Therefore, through modular design, all possible accident scenarios can be comprehensively covered.
[0022] As mentioned above, taking coal mining enterprises as an example, the accident situation can include gas explosion, coal dust explosion, fire, water inrush, roof collapse, etc. For other production enterprises, they also have corresponding accident situations, which will not be listed one by one here.
[0023] In some embodiments, for the coal mining industry, the scenario script can include the disaster state information and the disaster state change information of the coal mine accident scenario on the time axis.
[0024] 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: Based on the time process of the accident occurrence, dividing the target accident scenario into multiple target task modules.
[0025] As mentioned above, according to the time process of the accident occurrence, the accident scenario can be divided into modules of accident gestation stage, internal disposal module, external rescue module, and emergency end module. It can be understood that for different accident situations, it can also be divided into some of the modules of accident gestation stage, internal disposal module, external rescue module, and emergency end module. It can be understood that the accident scenario can also be modularly designed in other ways.
[0026] 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 accident occurrence 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 accident occurrence to form a description of the overall target accident scenario, so that the script generation model can consider the logical relationships between various modules and elements and generate a more scientific and reasonable emergency drill script.
[0027] For the target script elements of the target task module, the accident-causing elements of different accidents are different, and the accident-causing elements of the same accident also vary.
[0028] Regarding the accident scenario evolution elements: For different accident scenarios, multiple accident-causing elements need to be selected from multiple perspectives and levels, and then combined pairwise to determine the final accident-causing elements. The accident location elements can include, for example, equipment, personnel, distress situations, etc. Select the accident occurrence location from the accident location, and then determine various equipment, staff members, and the distress situations of personnel after the accident that should be present at the accident location. The accident evolution trend elements can include, for example, the scale of the accident, the emergency objects, etc. Small-scale accidents can be handled by the internal forces of the enterprise, while large-scale accidents can be handled by requesting external rescue forces. For the accident consequence elements, different accident consequences caused during the rescue process, such as poisoning and burns caused by high temperatures, asphyxiation caused by damage to ventilation facilities, and personnel being trapped caused by damage to support structures, etc., can be selected as the accident consequence types. Different accident scales result in different degrees (injury and loss degrees) of accident consequences, and the emergency response methods are also different.
[0029] Regarding the emergency rescue task elements: The emergency rescue method elements can include specific rescue measures and route guidelines for implementing emergency rescue. The emergency rescue personnel elements include the organizations and personnel compositions and distributions participating in the emergency rescue. The material and equipment elements include the types and quantities of materials used in the emergency rescue and the equipment required for specific rescues.
[0030] In some embodiments, the target task module can be further divided into multiple second-level sub-task modules. In this case, the target script elements of each sub-task module can be clarified, including elements such as people, objects, equipment, fixed actions, and flexible actions, making it more flexible and improving the modular design efficiency. Further, the multiple sub-task modules can be divided into flexible replacement sub-modules and fixed sub-modules. Fixed sub-modules can be directly added during module design. Fixed sub-modules have generality, reducing the modular design difficulty and improving the efficiency.
[0031] Exemplarily, based on the space for emergency rescue, the target task module can be divided into multiple sub-task modules, and the multiple sub-task modules can include at least one of a map sub-module, a disaster sub-module, a personnel sub-module, and a material and equipment sub-module. Taking a coal mine enterprise as an example, the map sub-module can include several types of modular roadways such as drivage roadways, longwall faces, and general roadways; the disaster sub-module can include three types of modules: gas explosion, roof accident, and fire accident; the personnel sub-module can include three types of modules: staff, management personnel, and rescue personnel; the equipment sub-module can include three types of modules: production equipment, life-essential equipment, and rescue equipment. The four sub-task modules are independent of each other to realize the modular system of the emergency rescue drill scenario. Each sub-task module and its corresponding target script elements can be designed based on a specific accident scenario. For example, for the accident gestation stage module, the map sub-module can be designed to include an initial scene sub-module and a hidden danger scene sub-module, and the accident location script elements of the initial scene sub-module can be designed, including on-site personnel, equipment, and work location. The hidden danger factors (such as accident location elements) of the hidden danger scene sub-module can be set according to the specific accident situation.
[0032] The fixed sub-module can, for example, include at least one of an alarm sub-module, a start-up plan sub-module, an alarm receiving sub-module, a dispatch sub-module, and an accident location investigation sub-module.
[0033] In some embodiments of the present application, using the task decomposition method, the target accident scenario is divided into multiple target task modules according to the accident emergency rescue procedure, including: dividing the target accident scenario into multiple target task modules based on the time process of the accident occurrence; dividing the target task modules into multiple subtask modules based on the spatial scenario of the emergency rescue. Among them, the target task modules include some or all of the accident gestation stage module, internal disposal module, external rescue module, and emergency end module, and the multiple subtask modules include at least one of the map subtask module, disaster subtask module, personnel subtask module, and material and equipment subtask module. In this case, determining the target script elements of each target task module includes: determining the target script elements of each subtask module of the target task module. Correspondingly, 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 occurrence, and combining the multiple subtask modules and their corresponding multiple target script elements of each target task according to the space of the accident occurrence to obtain model input information; inputting the model input information into the script generation model. Thus, it is possible to decompose and classify the target accident scenario, analyze each scenario element, clarify the content, scenario parameters, and granular elements of each module of the accident scenario construction, classify the scenario element categories, set the granular content such as personnel and equipment, and find the dynamic nodes; then divide the accident stage into multiple modules at the first and second levels according to the time of the accident occurrence and the space of the emergency rescue, determine the script elements of each module, clarify the content such as people, objects, equipment, fixed modules, and flexible modules in the system, and make each module and each element be 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.
[0034] The following will illustrate the method for dividing the modules of the target accident scenario in conjunction with an exemplary embodiment.
[0035] Such as Figure 3As shown in the figure, taking a coal mine enterprise as an example, the target accident scenario can be divided into an accident incubation stage module, an internal disposal module, an external rescue module and an emergency end module according to the time process of the accident. Each module is divided into multiple subtask modules at the second level according to the space of the emergency plan, specifically: the accident incubation stage module is divided into two map submodules, the initial scene submodule and the hidden danger scene submodule. The accident location script elements of the initial scene submodule include on-site personnel, equipment and work location. The hidden danger scene submodule is designed according to the specific accident situation. The hidden danger factors (such as accident location elements) of the hidden danger scene submodule are set. The personnel submodule of the internal disposal module includes the on-site disaster avoidance submodule, and the accident location script elements of the on-site disaster avoidance submodule include protecting one's own safety, etc. The disaster submodule of the internal disposal module includes the information reporting submodule, and the accident stage elements of the information reporting submodule include dispatch room reporting, etc. The personnel submodule of the internal disposal module can also include the plan initiation submodule, the alarm receiving submodule, the alarm dispatching submodule, and the mine investigation submodule. The accident location element of the plan initiation submodule includes the mine manager issuing instructions, and the accident location element of the alarm receiving submodule and the alarm dispatching submodule includes the handling alarm telephone. The accident location element of the mine investigation submodule includes the establishment of an on-site rescue base. The equipment submodule of the internal disposal module can include the internal emergency disposal submodule, and the accident location element of the external emergency disposal submodule can include ventilation equipment, fire extinguishing equipment, etc. The personnel submodule of the external rescue module can include the group emergency plan initiation submodule, the alarm submodule, the alarm receiving submodule, the alarm dispatching submodule, and the mine investigation submodule. The accident location element of the group emergency plan initiation submodule includes the transfer of command authority, the accident location element of the alarm submodule includes the report of the guardian, the accident location element of the alarm receiving submodule and the alarm dispatching submodule includes the gathering after hearing the alarm, and the accident location element of the mine investigation submodule includes the receipt of the rescue mission. The material equipment submodule of the external rescue module can include the external emergency disposal submodule, and the accident location element of the external emergency disposal submodule can include the closed working face equipment, nitrogen injection fire extinguishing equipment, etc. The alarm receiving submodule and the alarm dispatching submodule can be combined into one 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 the team submodule.
[0036] The multiple subtask modules can be divided into flexible replacement submodules and fixed submodules. The fixed submodules can include alarm submodules, plan initiation submodules, alarm receiving submodules, alarm dispatching submodules and well entry detection submodules. The multiple 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: Step S410: Establishing a database of accident emergency drill scripts; Step S420: Obtain the real accident emergency drill script from the database; Step S430: Use the task decomposition method to divide the real accident emergency drill script into multiple sample task modules; Step S440: Determine the sample script elements of each sample task module; Step S450: Input multiple sample task modules and their corresponding multiple sample script elements into the 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.
[0037] 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, making the predicted emergency drill script close to the real emergency drill script.
[0038] In some embodiments, taking a coal mine enterprise as an example, according to the collected real coal mine accident emergency drill guiding documents and related drill cases, a word segmentation tool can be used to preliminarily screen the real accident case emergency drill script, remove the repeatedly appearing coal mine accident emergency drill scripts, and construct a coal mine accident emergency drill script database. It can be understood that for other production enterprises, a similar method can be used to construct the database of accident emergency drill scripts.
[0039] Among them, the method for dividing the modules of the real accident emergency drill script and the method for determining the script elements are similar to the relevant methods for the target accident scenario described above, and will not be elaborated here.
[0040] According to the database of the accident emergency drill script, generate the model sample input information through the emergency rescue drill scenario modular system, and train the script generation model of the emergency rescue drill script based on the model sample input information. For example, the script elements of a coal mine gas explosion accident, such as accident cause elements: gas explosion caused by gas outburst; accident location elements: the working face No. 5 underground in the east area of the coal mine; accident stage elements: the explosion blocked two roadways and many people were injured; accident consequence elements: 5 people were trapped and 2 people were slightly injured; the script elements of fixed sub-modules (such as the alarm sub-module, external rescue sub-module, and in-well reconnaissance sub-module). After structuring this information, input it into the script generation model.
[0041] In some embodiments, the script generation model mainly adopts the Transformer architecture as the core algorithm. Through the multi-head attention operation on the input information of the model samples, the relationships between the input features are captured and natural language text is generated. First, the neural network model converts the script elements into text or structured input formats, and then uses a tokenizer to decompose the input text into word units and convert them into vectors. The relevance of each word in the input sequence to other words is calculated through the self-attention mechanism.
[0042]
[0043] Q is the query vector, K is the key vector, V is the value vector, is the dimension of the vector, is K the transposed vector of.
[0044] Subsequently, the decoder is used to predict the next word based on the previously generated text. During the decoding process, Masked Self-Attention is used to ensure that only the previously generated content is attended to. The loss (such as cross-entropy loss) between the generated text (i.e., the predicted emergency drill script) and the target text (the real accident emergency drill script) is minimized to optimize the text and form a preliminary emergency drill script.
[0045] In some embodiments, during the process of training the script generation model, at least one of the following is adopted for targeted training: Calculate the similarity for accident cases. Accidents with a similarity higher than the first threshold are taken as a set of similar accidents, and the sample task modules and their corresponding sample script elements corresponding to the set of similar accidents are centrally input into the script generation model for enhanced training of accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the prediction accuracy; Calculate the similarity for scripts. Scripts with a similarity higher than the second threshold are taken as a set of similar scripts, and the sample task modules and their corresponding sample script elements corresponding to the set of similar scripts are centrally input into the script generation model for enhanced training of scripts, so as to enhance the sensitivity of the script generation model to scripts and improve the prediction accuracy.
[0046] Thus, the sensitivity of the script generation model to accident scenarios can be enhanced and the prediction accuracy can be improved, and / or the sensitivity of the script generation model to scripts can be enhanced and the prediction accuracy can be improved.
[0047] The accident cases in the above method embodiments can be real accident cases in the database of accident emergency drill scripts, or new accident cases reconstructed through a fitting algorithm.
[0048] For example, the similarity between accident cases and / or scripts can be calculated by cosine similarity, Euclidean distance, or Manhattan distance.
[0049] 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.
[0050] In some other embodiments, during 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 for accident cases, take the accidents with a correlation degree higher than the third threshold value as an associated accident set, and input the sample task modules corresponding to the associated accident set and their corresponding sample script elements into the script generation model for accident reinforcement training, so as to enhance the sensitivity of the script generation model to accidents and improve the prediction accuracy; Calculate the correlation degree for scripts, take the scripts with a correlation degree higher than the fourth threshold value as a similar script set, and input the sample task modules corresponding to the associated script set and their corresponding sample script elements into the script generation model for script reinforcement training, so as to enhance the sensitivity of the script generation model to scripts and improve the prediction accuracy.
[0051] Among them, the association in the correlation degree includes temporal association and / or spatial association.
[0052] For example, for temporal association, accident cases that are close in time can be taken as an associated accident set, and the temporal correlation degree can be determined, for example, based on the difference between the occurrence times of each accident. For another example, for spatial association, accident cases that are close in space can be taken as an associated accident set, and the spatial correlation degree can be determined, for example, based on the distance between each accident. Of course, temporal association and spatial association can also be combined, and in this case, multiple accidents that are close in time and close in space can be taken as an associated accident set. Similarly, those skilled in the art should understand that the "threshold value" mentioned here is not a specific fixed value, but a value that can be changed and adjusted.
[0053] Thus, it is also possible to enhance the sensitivity of the script generation model to accident scenarios and improve the prediction accuracy, and / or enhance the sensitivity of the script generation model to scripts and improve the prediction accuracy.
[0054] It can be understood that the two above-mentioned method embodiments can also be combined to carry out targeted training on the script generation model, which can further enhance the sensitivity of the script generation model to accident scenarios and improve the prediction accuracy, and / or enhance the sensitivity of the script generation model to scripts and improve the prediction accuracy.
[0055] Considering that the number of real accident cases of a certain type of production enterprise is small, the real accident cases of all types of production enterprises can also be used to pre-train the script generation model to obtain an initial script generation model. When applied to a certain type of production enterprise, the real accident cases of this type of production enterprise can be used to fine-tune the script generation model so that the obtained script generation model can generate more accurate emergency drill scripts for this type of production enterprise. During the fine-tuning process, the above method embodiments can be used to conduct targeted training on the script generation model.
[0056] In some embodiments, the real accident emergency drill scripts in the database of coal mine accident emergency drill scripts can be classified according to accident scenario types. 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 to evaluate the initial emergency drill script. That is to say, evaluating the initial emergency drill script includes: Comparing the similarity between the initial emergency drill script and the real accident emergency drill script corresponding to the target accident scenario in the database; If the similarity between the initial emergency drill script and the real accident emergency drill script is less than the fifth threshold, it is determined that the initial emergency drill script has a preset error, and the preset error includes at least one of syntax error, logical error, information omission, and format error.
[0057] Thus, it is possible to determine whether the initial emergency drill script has a preset error based on the similarity comparison, and timely correct the initial emergency drill script with errors to make it more scientific and reasonable.
[0058] Exemplarily, if the similarity between the initial emergency drill script and the real accident emergency drill script is less than the fifth threshold, predefined rules are used to check and correct the script. For example, if syntax and spelling errors such as "Dispatch the rescue team to enter the mine with life detectors, and confirm the specific location of the trapped personnel" are found in the script, the SpaCy tool is used to detect grammar, spelling, and punctuation errors in the script, and it is modified to "Dispatch the rescue team to enter the mine with life detectors and confirm the specific location of the trapped personnel" through Python and checked by a dedicated script verification framework; if logical errors, information omissions, or format problems such as "Before the accident, arrange a team to arrive at the accident site and provide timely treatment" are found in the emergency script, the fine-tuned OpenAI API model is used to modify it to "After the accident, arrange a medical team to arrive at the accident site and provide timely treatment", and finally a coal mine explosion accident emergency drill script consistent with industry specifications is generated to guide the efficient conduct of coal mine accident emergency drills.
[0059] 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.
[0060] In some embodiments, if the similarity between the initial emergency drill script and the real accident emergency drill script is not less than the fifth threshold, the initial emergency drill script is used as the target emergency drill script for the drill and is directly used.
[0061] Exemplarily, according to different accident types, the 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 water disaster accident scenario emergency drill scripts, and electromechanical accident scenario emergency drill scripts. The real accident emergency drill scripts in the database can be divided based on these accident scenario types.
[0062] The emergency drill script generation method in the embodiments of the present application can establish an emergency drill model according to the accident emergency drill guidance document and relevant drill cases, generate corresponding emergency drill scripts by inputting modular script elements, guide the efficient progress of accident emergency drills, can adapt to a variety of different accident drill scenarios, and can quickly adjust and reorganize the emergency scripts according to the actual needs of different production enterprises. In addition, it can also automatically evaluate the generated emergency drill scripts, quickly discover and correct problems such as grammar and logical errors in the emergency scripts, and ensure the correctness of the emergency drill scripts.
[0063] As Figure 5 shown, in some embodiments of the present application, a modular accident emergency drill script generation device 500 based on scenario construction is provided for executing the steps in the foregoing method embodiments. The modular accident emergency drill script generation device 500 includes: A division module 510 for dividing the target accident scenario to be pre-drilled into a plurality of target task modules according to the accident emergency rescue procedure by using the task decomposition method; A determination module 520 for determining the target script elements of each of the target task modules, where 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 trend 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; An acquisition module 530 for 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; An evaluation module 540 for evaluating the initial emergency drill script; and A correction module 550 for correcting the emergency drill script to obtain a corrected emergency drill script and using the corrected emergency drill script as the target emergency drill script for the drill if the evaluation result indicates that the initial emergency drill script has a preset error, where the preset error includes at least one of syntax error, logic error, information omission, and format error; Wherein, 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 as to perform more targeted training on the script generation model when the accident cases and scenarios are limited.
[0064] In some embodiments, the above-mentioned accident modular emergency drill script generation device based on scenario construction further includes a training module for: Establish a database of accident emergency drill scripts; Obtain real accident emergency drill scripts from the database; Use the task decomposition method to divide the real accident emergency drill script into multiple sample task modules; Determine the sample script elements of each of the sample task modules; Input the multiple sample task modules and their corresponding multiple sample script elements into the 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.
[0065] In some embodiments, the training module is further used for: During the process of training the script generation model, at least one of the following is used to carry out targeted training: Calculate the similarity for accident cases, use the accident cases with similarity higher than the first threshold as a set of similar accident cases, and input the sample task modules corresponding to the set of similar accident cases and their corresponding sample script elements into the script generation model for intensive training of accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the accuracy of prediction; Calculate the similarity for scripts, use the scripts with similarity higher than the second threshold as a set of similar scripts, and input the sample task modules corresponding to the set of similar scripts and their corresponding sample script elements into the script generation model for intensive training of scripts, so as to enhance the sensitivity of the script generation model to scripts and improve the accuracy of prediction.
[0066] In some embodiments, the training module is further used for: During the process of training the script generation model, at least one of the following is adopted to carry out targeted training: Calculate the correlation degree for accident cases, use the accident cases with a correlation degree higher than the third threshold as an associated accident set, and input the sample task modules corresponding to the associated accident set and their corresponding sample script elements into the script generation model for reinforcement training of accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the accuracy of prediction; Calculate the correlation degree for scripts, use the scripts with a correlation degree higher than the fourth threshold as a similar script set, and input the sample task modules corresponding to the associated script set and their corresponding sample script elements into the script generation model for reinforcement training of scripts, so as to enhance the sensitivity of the script generation model to scripts and improve the accuracy of prediction, Among them, the correlation of the correlation degree includes temporal correlation and / or spatial correlation.
[0067] In some embodiments, the evaluation module 540 is used for: Compare the similarity between the initial emergency drill script and the real accident emergency drill script corresponding to the target accident scenario in the database; In response to the similarity between the initial emergency drill script and the real accident emergency drill script being less than the fifth threshold, determine that there is a preset error in the initial emergency drill script.
[0068] In some embodiments, the evaluation module 540 is further used for: In response to the similarity between the initial emergency drill script and the real accident emergency drill script being not less than the fifth threshold, use the initial emergency drill script as the target emergency drill script for the drill.
[0069] In some embodiments, the division module 510 is used for: Based on the time process of the accident occurrence, divide the target accident scenario into multiple target task modules; Based on the spatial scenario of the emergency rescue, divide the target task module into multiple subtask modules; Among them, the target task module includes some or all of the accident gestation stage module, internal disposal module, external rescue module and emergency end module, and the multiple subtask modules include at least one of the map subtask module, disaster subtask module, personnel subtask module and material equipment subtask module; Correspondingly, the determination module 520 is used for: Determine the target script elements of each subtask module of the target task module; Among them, the obtaining module 530 is configured to input the multiple target task modules and their corresponding multiple target script elements into a script generation model, including: Combining the multiple target task modules according to the time of accident occurrence, and combining the multiple subtask modules and their corresponding multiple target script elements of each target task module according to the space of accident occurrence to obtain model input information; Inputting the model input information into the script generation model.
[0070] 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 start-up plan submodule, a police receiving submodule, a police dispatch submodule, and an accident location investigation submodule.
[0071] In some embodiments, the script generation model is based on a self-attention mechanism.
[0072] Each module involved in this embodiment is a logical module. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or implemented by a combination of multiple physical units. In addition, to highlight the innovative part of this application, units not closely related to solving the technical problems proposed in this application are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
[0073] According to some embodiments of the present application, an electronic device is provided, as Figure 6 shown, including: at least one processor 601; and a memory 602 communicatively connected to the at least one processor 601; wherein, the memory 602 stores instructions executable 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 embodiments.
[0074] Among them, the memory and the processor are connected by a bus. The bus can include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, so they will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be an element or multiple elements, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on the transmission medium. The data processed by the processor is transmitted over the wireless medium through the antenna. Further, the antenna also receives data and transmits the data to the processor.
[0075] 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. The memory can be used to store data used by the processor during operation.
[0076] In one example, the electronic device may further include: an input device 603 and an output device 604, which are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0077] In addition, the input device 603 may include, for example, a keyboard, a mouse, and so on.
[0078] The output device 604 can output various information to the outside, including the determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, and so on.
[0079] Of course, for simplicity, Figure 6 only some of the components related to the present disclosure in the electronic device are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, according to specific application scenarios, the electronic device may further include any other appropriate components.
[0080] According to some embodiments of the present application, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the above method embodiments are implemented.
[0081] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0082] Those skilled in the art can understand that all or part of the steps in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. This program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.
[0083] In some embodiments according to the present application, a computer program product is further provided, which includes computer program instructions. When the computer program instructions are run by a processor, the processor is caused to execute the above-mentioned generation method.
[0084] Those of ordinary skill in the art can understand that the above embodiments are specific embodiments for implementing the present application. In actual applications, various changes can be made in form and details without departing from the spirit and scope of the present application.
Claims
1. A method for generating an accident modular emergency drill script based on scenario construction, characterized in that, Including: Using the task decomposition method to divide the target accident scenarios of the pre - drill into multiple target task modules according to the accident emergency rescue procedures; Determining the target script elements of each of the said target task modules, where 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 trend 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 script generation model to obtain an initial emergency drill script output by the script generation model; Evaluating the initial emergency drill script; And If the evaluation result indicates that the initial emergency drill script has a preset error, then correcting the emergency drill script to obtain a corrected emergency drill script, and using the corrected emergency drill script as the target emergency drill script for the drill. The preset error includes at least one of syntax errors, logical errors, information omissions, and format errors. 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 as to conduct more targeted training on the script generation model when the accident cases and scenarios are limited.
2. The method according to claim 1, wherein The training process of the script generation model includes: Establishing a database of accident emergency drill scripts; Obtaining real accident emergency drill scripts from the database; Using the task decomposition method to divide the real accident emergency drill scripts into multiple sample task modules; Determining the sample script elements of each of the said sample task modules; Inputting the multiple sample task modules and their corresponding multiple sample script elements into the script generation model to 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.
3. The method according to claim 2, wherein During the process of training the script generation model, at least one of the following is used to carry out targeted training: Calculating the similarity of accident cases, taking the accident cases with similarity higher than the first threshold as a set of similar accident cases, and inputting the sample task modules corresponding to the set of similar accident cases and their corresponding sample script elements into the script generation model for intensive training of accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the accuracy of prediction; Calculating the similarity of scripts, taking the scripts with similarity higher than the second threshold as a set of similar scripts, and inputting the sample task modules corresponding to the set of similar scripts and their corresponding sample script elements into the script generation model for intensive training of scripts, so as to enhance the sensitivity of the script generation model to scripts and improve the accuracy of prediction.
4. The method according to claim 2, wherein During 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 for accident cases, take the accident cases with a correlation degree higher than the third threshold as an associated accident set, and input the sample task modules corresponding to the associated accident set and their corresponding sample script elements into the script generation model for enhanced training of accidents, so as to enhance the sensitivity of the script generation model to accidents and improve the prediction accuracy; Calculate the correlation degree for scripts, take the scripts with a correlation degree higher than the fourth threshold as a set of similar scripts, and input the sample task modules corresponding to the associated script set and their corresponding sample script elements into the script generation model for enhanced training of scripts, so as to enhance the sensitivity of the script generation model to scripts and improve the prediction accuracy. Among them, the correlation of the correlation degree includes temporal correlation and / or spatial correlation.
5. The method according to claim 2, wherein Evaluate the initial emergency drill script, including: Compare the similarity between the initial emergency drill script and the real accident emergency drill script corresponding to the target accident scenario in the database; In response to the similarity between the initial emergency drill script and the real accident emergency drill script being less than the fifth threshold, determine that there is a preset error in the initial emergency drill script.
6. The method according to claim 5, wherein It also includes: In response to the similarity between the initial emergency drill script and the real accident emergency drill script being not less than the fifth threshold, use the initial emergency drill script as the target emergency drill script for the drill.
7. The method according to claim 1, wherein Using the task decomposition method to divide the target accident scenario into multiple target task modules according to the accident emergency rescue process, including: Based on the time process of the accident occurrence, divide the target accident scenario into multiple target task modules; Based on the spatial scene of the emergency rescue, divide the target task module into multiple subtask modules; Among them, the target task module includes some or all of the accident gestation stage module, internal disposal module, external rescue module, and emergency end module, and the multiple subtask modules include at least one of the map subtask module, disaster subtask module, personnel subtask module, and material and equipment subtask module; Among them, determining the target script elements of each target task module includes: Determine the target script elements of each subtask module of the target task module; Among them, 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 accident occurrence, and combining the multiple subtask modules and their corresponding multiple target script elements of each target task module according to the space of accident occurrence to obtain model input information; Input the model input information into the script generation model.
8. The method according to claim 7, wherein The multiple subtask modules are divided into flexible replacement subtask modules and fixed subtask modules, and the fixed subtask modules include at least one of the alarm subtask module, start pre - plan subtask module, alarm receiving subtask module, dispatch subtask module, and accident location investigation subtask module.
9. The method according to any one of claims 1-8, characterized in that, The script generation model is based on the self - attention mechanism.
10. An accident modular emergency drill script generation device based on scenario construction, characterized in that, It includes: A division module for using the task decomposition method to divide the target accident scenario to be pre - drilled into multiple target task modules according to the accident emergency rescue procedure; A determination module, configured to determine the target script elements of each of the target task modules, where 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 causation elements, accident location elements, accident evolution trend 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; an acquisition module, configured to input the multiple target task modules and their corresponding multiple target script elements into a trained script generation model to obtain an initial emergency drill script output by the script generation model; An evaluation module, configured to evaluate the initial emergency drill script; And A correction module, configured to, if the evaluation result indicates that the initial emergency drill script has a preset error, correct the emergency drill script to obtain a corrected emergency drill script, and use the corrected emergency drill script as the target emergency drill script for the drill, where the preset error includes at least one of syntax errors, logical errors, information omissions, and format errors; Wherein, new accident cases are reconstructed by fitting accident cases of accident scenarios, and new scripts are generated for the new accident cases, and the new accident cases and new scripts are used as training data to train the script generation model, so as to perform more targeted training on the script generation model in the case of limited accident cases and scenarios.
Citation Information
Patent Citations
Accident emergency deduction working structure
CN105139711A
Rapid emergency assessment and decision-making method for water pollution accidents based on deep learning
CN107798467A
Electric power emergency drilling and deducing system based on scene construction
CN108230805A
Standardized design method for emergency drilling script of emergency
CN111832953A
Training sample generation method and device, computer equipment and storage medium
CN113361629A