Search

CN-121996736-A - Emergency plan generation method, system and storage medium based on retrieval enhancement and large model

CN121996736ACN 121996736 ACN121996736 ACN 121996736ACN-121996736-A

Abstract

The invention relates to an emergency plan generating method based on retrieval enhancement and a large model, which comprises the steps of S1, constructing an emergency plan knowledge vector base, S2, generating a plan outline, S3, optimizing the plan outline, S4, identifying subjective problems, S5, carrying out manual interaction revision, and S6, generating an emergency plan text. The invention also relates to an emergency plan generating system and a storage medium based on the retrieval enhancement and the large model. The invention has the advantages of high efficiency, professionality, intellectualization and the like, and constructs an automatic workflow taking retrieval enhancement generation as a core by combining RAG technology and LLM, and covers the whole process of 'plan analysis-outline generation-problem identification-man-machine interaction-text generation-unified optimization'. The whole system greatly improves the intelligent level and the generation efficiency of emergency plan programming, and is suitable for the rapid response demands of plans of multiple industries and multiple event types.

Inventors

  • LI ZHENGZHONG
  • Qi Yanran
  • HOU HAONAN
  • LI HAORAN
  • ZHANG XIN
  • Han Fengfan
  • ZHANG XIRAN
  • WEI DONGHUA
  • ZHANG PENGYU
  • JIN YANPING

Assignees

  • 天津市交通科学研究院

Dates

Publication Date
20260508
Application Date
20251218

Claims (5)

  1. 1. The emergency plan generation method based on the retrieval enhancement and the large model is characterized by comprising the following steps of: s1, constructing an emergency plan knowledge vector library, namely, arranging a plan structure specification file and background information of a formulation unit into a data set, calling Embedding a model to carry out vectorization processing on the text of the data set, constructing a knowledge vector library, and using the knowledge vector library in a subsequent retrieval enhancement generation process; S2, generating a plan outline, namely defining the compiling direction of an emergency plan through user input or system presetting, wherein the compiling direction comprises emergency plan types (comprehensive emergency plan, special emergency plan and on-site disposal plan), event types (natural disasters, fires and public health events) and belonging industry categories; s3, optimizing the outline of the plan, namely adjusting and optimizing the generated outline file according to actual requirements, and outputting an outline initial draft with clear structure; s4, identifying subjective problems, namely calling a plurality of LLMs of different types, analyzing an emergency plan outline, extracting the subjective problems, then selecting the LLM with excellent information integration capability, and comprehensively processing the subjective problems extracted by each model to form a subjective problem list with complete content and clear structure; s5, carrying out manual interaction revision, namely enabling a user to review and confirm item by item through a subjective problem list generated by an interactive user interface display system; based on the actual situation of the user, combining with a self-adaptive filling mechanism, guiding the user to reply each subjective question step by step, storing the interactive question-answer content between the user and the system in a structured table form to form an interactive record for the subsequent text generation model to call and reference; s6, generating an emergency plan text, namely carrying out chapter division on the emergency plan according to an emergency plan outline, subjectivity problems and manual reply content of the emergency plan, providing logic structure support for generating the plan text for the subsequent chapter by chapter, then calling a plurality of LLMs for each chapter content, setting keywords and prompt information, guiding a model to read related knowledge content, generating a plan text of the corresponding chapter, then selecting LLMs with language induction and content integration capability, carrying out optimization combination on each chapter text, ensuring consistency of each chapter content in terms of logicality, structure and expression regularity, repeatedly executing the steps until all chapter contents of the whole emergency plan are generated, finally selecting LLMs with global logic carding and language color wetting capability, carrying out unified induction, language optimization and style unification on the whole plan manuscript, and improving the consistency and the speciality of the final text.
  2. 2. The emergency plan generating method based on the retrieval enhancement and the large model according to claim 1, wherein the Embedding model vectorization of S1 is specifically as follows: Let the original text corpus set be By embedding functions Mapping each text segment into a semantic vector in a high-dimensional vector space: ; Wherein: Representing vectorized ith text semantic representation in the form of d-dimensional real number vector, and capturing semantic features of the text semantic representation; representing an embedded function for converting natural language text into a depth model of a vector; representing the ith original text data; representing a vector space, representing that all generated vectors are in d-dimensional Euclidean space; knowledge vector base composed of finally obtained semantic vector sets : ; The knowledge vector library realizes quick and efficient semantic similarity retrieval by constructing an approximate nearest neighbor index structure, and is used for subsequent efficient retrieval and calling based on semantic similarity.
  3. 3. The emergency plan generating method based on the retrieval enhancement and the large model according to claim 1, wherein the step S2 is specifically: (1) And (3) searching: passing the current generation request statement through an embedding function Is converted into query vectors, and is stored in a pre-constructed knowledge vector base In which the similarity function is used to calculate the vector Matching degree of (3): ; Sim is a similarity score, and generally adopts cosine similarity, wherein the larger the value of the similarity score is [ -1,1], the closer the two vectors are represented, the more similar the semantics are; Is a vector dot product and is used for measuring the similarity of two vectors in the direction; Is the L2 norm of the respective vector for normalization; selecting the top k texts with the highest matching degree to form a retrieval result set: ; Wherein: the top k text segments which are most relevant to the query and are retrieved from the knowledge vector base according to the similarity; For the retrieved j-th related text content, use as part of a downstream generation input; k is the search number set by the user or the system; (2) Stage of generation The original query instruction is spliced with the retrieved context information and then is input to a target LLM: ; Wherein: LLM is a large language model which is called currently; To splice the original query q with the enhancement context paragraphs into a unified input sequence.
  4. 4. An emergency plan generating system based on retrieval enhancement and a large model is characterized by comprising: The knowledge vector base construction module is used for receiving the preset structure specification file, the industry data and the background information of the formulated units, calling Embedding a text data to carry out vectorization processing, establishing an emergency preset knowledge vector base and providing semantic matching support for subsequent retrieval enhancement; The outline generation and retrieval enhancement module is used for carrying out semantic embedding on the generation request according to the plan type, event type and industry category input by a user, and executing retrieval in a knowledge vector library to obtain a high-similarity text related to the current task; The outline optimization module is used for carrying out structural induction, content comparison and logic integration on outline draft generated by a plurality of outline language models, and automatically outputting outline draft with clear structure and complete arrangement; The subjective problem identification module is used for calling a plurality of LLMs of different types, carrying out semantic analysis on the outline first draft, identifying subjective contents related to manual judgment, industry difference, mechanism specific information and the like, comprehensively processing a problem set output by a plurality of models and generating a structured subjective problem list; The manual interaction revision module is used for displaying a subjective question list in a user interface, guiding a user to fill out answers item by item, normalizing user input based on a self-adaptive filling mechanism, storing user interaction content in a structured format, and forming an interaction record table for subsequent text generation and calling; The system comprises a plan text generation module, a section division module and a section division module, wherein the plan text generation module is used for dividing a plan according to a outline structure, subjective questions and user answer contents thereof, calling a plurality of LLMs to generate a plan text section by section, and simultaneously executing language optimization, content fusion and logic consistency verification to finally form a complete emergency plan text; and the manuscript summarizing and outputting module is used for carrying out global logic carding, language style unification and formatting processing on the generated content of each chapter to generate a final emergency plan manuscript and supporting the derivation in a plurality of formats of docx and pdf.
  5. 5. A computer-readable storage medium, wherein a subway emergency treatment plan generation program is stored on the computer-readable storage medium, and when the subway emergency treatment plan generation program is executed by a processor, the steps of the emergency plan generation method based on the retrieval enhancement and the large model according to any one of claims 1to 3 are realized.

