Emergency plan generation method and system based on retrieval enhancement and large model, and storage medium

By combining retrieval enhancement and large-scale modeling methods, an emergency response plan knowledge vector base and a multi-model collaborative system are constructed. This solves the problems of dynamic adaptability, professionalism, and human-computer interaction in existing emergency response plan generation systems, and achieves efficient and professional emergency response plan generation, applicable to emergency responses in multiple industries and for multiple event types.

CN121996736APending Publication Date: 2026-05-08TIANJIN ACAD OF TRANSPORTATION SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN ACAD OF TRANSPORTATION SCI
Filing Date
2025-12-18
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing emergency response plan generation systems lack dynamic adaptability, have insufficient professional content, lack human-computer interaction optimization, and suffer from chaotic information organization, resulting in generated plans that fail to meet the real-time needs of emergencies and industry standards.

Method used

By employing a retrieval enhancement and large-scale model approach, combined with the RAG mechanism and multi-model LLM collaboration, we construct a knowledge structure parsing system for emergency plans, intelligent reinforcement during the generation process, human-computer interaction correction of subjective issues, and logical optimization of the document content. Through a knowledge vector base, multi-model outline generation, human-computer interaction revision, and logical optimization, we achieve intelligent generation of emergency plans.

Benefits of technology

It improves the efficiency, accuracy, and professionalism of emergency response plan generation, making it suitable for rapid response needs across multiple industries and event types, and ensuring the logical consistency and executability of the generated content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996736A_ABST
    Figure CN121996736A_ABST
Patent Text Reader

Abstract

The invention relates to an emergency plan generation method based on retrieval enhancement and a large model. The emergency plan generation method comprises the following steps: S1, constructing an emergency plan knowledge vector library; s2, generating a plan outline; s3, optimizing a plan outline; s4, recognizing a subjective problem; s5, carrying out manual interaction revision; and S6, generating an emergency plan text. The invention further relates to an emergency plan generation system based on retrieval enhancement and the large model and a storage medium. The method has the advantages of high efficiency, specialty, intelligence and the like, an automatic workflow with retrieval enhancement generation as a core is constructed by combining an RAG technology and LLM, and the whole process of plan analysis, outline generation, problem recognition, man-machine interaction, text generation and unified optimization is covered. The whole system greatly improves the intelligent level and the generation efficiency of emergency plan compiling, and is suitable for the rapid response requirements of plans of multiple industries and multiple event types.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of emergency management technology, specifically relating to an emergency plan generation method, system, and storage medium based on retrieval enhancement and large model. Background Technology

[0002] Emergency response plans are crucial command documents for responding to emergencies. They serve as the foundation for government departments, enterprises, and institutions to organize, command, allocate resources, report information, and handle on-site emergencies such as disasters, accidents, public health incidents, and other urgent situations. A complete emergency response plan typically includes multiple parts such as organizational structure, response levels, handling procedures, communication and resource support, and its development requires combining information from multiple sources, including laws and standards, industry norms, the organization's actual conditions, and historical cases. High-quality emergency response plans can significantly improve the speed and efficiency of responding to emergencies and are a key component in the construction of a modern emergency management system. Existing emergency response plan generation systems are generally based on the following three technical frameworks: 1. Rule-based and template-based emergency plan generation system: This type of system relies on predefined emergency plan templates and rule bases to generate plans through structured data matching. It is simple to implement and suitable for scenarios with a high degree of standardization. However, the rules have poor extensibility and are difficult to adapt quickly to complex or new types of emergencies. At the same time, the rule base has high maintenance costs and updates lag behind actual needs.

[0003] 2. Knowledge Graph-Based Emergency Response Reasoning System: This method uses a structured knowledge graph to associate events, resources, and response plans, reasoning and generating standardized emergency procedures. It boasts strong logic, supports multi-dimensional reasoning, and improves the accuracy of emergency response. However, it relies on high-quality structured data, resulting in high construction and maintenance costs. Furthermore, it lacks natural language interaction capabilities, leading to poor readability of the generated emergency response plans.

[0004] 3. LLM-based emergency plan generation method: This method utilizes pre-trained language models (such as GPT and BERT) to generate emergency plan texts in natural language. It can automatically generate long texts, reducing manual writing workload and improving the efficiency of emergency plan development. However, the generated content lacks specificity, is prone to logical errors or non-compliance with industry standards, and the results generated by a single model are uncontrollable, making it difficult to optimize by combining multi-source knowledge.

[0005] In summary, the above-mentioned technologies have the following problems: 1. Lack of dynamic adaptability: Rule-based and template-based systems are too static and cannot meet the needs of real-time evolution of emergencies and cross-domain collaboration. 2. Lack of professional content: Although existing LLMs have text generation capabilities, they lack knowledge support in the field of emergency management, and the output content often lacks industry relevance, logic and feasibility. 3. Lack of human-computer interaction optimization: Most existing systems lack manual review and correction processes, which may cause contingency plans to deviate from actual scenario requirements and reduce executability.

[0006] 4. Disorganized information: Inconsistent logic and unclear structure are prone to occur during multiple rounds of generation, affecting the coherence and readability of the plan. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide an emergency plan generation method, system and storage medium based on retrieval enhancement and large model. By combining the RAG mechanism and multi-model LLM collaboration, it can realize the structured analysis of emergency knowledge, intelligent reinforcement of the generation process, human-computer interaction correction of subjective issues and logical optimization of the manuscript content, and comprehensively improve the efficiency, accuracy and professionalism of emergency plan preparation.

[0008] The technical problem solved by this invention is achieved through the following technical solution: An emergency response plan generation method based on retrieval enhancement and large model, the method comprising the following steps: S1. Construct an emergency response plan knowledge vector base: Compile the plan structure specifications and background information of the formulating unit into a dataset; call the Embedding model to vectorize the text of the dataset, construct a knowledge vector base, and use the knowledge vector base for subsequent retrieval enhancement generation processes; S2. Generate Emergency Plan Outline: Through user input or system preset, clarify the direction of emergency plan development. The development direction includes emergency plan type (comprehensive emergency plan, special emergency plan, on-site response plan), type of event to be dealt with (natural disaster, fire, public health event), and industry category. Under the RAGFlow workflow framework, call multiple different types of LLMs to allocate the generation task of the emergency plan structure and obtain the draft emergency plan outline generated by each model. S3. Optimize the outline: Adjust and optimize the generated outline file according to actual needs, and output a clear draft outline. S4. Identify subjective issues: Analyze the emergency plan outline by calling multiple different types of LLMs, extract subjective issues, and then select an LLM with excellent information integration capabilities to comprehensively process the subjective issues extracted by each model, forming a complete and well-structured "List of Subjective Issues". S5. Perform manual interactive revisions: Display the "List of Subjective Questions" generated by the system through an interactive user interface for users to review and confirm item by item; based on the user's actual situation and combined with an adaptive filling mechanism, guide the user to gradually respond to each subjective question; store the interactive Q&A content between the user and the system in a structured table format to form an interaction record for subsequent text generation model to call and reference; S6. Generating the Emergency Response Plan Text: Based on the emergency response plan outline, subjective questions, and their human responses, the emergency response plan is divided into chapters to provide logical structural support for the subsequent generation of the main text. Then, for each chapter, multiple LLMs are invoked, keywords and prompts are set to guide the model to read relevant knowledge content and generate the corresponding chapter's text. Next, an LLM with language summarization and content integration capabilities is selected to optimize and merge the text of each chapter, ensuring consistency in logic, structure, and expression. These steps are repeated until all chapters of the entire emergency response plan are generated. Finally, an LLM with global logical organization and language polishing capabilities is used to uniformly summarize, optimize language, and unify style of the overall draft, improving the final text's fluency and professionalism.