Description

Emergency plan generation method, system and storage medium based on retrieval enhancement and large model Technical Field The invention belongs to the technical field of emergency management, and particularly relates to an emergency plan generation method, an emergency plan generation system and a storage medium based on retrieval enhancement and a large model. Background The emergency plan is an important command file for dealing with emergencies, and is a basic basis for government departments, enterprises and public institutions to develop organizational commands, resource scheduling, information reporting and field disposal under disasters, accidents, public health events and other emergency situations. A complete emergency plan generally comprises a plurality of parts such as an organization system, response grading, disposal flow, communication and resource guarantee, and the like, and the compiling process needs to combine multi-source information such as rule standards, industry specifications, unit actual conditions, historical cases and the like. The high-quality emergency plan can remarkably improve the response speed and the treatment efficiency of coping with emergency events, and is a key link in the construction of a modern emergency management system. Prior art emergency plan generation systems are generally based on the following three technical frameworks: 1. Rules and templates based protocol generation systems such systems rely on predefined emergency protocol templates and rule libraries to generate protocols through structured data matching. The method is simple to realize, is suitable for scenes with higher standardization degree, but has poor rule expansibility, is difficult to quickly adapt to complex or novel emergencies, and has higher maintenance cost of a rule base, and updating is delayed from actual demands. 2. The method is used for reasoning and generating a standardized emergency flow by structuring knowledge graph related events, resources and treatment schemes. The logic is strong, multidimensional association reasoning is supported, and the accuracy of emergency response is improved. But depending on high-quality structured data, the construction and maintenance costs are high, and meanwhile, the generated plan is poor in readability due to the lack of natural language interaction capability. 3. The LLM-based plan generation method utilizes a pre-training language model (such as GPT and BERT) to generate emergency plan text in a natural language form. The method can automatically generate the long text, reduce the workload of manual writing and improve the efficiency of planning the plans. However, the generated content is lack of pertinence, the problem of logic error or non-compliance with industry standard easily occurs, the result generated by a single model is uncontrollable, and the optimization is difficult to combine with multi-source knowledge. In summary, the above-mentioned technology has the following problems: 1. The system based on the rules and the templates is too static, so that the real-time evolution of the emergency and the cross-domain cooperative requirements are difficult to meet; 2. The prior LLM has text generation capability, but lacks knowledge support in the field of emergency management, and the output content often lacks industry pertinence and has insufficient logic and implementability; 3. The lack of man-machine interaction optimization is that the existing system mostly lacks manual auditing and correction links, which may cause the deviation of the plan from the actual scene requirement and reduce the performability. 4. The information organization is disordered, namely the problems of inconsistent logic and unclear structure are easy to generate in the multi-round generation process, and the regularity and the readability of the plan are affected. Disclosure of Invention The invention aims to overcome the defects of the prior art, and provides an emergency plan generation method, system and storage medium based on retrieval enhancement and a large model, which are combined with a RAG mechanism and multi-model LLM to realize structural analysis of emergency knowledge, intelligent reinforcement of a generation process, man-machine interaction correction of subjective problems and logic optimization of manuscript content, thereby comprehensively improving the efficiency, accuracy and specialty of plan preparation. The invention solves the technical problems by the following technical proposal: An emergency plan generating method based on retrieval enhancement and a large model comprises the following steps: s1, constructing an emergency plan knowledge vector library, namely, arranging a plan structure specification file and background information of a formulation unit into a data set, calling Embedding a model to carry out vectorization processing on the text of the data set, constructing a knowledge vector library, and using the knowled