[0009] Furthermore, the vectorization of the embedding model of S1 is specifically as follows: Let the original text corpus be... By embedding functions Each text fragment is mapped to a semantic vector in a high-dimensional vector space: ; in: Represents the vectorized first... i The semantic representation of the text is in the form of d A 3D real-valued vector, capturing its semantic features; This represents an embedding function, used in deep models to convert natural language text into vectors; Indicates the first i One piece of raw text data; Let represent a vector space, indicating that all generated vectors are in the same space. d - In Vioclimatic space; The final set of semantic vectors constitutes the knowledge vector base. : ; The knowledge vector library achieves fast and efficient semantic similarity retrieval by constructing an approximate nearest neighbor index structure, which is then used for subsequent efficient retrieval calls based on semantic similarity.

[0010] Moreover, S2 specifically refers to: (1) Search stage: The current generate request statement is embedded through a function. Transformed into query vectors, in a pre-built knowledge vector base In the process, a similarity function is used to calculate the similarity with each vector. Match degree: ; Where: sim is the similarity score, usually cosine similarity, with a value range of [-1, 1]. The larger the value, the closer the two vectors are and the more similar their semantics are. The dot product of vectors is used to measure the similarity of two vectors in a direction. Let L2 be the norm of each vector, used for normalization; The top k most frequently matched texts are selected to form the search result set. ; in: To retrieve the most relevant results for a query from a knowledge vector base based on similarity. k Text segment; For the retrieved first j The relevant text content is used as part of the input for downstream generation; k The number of searches set for the user or system; (2) Generation stage The original query command is concatenated with the retrieved context information and then input into the target LLM: ; in: The emergency response plan outline draft generated for the model; LLM is the currently invoked large language model; To convert the original query q It is concatenated with the enhanced context paragraph to form a unified input sequence.

[0011] An emergency response plan generation system based on retrieval enhancement and large model includes: Knowledge Vector Base Construction Module: This module receives the emergency plan structure specification document, industry data, and background information of the formulating unit. It then uses the Embedding model to perform vectorization processing on the text data, establishes an emergency plan knowledge vector base, and provides semantic matching support for subsequent retrieval enhancement. The outline generation and retrieval enhancement module is used to semantically embed the generation request based on the user-input plan type, event type, and industry category, and perform a retrieval in the knowledge vector library to obtain highly similar text related to the current task; under the RAGFlow workflow framework, it calls multiple large language models to generate an emergency plan outline draft based on the retrieval results; Outline optimization module: Used to summarize the structure, compare the content and integrate the logic of the outline drafts generated by multiple large language models, and automatically output a clear and well-organized preliminary outline draft; Subjective Issue Identification Module: This module calls multiple different types of LLMs to perform semantic analysis on the initial draft outline, identify subjective content such as human judgment, industry differences, and organization-specific information, and comprehensively process the issue sets output by multiple models to generate a structured "List of Subjective Issues". The manual interaction revision module is used to display the "List of Subjective Questions" in the user interface, guide users to fill in the answers item by item, and standardize user input based on an adaptive filling mechanism; it stores user interaction content in a structured format to form an interaction record table that can be called for subsequent text generation. The contingency plan text generation module is used to divide the contingency plan into chapters based on the outline structure, subjective questions and user responses; and call multiple LLMs to generate the contingency plan text chapter by chapter, while performing language optimization, content integration and logical consistency verification, and finally forming a complete emergency contingency plan text. The document compilation and output module is used to perform global logical sorting, language style unification and formatting of the generated content of each chapter, generate the final emergency plan document, and support export in multiple formats such as .docx and .pdf.

[0012] A computer-readable storage medium storing a subway emergency response plan generation program, wherein when executed by a processor, the subway emergency response plan generation program implements the steps of the emergency response plan generation method based on retrieval enhancement and large model.

[0013] The advantages and beneficial effects of this invention are as follows: 1. This invention has advantages such as high efficiency, professionalism and intelligence. By combining RAG technology and LLM, it constructs an automated workflow with search enhancement generation as the core, covering the entire process of "preliminary plan analysis - outline generation - problem identification - human-computer interaction - text generation - unified optimization".

[0014] 2. This invention possesses high modularity and automation capabilities, automatically advancing task nodes according to set instructions to achieve phased, automated, and intelligent generation of emergency plans. RAG enhances semantic retrieval and accurate information retrieval capabilities, LLM strengthens language understanding and content organization capabilities, and the human-computer interaction ensures the accuracy and implementability of the generated content. The overall system significantly improves the intelligence level and generation efficiency of emergency plan preparation, and is suitable for the rapid response needs of emergency plans across multiple industries and event types. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the process of the present invention; Figure 2 Generate system architecture diagrams for emergency response plans based on RAG and large models; Figure 3This is a schematic diagram of the structural outline of the special emergency response plan for subway mainline fires of the present invention; Figure 4 This is a schematic diagram illustrating the list of subjective issues of the present invention; Figure 5 This is a diagram of a special emergency response plan for fires on subway main lines, as described in this invention. Detailed Implementation

[0016] The present invention will be further described in detail below through specific embodiments. The following embodiments are merely descriptive and not limiting, and should not be used to limit the scope of protection of the present invention.

[0017] like Figure 1 As shown, an emergency response plan generation method based on retrieval enhancement and large model is innovative in that the method comprises the following steps: S1. Construct an emergency response plan knowledge vector base: Compile the plan structure specifications and background information of the formulating unit into a dataset; call the Embedding model to vectorize the text of the dataset, construct a knowledge vector base, and use the knowledge vector base for subsequent retrieval enhancement generation processes; The specific vectorization of the Embedding model is as follows: Let the original text corpus be... By embedding functions Each text fragment is mapped to a semantic vector in a high-dimensional vector space: ; in: Represents the vectorized first... i The semantic representation of the text is in the form of d A 3D real-valued vector, capturing its semantic features; This represents an embedding function, used in deep models to convert natural language text into vectors; Indicates the first i One piece of raw text data; Let represent a vector space, indicating that all generated vectors are in the same space. d - In Vioclimatic space; The final set of semantic vectors constitutes the knowledge vector base. : ; The knowledge vector library achieves fast and efficient semantic similarity retrieval by constructing an approximate nearest neighbor index structure, which is then used for subsequent efficient retrieval calls based on semantic similarity.

[0018] S2. Generate Emergency Plan Outline: Through user input or system preset, clarify the direction of emergency plan development. The development direction includes emergency plan type (comprehensive emergency plan, special emergency plan, on-site response plan), type of event to be dealt with (natural disaster, fire, public health event), and industry category. Under the RAGFlow workflow framework, call multiple different types of LLMs to allocate the generation task of the emergency plan structure and obtain the draft emergency plan outline generated by each model. Specifically: (1) Search stage: The current generate request statement is embedded through a function. Transformed into query vectors, in a pre-built knowledge vector base In the process, a similarity function is used to calculate the similarity with each vector. Match degree: ; Where: sim is the similarity score, usually cosine similarity, with a value range of [-1, 1]. The larger the value, the closer the two vectors are and the more similar their semantics are. The dot product of vectors is used to measure the similarity of two vectors in a direction. Let L2 be the norm of each vector, used for normalization; The top k most frequently matched texts are selected to form the search result set. ; in: To retrieve the most relevant results for a query from a knowledge vector base based on similarity. k Text segment; For the retrieved first j The relevant text content is used as part of the input for downstream generation; k The number of searches set for the user or system; (2) Generation stage The original query command is concatenated with the retrieved context information and then input into the target LLM: ; in: The emergency response plan outline draft generated for the model; LLM is the currently invoked large language model; To concatenate the original query q with the enhanced context paragraph into a unified input sequence.

[0019] S3. Optimize the outline: Adjust and optimize the generated outline file according to actual needs, and output a clear draft outline. S4. Identify subjective issues: Analyze the emergency plan outline by calling multiple different types of LLMs, extract subjective issues, and then select an LLM with excellent information integration capabilities to comprehensively process the subjective issues extracted by each model, forming a complete and well-structured "List of Subjective Issues". S5. Perform manual interactive revisions: Display the "List of Subjective Questions" generated by the system through an interactive user interface for users to review and confirm item by item; based on the user's actual situation and combined with an adaptive filling mechanism, guide the user to gradually respond to each subjective question; store the interactive Q&A content between the user and the system in a structured table format to form an interaction record for subsequent text generation model to call and reference; S6. Generating the Emergency Response Plan Text: Based on the emergency response plan outline, subjective questions, and their human responses, the emergency response plan is divided into chapters to provide logical structural support for the subsequent generation of the main text. Then, for each chapter, multiple LLMs are invoked, keywords and prompts are set to guide the model to read relevant knowledge content and generate the corresponding chapter's text. Next, an LLM with language summarization and content integration capabilities is selected to optimize and merge the text of each chapter, ensuring consistency in logic, structure, and expression. These steps are repeated until all chapters of the entire emergency response plan are generated. Finally, an LLM with global logical organization and language polishing capabilities is used to uniformly summarize, optimize language, and unify style of the overall draft, improving the final text's fluency and professionalism.

[0020] An emergency response plan generation system based on retrieval enhancement and large model is innovative in that it includes multiple collaborative functional modules to realize the complete process of emergency response plan generation from knowledge construction, outline generation, subjective problem identification to main text generation. Knowledge Vector Base Construction Module: This module receives the emergency plan structure specification document, industry data, and background information of the formulating unit. It then uses the Embedding model to perform vectorization processing on the text data, establishes an emergency plan knowledge vector base, and provides semantic matching support for subsequent retrieval enhancement. The outline generation and retrieval enhancement module is used to semantically embed the generation request based on the user-input plan type, event type, and industry category, and perform a retrieval in the knowledge vector library to obtain highly similar text related to the current task; under the RAGFlow workflow framework, it calls multiple large language models to generate an emergency plan outline draft based on the retrieval results; Outline optimization module: Used to summarize the structure, compare the content and integrate the logic of the outline drafts generated by multiple large language models, and automatically output a clear and well-organized preliminary outline draft; Subjective Issue Identification Module: This module calls multiple different types of LLMs to perform semantic analysis on the initial draft outline, identify subjective content such as human judgment, industry differences, and organization-specific information, and comprehensively process the issue sets output by multiple models to generate a structured "List of Subjective Issues". The manual interaction revision module is used to display the "List of Subjective Questions" in the user interface, guide users to fill in the answers item by item, and standardize user input based on an adaptive filling mechanism; it stores user interaction content in a structured format to form an interaction record table that can be called for subsequent text generation. The contingency plan text generation module is used to divide the contingency plan into chapters based on the outline structure, subjective questions and user responses; and call multiple LLMs to generate the contingency plan text chapter by chapter, while performing language optimization, content integration and logical consistency verification, and finally forming a complete emergency contingency plan text. The document compilation and output module is used to perform global logical sorting, language style unification and formatting of the generated content of each chapter, generate the final emergency plan document, and support export in multiple formats such as .docx and .pdf.

[0021] A computer-readable storage medium storing a subway emergency response plan generation program, wherein when executed by a processor, the subway emergency response plan generation program implements the steps of the emergency response plan generation method based on retrieval enhancement and large model.

[0022] This embodiment uses a special emergency plan for fires on the main line of a subway as an example for explanation: Step 1: Enter the name of the emergency plan, for example: "Special Emergency Plan for Fire on the Subway Main Line"; Step 2: The system calls the embedded model to vectorize the uploaded emergency plan structure specification document and the data from the subway operating unit, and builds an emergency plan knowledge vector library on the theme of "subway fire". Step 3: Users select the emergency plan development direction as "Specialized Emergency Plan - Urban Rail Transit - Fire Scenario" through the interface; the system combines the Retrieval Enhanced Generation (RAG) mechanism to perform semantic retrieval in the knowledge vector base and call various LLM models to automatically generate a preliminary emergency plan outline; Step 4: The system summarizes, integrates, and optimizes the structure and logic of the outlines output from multiple models, producing a complete and well-organized draft outline, including chapters such as "General Principles, Organizational Structure, Handling Procedures, Information Reporting, and Resource Support," etc. Figure 2 As shown; Step 5: The system calls multiple LLMs to analyze the outline content, identifying subjective issues requiring human decision-making, such as "emergency material reserve details" and "selection of on-site commander," and generates a "List of Subjective Issues" from the specified model. Figure 3 As shown; Step 6: Users fill in the answers to each question in the question list through the interactive interface. The system records the user's responses in real time and generates a structured interaction record table. Step 7: Based on the optimized outline structure and user interaction responses, the system calls multiple LLM models to generate the content of each chapter one by one. The emergency text covers key contents such as early warning mechanism, response level, organizational division of labor, handling process, and recovery strategy. Step 8: The system performs logical consistency checks, language style unification, and content redundancy cleanup on the content of each chapter. The designated LLM completes the final summary and polishing. Step 9: Output the completed "Special Emergency Response Plan for Fires on the Subway Mainline" document, such as... Figure 4 As shown, it supports exporting in formats such as .docx and .pdf, for use by management units for filing, publishing, or drills.

[0023] Although embodiments and drawings of the present invention have been disclosed for illustrative purposes, those skilled in the art will understand that various substitutions, variations and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the scope of the present invention is not limited to the contents disclosed in the embodiments and drawings.

Claims

1. A method for generating emergency response plans based on retrieval enhancement and large-scale models, characterized in that: The steps of the method are as follows: S1. Construct an emergency response plan knowledge vector base: Compile the plan structure specifications and background information of the formulating unit into a dataset; call the Embedding model to vectorize the text of the dataset, construct a knowledge vector base, and use the knowledge vector base for subsequent retrieval enhancement generation processes; S2. Generate Emergency Plan Outline: Through user input or system preset, clarify the direction of emergency plan development. The development direction includes emergency plan type (comprehensive emergency plan, special emergency plan, on-site response plan), type of event to be dealt with (natural disaster, fire, public health emergency), and industry category. Within the RAGFlow workflow framework, multiple different types of LLMs are invoked to assign tasks for generating the emergency plan structure and obtain the draft outline of the emergency plan generated by each model. S3. Optimize the outline: Adjust and optimize the generated outline file according to actual needs, and output a clear draft outline. S4. Identify subjective issues: Analyze the emergency plan outline by calling multiple different types of LLMs, extract subjective issues, and then select an LLM with excellent information integration capabilities to comprehensively process the subjective issues extracted by each model, forming a complete and well-structured "List of Subjective Issues". S5. Perform manual interactive revisions: Display the "List of Subjective Issues" generated by the system through an interactive user interface for users to review and confirm item by item; Based on the actual situation of users, combined with an adaptive filling mechanism, users are guided to gradually answer various subjective questions; the interactive Q&A content between users and the system is stored in the form of a structured table to form an interaction record for subsequent text generation model to call and refer to. S6. Generate Emergency Response Plan Text: Based on the emergency response plan outline, subjective questions, and their manual responses, the emergency response plan is divided into chapters to provide logical structure support for the subsequent generation of the plan text chapter by chapter. Then, for each chapter, multiple LLMs are called to set keywords and prompts to guide the model to read relevant knowledge content and generate the corresponding chapter's plan text. Next, an LLM (Limited Language Management) tool with language summarization and content integration capabilities was used to optimize and merge the text of each chapter, ensuring consistency in logic, structure, and expression across all chapters. This process was repeated until all chapters of the entire emergency plan were generated. Finally, an LLM tool with global logical organization and language polishing capabilities was used to unify the overall plan document, optimize its language, and ensure stylistic consistency, thereby improving the fluency and professionalism of the final text.

2. The emergency response plan generation method based on retrieval enhancement and large model as described in claim 1, characterized in that: The embedding model vectorization of S1 is specifically as follows: Let the original text corpus be... By embedding functions Each text fragment is mapped to a semantic vector in a high-dimensional vector space: ; in: Represents the vectorized first... i The semantic representation of the text is in the form of d A 3D real-valued vector, capturing its semantic features; This represents an embedding function, used in deep models to convert natural language text into vectors; Indicates the first i One piece of raw text data; Let represent a vector space, indicating that all generated vectors are in the same space. d - In Vioclimatic space; The final semantic vector set constitutes a knowledge vector library : ; The knowledge vector library achieves fast and efficient semantic similarity retrieval by constructing an approximate nearest neighbor index structure, which is then used for subsequent efficient retrieval calls based on semantic similarity. 3.The method of claim 1, wherein the method further comprises: Specifically, S2 is: (1) Search stage: The current generation request sentence is converted into a query vector by an embedding function in a pre-constructed knowledge vector library The similarity function is used to calculate the matching degree with each vector ​ ; Wherein: sim is the similarity score, usually cosine similarity, the value range is [-1, 1], the larger the value, the closer the two vectors, the more similar the semantics; is the vector dot product, used to measure the similarity of two vectors in direction; is the L2 norm of the respective vector, used for normalization; The top k most frequently matched texts are selected to form the search result set. ; wherein: is the top k text segment retrieved from the knowledge vector library based on similarity is the top j text content retrieved from the knowledge vector library based on similarity k is the number of retrievals set by the user or system (2) Generation stage The original query command is concatenated with the retrieved context information and then input into the target LLM: ; wherein: an emergency preparedness outline draft generated for the model; LLM is the currently invoked large language model; to concatenate the original query q with the augmented context paragraph into a unified input sequence.

4. An emergency plan generation system based on retrieval enhancement and large models, characterized by: include: Knowledge Vector Base Construction Module: This module receives the emergency plan structure specification document, industry data, and background information of the formulating unit. It then uses the Embedding model to perform vectorization processing on the text data, establishes an emergency plan knowledge vector base, and provides semantic matching support for subsequent retrieval enhancement. The outline generation and retrieval enhancement module is used to semantically embed the generation request based on the user-input plan type, event type, and industry category, and perform a retrieval in the knowledge vector library to obtain highly similar text related to the current task; under the RAGFlow workflow framework, it calls multiple large language models to generate an emergency plan outline draft based on the retrieval results; Outline optimization module: Used to summarize the structure, compare the content and integrate the logic of the outline drafts generated by multiple large language models, and automatically output a clear and well-organized preliminary outline draft; Subjective Issue Identification Module: This module calls multiple different types of LLMs to perform semantic analysis on the initial draft outline, identify subjective content such as human judgment, industry differences, and organization-specific information, and comprehensively process the issue sets output by multiple models to generate a structured "List of Subjective Issues". Human-interactive revision module: Used to display the "List of Subjective Questions" in the user interface, guide users to fill in the answers item by item, and standardize user input based on an adaptive filling mechanism; User interaction content is stored in a structured format to form an interaction record table that can be called upon for subsequent text generation; The contingency plan text generation module is used to divide the contingency plan into chapters based on the outline structure, subjective questions and user responses; and call multiple LLMs to generate the contingency plan text chapter by chapter, while performing language optimization, content integration and logical consistency verification, and finally forming a complete emergency contingency plan text. The document compilation and output module is used to perform global logical sorting, language style unification and formatting of the generated content of each chapter, generate the final emergency plan document, and support export in multiple formats such as .docx and .pdf.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a subway emergency response plan generation program, which, when executed by a processor, implements the steps of the emergency response plan generation method based on retrieval enhancement and large model as described in any one of claims 1 to 3.