An agent-based production accident briefing generation method, system, device and medium
By constructing accident graphs and knowledge graphs and combining them with intelligent agent generation methods, the problems of single retrieval dimensions and insufficient accuracy in existing technologies have been solved. This enables the automated generation of logically rigorous and factually accurate production accident reports, providing real-time and accurate decision support.
Patent Information
- Application Number
- CN202610390040.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-27
- Publication Date
- 2026-05-29
AI Technical Summary
Existing methods for generating production accident reports based on large language models suffer from limitations such as a single retrieval dimension, inability to incorporate external terminology databases and equipment mechanism knowledge, resulting in shortcomings in regulatory citations and in-depth cause analysis. Furthermore, these methods have limited retrieval accuracy and are prone to recalling semantically similar but logically different noisy cases.
An accident graph of production accidents is constructed. Entities and their causal spatiotemporal relationships are extracted through multimodal data parsing. The graph is then used for retrieval and reasoning by combining a historical accident briefing database and a knowledge graph to generate briefing outlines. Text is generated through planning, fact extraction, and writing agents to achieve multi-dimensional review and iterative optimization.
It enables the generation of automated production accident reports that are logically rigorous, factually accurate, and terminologically standardized, providing timely and accurate decision-making support and improving the quality and interpretability of the reports.
Smart Images

Figure CN122114180A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial safety technology, and in particular to a method, system, device and medium for generating production accident reports based on intelligent agents. Background Technology
[0002] In modern industrial production, safety supervisors need to quickly and accurately extract key elements such as accident severity, direct causes, and handling results from lengthy technical reports—that is, to write production accident briefings—in order to promptly grasp the production safety situation and make decisions. The development of natural language processing technology has provided new possibilities for the automated generation of production briefings.
[0003] However, existing production accident reports based on large language models still have the following shortcomings: First, the retrieval dimension is limited, relying solely on semantic matching of the entire historical report, and failing to accurately incorporate external professional terminology databases or equipment mechanism knowledge, resulting in shortcomings in regulatory citations and in-depth cause analysis of the generated reports; Second, the retrieval accuracy is limited, and semantic similarity does not equate to high reference value, easily recalling noisy cases with similar semantics but different logics, interfering with the model's generation direction. Summary of the Invention
[0004] This invention provides a method, system, device, and medium for generating production accident reports based on intelligent agents, which can automatically generate intelligent production accident reports and provide safety supervisors with timely and accurate decision-making basis.
[0005] This invention provides a method for generating production accident briefings based on intelligent agents, including: Based on the acquired multimodal raw data, an accident graph of production accidents is constructed; wherein, the points in the accident graph are entities of accident events; and the edges in the accident graph are used to represent the causal spatiotemporal relationships between the entities. Based on the accident graph, a search segment is performed in the preset historical accident briefing database to retrieve historical case segments. At the same time, a graph reasoning segment is retrieved based on the accident graph and the preset knowledge graph to retrieve graph reasoning segments. The historical case segments and the graph reasoning segments are merged to obtain a candidate segment set. A briefing outline is generated using a pre-defined planning agent and the accident graph. A data outline is obtained by adding factual data to the briefing outline using a pre-defined fact extraction agent and the candidate fragment set. Then, text is generated using a pre-defined writing agent and the data outline to obtain the first accident briefing.
[0006] This invention constructs an accident map of production accidents, transforming raw data such as text and images from the scene into an accident map containing entities and their causal spatiotemporal relationships, laying a data foundation for subsequent element extraction of production accidents. Then, based on the accident map, it retrieves fragments from a historical accident report database and uses a knowledge graph for graph reasoning fragment retrieval, obtaining a set of candidate fragments that integrates historical experience and professional mechanisms. This overcomes the limitations of traditional single-channel retrieval with limited information and effectively suppresses the illusion of fact in large language models. A planning agent generates a report outline, clarifying the logical framework and information dimensions of the report. A fact extraction agent adds factual data to the report outline, ensuring that the generated content is strictly based on real parameters. Finally, a pre-set writing agent generates text, obtaining an accident report containing core accident elements, logical rigor, and standardized terminology, achieving automated and intelligent generation of accident reports and providing timely and accurate decision-making basis for safety supervisors.
[0007] Furthermore, after obtaining the first incident report, the process also includes multi-dimensional review and iterative optimization of the first incident report, specifically: Based on the comprehensive evaluation results of the previous iteration's incident report, the current iteration's incident report is iteratively updated until the comprehensive evaluation results of the current iteration meet the iteration termination conditions, and the second incident report is output. In each iteration, the incident report from the previous iteration is evaluated for facts, logic, and text content according to a preset review agent, and a comprehensive evaluation result for the current iteration is generated based on the evaluation results. The incident report for the current iteration is updated based on the comprehensive evaluation result and the incident report from the previous iteration, combined with the writing agent. In the first iteration, the incident report from the previous iteration is the first incident report.
[0008] This approach involves a pre-defined review agent that independently evaluates the generated incident reports across multiple dimensions, including facts, logic, and text. It generates detailed sub-scores and suggested revisions, enabling a comprehensive quantitative diagnosis of the report's quality. A comprehensive quality score is calculated based on these sub-scores, and a reflection log is automatically generated, establishing a traceable link between quality defects and optimization directions. The reflection log and the initial incident report are then combined and re-input into the writing agent for iterative correction until the iteration termination condition is met, at which point a finalized report is output. This closed-loop processing mechanism achieves automated and continuous optimization of the incident report's quality, significantly improving the factual accuracy, logical rigor, and standardized expression of the text.
[0009] Furthermore, a briefing outline is generated using a pre-defined planning agent and the accident graph. A data outline is obtained by adding factual data to the briefing outline using a pre-defined fact extraction agent and the candidate fragment set. Then, text is generated using a pre-defined writing agent and the data outline to obtain the first accident briefing, specifically: Accident features are extracted from the accident map using a pre-defined planning agent, and a briefing outline is generated based on the accident features. The fact data is extracted from the candidate fragment set by a preset fact extraction agent, and the fact data is attached to the corresponding node of the briefing outline to obtain a data outline containing constraints. The pre-defined writing agent generates text based on the data outline. If a logical gap is detected, a reverse query is initiated to the fact extraction agent to obtain supplementary related fact data. The text is then generated by combining the related fact data, and finally a complete first accident report is output.
[0010] This approach involves using a planning agent to generate a briefing outline, clarifying the logical framework and information dimensions of the incident briefing, and providing structured guidance for subsequent content generation. A fact extraction agent extracts factual data from a candidate fragment set and appends it to the corresponding nodes of the briefing outline, forming a data outline containing constraints. This ensures that the generated content is strictly based on real parameters, effectively suppressing the factual illusions of large language models. Furthermore, a writing agent generates text based on the data outline and, upon detecting logical gaps, proactively initiates a reverse query to the fact extraction agent to obtain supplementary related factual data before continuing generation. This achieves dynamic information completion and logical self-consistency during the generation process, ultimately outputting an incident briefing that is factually accurate, logically rigorous, and complete in content.
[0011] Further, based on the accident graph, a retrieval segment is performed in a preset historical accident briefing database to obtain historical case segments. Simultaneously, a graph reasoning segment is retrieved based on the accident graph and a preset knowledge graph to obtain graph reasoning segments. The historical case segments and the graph reasoning segments are then merged to obtain a candidate segment set, specifically: The accident map is converted into query text. Based on the query text, a search is performed in a preset historical accident briefing database, and text fragments with similarity higher than a preset text similarity threshold are recalled to obtain historical case fragments. Using the points in the accident graph as the starting point for reasoning, graph reasoning retrieval is performed in the preset knowledge graph, and the text fragments corresponding to the reasoning starting point are recalled to obtain graph reasoning fragments. The historical case fragments and the graph reasoning fragments are merged to obtain an initial candidate fragment set. The initial candidate fragment set is then optimized and deduplicated to obtain the final candidate fragment set.
[0012] This approach transforms accident graphs into query text, and then performs similarity searches from a historical accident briefing database based on the query text. This enables accurate recall of historical case fragments, allowing the generated content to fully draw upon records and experiences from past real accidents, enhancing the case support and interpretability of the briefings. By using entity points in the accident graph as starting points for inference, deep reasoning retrieval is performed in the knowledge graph to uncover implicit connections and causal mechanisms between accident elements, obtaining graph-based reasoning fragments. This compensates for the shortcomings of pure data retrieval at the professional mechanism level. By merging historical case fragments with graph-based reasoning fragments and further optimizing and deduplicating them, a high-quality candidate fragment set is constructed, effectively integrating both historical experience and professional mechanism information, providing accurate factual evidence for the large language model.
[0013] Furthermore, graph reasoning retrieval is performed within a pre-defined knowledge graph, and text fragments corresponding to the reasoning starting point are retrieved to obtain graph reasoning fragments, specifically: Based on the starting point of reasoning, a personalized random walk iterative calculation is performed in the knowledge graph to obtain the node score of the starting point of reasoning; Based on the node scores, nodes with scores higher than a preset threshold are selected for text fragment retrieval and splicing to obtain graph reasoning fragments.
[0014] By conducting personalized random walk iterative calculations within the knowledge graph, the correlation strength between each node and the starting point is dynamically evaluated. Then, based on the node scores, nodes with scores higher than a preset threshold are selected as high-scoring nodes. Corresponding text fragments are retrieved and spliced to obtain graph reasoning fragments. This fully explores the causal chains and mechanistic paths hidden in the knowledge graph, effectively improving the relevance and accuracy of reasoning retrieval, and providing in-depth mechanistic support and professional information for the generation of accident reports.
[0015] Further, the initial candidate fragment set is optimized and deduplicated to obtain the final candidate fragment set, specifically as follows: Extract the accident features from the accident map, and calculate the correlation score between the candidate segment set and the corresponding accident features; Based on the relevance score, the maximum marginal relevance algorithm iteratively selects candidate segments from the candidate segment set whose similarity is higher than a preset segment similarity threshold, and removes duplicate candidate segments until the iteration condition is met, thus obtaining the final candidate segment set.
[0016] By extracting accident features from the accident map and quantifying the correlation scores between candidate segments and accident features, content filtering based on the core elements of the accident is achieved. Then, through the maximum marginal correlation algorithm, candidate segments with similarity higher than the preset segment similarity threshold are iteratively selected as high-similarity segments while taking into account relevance, and duplicate content is dynamically removed. This effectively balances the representativeness and diversity of segments, avoids information redundancy and homogenization, and finally obtains a high-quality set of candidate segments.
[0017] Furthermore, based on the acquired multimodal raw data, an accident map of production accidents is constructed, specifically as follows: The preset multimodal large language model is invoked to parse and extract the acquired multimodal raw data to obtain the entities of the accident events of the production accident and the causal spatiotemporal relationship between the entities; Based on the entities and the causal spatiotemporal relationships, an accident map of production accidents is constructed.
[0018] By calling a pre-defined multimodal large language model, the acquired multimodal raw data is deeply analyzed and extracted. The entities in the production accident and their causal spatiotemporal relationships are automatically identified and extracted. In this way, a structured production accident map is constructed, realizing the standardized transformation of the raw data, fully preserving the core elements and causal spatiotemporal logic of the accident, and providing an accurate and comprehensive data foundation for subsequent retrieval and report generation.
[0019] Another embodiment of the present invention provides a production accident briefing generation system based on intelligent agents, including: an accident map construction module, a candidate fragment retrieval module, and an accident briefing generation module; The accident graph construction module is used to construct an accident graph of production accidents based on the acquired multimodal raw data; wherein, the points in the accident graph are entities of accident events; and the edges in the accident graph are used to represent the causal spatiotemporal relationships between the entities. The candidate fragment retrieval module is used to retrieve fragments from a preset historical accident briefing database based on the accident graph to obtain historical case fragments, and simultaneously retrieve graph reasoning fragments based on the accident graph and a preset knowledge graph to obtain graph reasoning fragments. The historical case fragments and the graph reasoning fragments are then merged to obtain a candidate fragment set. The accident briefing generation module is used to generate a briefing outline through a preset planning agent and the accident graph, add factual data to the briefing outline through a preset fact extraction agent and the candidate fragment set to obtain a data outline, and then generate text through a preset writing agent and the data outline to obtain a first accident briefing.
[0020] This invention constructs an accident map of production accidents, transforming raw data such as text and images from the scene into an accident map containing entities and their causal spatiotemporal relationships, laying a data foundation for subsequent element extraction of production accidents. Then, based on the accident map, it retrieves fragments from a historical accident report database and uses a knowledge graph for graph reasoning fragment retrieval, obtaining a set of candidate fragments that integrates historical experience and professional mechanisms. This overcomes the limitations of traditional single-channel retrieval with limited information and effectively suppresses the illusion of fact in large language models. A planning agent generates a report outline, clarifying the logical framework and information dimensions of the report. A fact extraction agent adds factual data to the report outline, ensuring that the generated content is strictly based on real parameters. Finally, a pre-set writing agent generates text, obtaining an accident report containing core accident elements, logical rigor, and standardized terminology, achieving automated and intelligent generation of accident reports and providing timely and accurate decision-making basis for safety supervisors.
[0021] Another embodiment of the present invention provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps of the production accident briefing generation method based on intelligent agents of the present invention.
[0022] Another embodiment of the present invention provides a computer-readable storage medium item, including: a stored computer program, which, when the computer program is running, controls the device where the computer-readable storage medium is located to perform the steps of the production accident briefing generation method based on intelligent agents of the present invention. Attached Figure Description
[0023] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating an embodiment of the production accident briefing generation method based on intelligent agents provided by the present invention. Figure 2 This is a schematic diagram of another embodiment of the production accident briefing generation system based on intelligent agents provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0027] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0029] In the description of this invention, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.
[0030] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0031] See Figure 1 To address the problem of generating production accident reports in existing technologies, an embodiment of the present invention provides a production accident report generation method based on intelligent agents, comprising steps S1 to S3, the specific steps of which are as follows: S1. Based on the acquired multimodal raw data, construct an accident graph of production accidents; wherein, the points in the accident graph are entities of accident events; and the edges in the accident graph are used to represent the causal spatiotemporal relationships between the entities. Specifically, a multimodal raw data consisting of text descriptions collected on-site, monitoring screenshots, and photos of damaged equipment is jointly analyzed using a pre-set multimodal large language model to extract the equipment phenomena involved in the accident and the causal spatiotemporal relationships between the entities; by setting the entities as nodes and the relationships between the entities as edges, an accident graph of the production accident is constructed. S2. Based on the accident graph, retrieve fragments from the preset historical accident briefing database to obtain historical case fragments. At the same time, retrieve graph reasoning fragments based on the accident graph and the preset knowledge graph to obtain graph reasoning fragments. Merge the historical case fragments and the graph reasoning fragments to obtain a candidate fragment set. In one aspect, the accident graph is converted into query text, and semantically similar historical case fragments are retrieved from a pre-set historical accident briefing database through a combination of dense vector retrieval and sparse keyword retrieval. In another aspect, starting from the nodes in the accident graph, a personalized walkthrough is performed in a pre-set knowledge graph to uncover latent root causes that have a deep causal relationship with the current accident but are not mentioned in the original report, and these are converted into graph reasoning fragments. The historical case fragments and the graph reasoning fragments are then merged to obtain a set of candidate fragments that are rich in information and diverse. S3. A briefing outline is generated using a preset planning agent and the accident graph. A data outline is obtained by adding factual data to the briefing outline using a preset fact extraction agent and the candidate fragment set. Then, text is generated using a preset writing agent and the data outline to obtain the first accident briefing.
[0032] The planning agent matches and outputs a structured briefing outline containing dimensions such as accident overview, cause analysis, and handling results based on accident characteristics in the accident graph. The fact extraction agent extracts factual data corresponding to each dimension of the briefing outline from the candidate fragment set and appends it to the corresponding nodes of the briefing outline to form a data outline with constraints. The writing agent generates text based on the data outline to obtain a logically coherent and factually accurate first accident briefing.
[0033] This invention constructs an accident map of production accidents, transforming raw data such as text and images from the scene into an accident map containing entities and their causal spatiotemporal relationships, laying a data foundation for subsequent element extraction of production accidents. Then, based on the accident map, it retrieves fragments from a historical accident report database and uses a knowledge graph for graph reasoning fragment retrieval, obtaining a set of candidate fragments that integrates historical experience and professional mechanisms. This overcomes the limitations of traditional single-channel retrieval with limited information and effectively suppresses the illusion of fact in large language models. A planning agent generates a report outline, clarifying the logical framework and information dimensions of the report. A fact extraction agent adds factual data to the report outline, ensuring that the generated content is strictly based on real parameters. Finally, a pre-set writing agent generates text, obtaining an accident report containing core accident elements, logical rigor, and standardized terminology, achieving automated and intelligent generation of accident reports and providing timely and accurate decision-making basis for safety supervisors.
[0034] In one embodiment, an accident map of production accidents is constructed based on the acquired multimodal raw data, including steps S201 to S202, each of which is as follows: S201. Call the preset multimodal large language model to parse and extract the acquired multimodal raw data to obtain the entities of the accident events of the production accident and the causal spatiotemporal relationship between the entities. S202. Based on the entities and the causal spatiotemporal relationships, construct an accident map of production accidents.
[0035] Among them, the key entity set is obtained through parsing and extraction. (Entities such as flanges, valves, and leaks) and the causal spatiotemporal relationships between entities; constructing a local topological map of the current incident. Node V represents the extracted accident entity, and edge E represents the causal or spatiotemporal relationship between entities; It is a dynamic, instantaneous, and specific map. It is a set of features extracted by the system in real time from the unstructured report (on-site images and text) of the current accident after it occurs. Its function is to define the known boundaries of the current accident.
[0036] This invention utilizes a pre-defined multimodal large language model to perform in-depth analysis and extraction on the acquired multimodal raw data. It automatically identifies and extracts event entities in production accidents and their causal spatiotemporal relationships, thereby constructing a structured production accident map. This achieves the standardized transformation of the raw data, fully preserving the core elements and causal spatiotemporal logic of the accident, and providing an accurate and comprehensive data foundation for subsequent retrieval and report generation.
[0037] In one embodiment, historical case fragments are retrieved from a preset historical accident briefing database based on the accident graph, and graph reasoning fragments are retrieved based on the accident graph and a preset knowledge graph, resulting in graph reasoning fragments. The historical case fragments and the graph reasoning fragments are then merged to obtain a candidate fragment set, including steps S301 to S303, each step of which is as follows: S301. Convert the accident map into query text, search the preset historical accident briefing database according to the query text, and recall text fragments with similarity higher than the preset text similarity threshold to obtain historical case fragments. Among them, the accident map Convert to natural language query text In a pre-defined historical accident briefing database, a combination of dense vector retrieval and frequency-based sparse retrieval is used, and the similarity scores of the two methods are weighted and fused to calculate candidate documents. The comprehensive relevance score is calculated using the following formula: in, This is a balance coefficient, typically ranging from 0.5 to 0.7. Text embedding representation; For query text; Candidate documents; Cosine similarity is used to measure the similarity between query text and candidate documents. This is a sparse retrieval algorithm based on word frequency; Based on the comprehensive relevance score, text segments with similarity higher than a preset text similarity threshold are recalled; S302. Using the points in the accident graph as the starting point for reasoning, perform graph reasoning retrieval in the preset knowledge graph and recall the text fragments corresponding to the starting point for reasoning to obtain graph reasoning fragments. Among them, the knowledge graph It is a pre-built, static, and comprehensive knowledge base, representing the complete collection of expert experience in an enterprise or industry. Its function is to provide logical extensions for the current incident and help discover hidden causal relationships. and All of them are constructed using natural language processing techniques such as Named Entity Recognition (NER), Relation Extraction (RE), and Semantic Vector Embedding; furthermore, The construction requires a high degree of standardization, including more complex knowledge fusion and ontology alignment. After entities are extracted, they must undergo ambiguity resolution and manual verification by experts to ensure that every edge in the graph (such as "vibration" causing "loose bolts") conforms to physical laws and engineering logic. It does not rely on current accident reports, but is built on structured and semi-structured professional documents accumulated by the company over a long period of time. The main data sources include equipment technical documents, safety failure analysis reports, historical accident case databases, maintenance and inspection records, and industry mechanism models.
[0038] S303. Merge the historical case fragments and the graph reasoning fragments to obtain an initial candidate fragment set, and optimize and remove duplicates from the initial candidate fragment set to obtain the final candidate fragment set.
[0039] The candidate fragment set does indeed contain all recall results. It employs Natural Language Instantiation (NLI) technology to unify heterogeneous data, and its physical representation is all plain text strings (Text Sequences), which can be considered as uniformly formatted candidate fragment input. .
[0040] This invention converts accident graphs into query text, and performs similarity searches from a historical accident briefing database based on the query text to accurately recall historical case fragments. This allows the generated content to fully draw on records and experiences from past real accidents, enhancing the case support and interpretability of the briefings. By using entity points in the accident graph as the starting point for reasoning, deep reasoning retrieval is performed in the knowledge graph to uncover implicit connections and causal mechanisms between accident elements, obtaining graph-based reasoning fragments. This compensates for the shortcomings of pure data retrieval at the professional mechanism level. By merging historical case fragments with graph-based reasoning fragments and further optimizing and deduplicating them, a high-quality candidate fragment set is constructed, effectively integrating both historical experience and professional mechanism information, providing accurate factual evidence for large language models.
[0041] In one embodiment, graph reasoning retrieval is performed in a preset knowledge graph, and the text fragment corresponding to the reasoning starting point is recalled to obtain the graph reasoning fragment, including steps S401 to S402, each step of which is as follows: S401. Based on the inference starting point, perform personalized random walk iterative calculations in the knowledge graph to obtain the node score of the inference starting point; Among them, the nodes of the accident map The set of preference starting points for the walk algorithm Construct personalized preference vectors If node ,but ,otherwise The score vector of each node in the global knowledge graph is calculated using an iterative formula, as follows: in, This is the score vector; This is the transition matrix of the knowledge graph; This represents the probability of restarting. This represents a personalized preference vector. S402. Based on the node scores, select nodes with scores higher than a preset score threshold for text fragment retrieval and splicing to obtain graph reasoning fragments.
[0042] When the iteration converges, the nodes in the knowledge graph are sorted in descending order according to the scores, and the top-K nodes with scores higher than a preset score threshold are extracted (representing deep root cause devices or hidden fault modes). The attribute text of these top-K nodes and the description of the edges connected to the seed nodes are extracted and spliced into natural language fragments (e.g., [flange aging] easily leads to [sealing failure]), which are output as graph reasoning fragments.
[0043] This invention, through personalized random walk iterative calculations in a knowledge graph, dynamically evaluates the correlation strength between each node and the starting point. Then, based on the node scores, nodes with scores higher than a preset threshold are selected as high-scoring nodes. Corresponding text fragments are recalled and spliced to obtain graph reasoning fragments. This fully explores the causal chains and mechanistic paths hidden in the knowledge graph, effectively improving the relevance and accuracy of reasoning recall, and providing in-depth mechanistic support and professional information for the generation of accident reports.
[0044] In one embodiment, the initial candidate fragment set is optimized and deduplicated to obtain the final candidate fragment set, which further includes steps S501 to S502, the specific steps of which are as follows: S501. Extract the accident features from the accident map and calculate the correlation score between the candidate segment set and the corresponding accident features; Specifically, a multimodal large language model is used to scan on-site text and images, identify key dimensions of the accident, and then linearly arrange them according to a predefined schema. The arranged key text is then input into a semantic encoder. Let the extracted structured feature set be... ( (For the sorted key text), the encoding function is: The generated feature vector can then be represented as ,in, To construct a complete string by concatenating all text fragments in set S in order; S502. Based on the relevance score, the candidate segments with similarity higher than the preset segment similarity threshold are iteratively selected from the candidate segment set using the maximum marginal relevance algorithm, and duplicate candidate segments are removed until the iteration condition is met, thus obtaining the final candidate segment set.
[0045] Let the selected document set be... (Initially empty), each time from the remaining set Select document join in Until the preset context length is reached, the formula selection is as follows: in, To adjust the hyperparameters for correlation and diversity weights; Cosine similarity between documents; variables Let S be any element in the set of selected segments. The purpose is to compare the candidate segments. With selected segments By analyzing similarities, duplicate information can be eliminated. Cosine similarity The calculation process is as follows: 1. Vectorization: Using feature extraction models to vectorize text fragments. and Mapped to high-dimensional dense vectors respectively and The details are as follows: , II. Geometric calculation: Calculate the cosine of the angle between these two vectors. The specific formula is as follows: The numerator is the dot product of the two vectors; the denominator is the product of the magnitudes of the two vectors.
[0046] By subtracting the similarity penalty from the selected content, a high-quality and non-redundant final set of candidate fragments is output. .
[0047] This invention extracts accident features from accident maps, quantifies the correlation scores between candidate segments and accident features, and achieves content filtering based on the core elements of the accident. Then, through the maximum marginal correlation algorithm, while taking into account correlation, iteratively selects candidate segments with similarity higher than a preset segment similarity threshold as high similarity segments and dynamically removes duplicate content, effectively balancing the representativeness and diversity of segments, avoiding information redundancy and homogenization, and finally obtaining a high-quality set of candidate segments.
[0048] In one embodiment, a briefing outline is generated using a preset planning agent and the accident graph; a data outline is obtained by appending factual data to the briefing outline using a preset fact extraction agent and the candidate fragment set; and then text is generated using a preset writing agent and the data outline to obtain a first accident briefing. The process also includes steps S601 to S603, each of which is detailed below: S601. Extract accident features from the accident map using a preset planning agent, and generate a briefing outline based on the accident features; In this context, the fact extraction agent acts as an architect, receives the accident features, and outputs a structured directed acyclic graph (DAG) as the outline nodes of the briefing (e.g., accident overview node, mechanism analysis node). Example of the core instructions for the planning agent: "You are responsible for retrieving and matching the most suitable logical structure from the preset briefing template library based on the initial characteristics of the accident (such as equipment type and failure phenomenon). Your output must be an outline in the format of a directed acyclic graph (DAG), where each node represents an information dimension (such as: accident evolution process, direct cause mechanism, secondary risk assessment). Generating specific descriptive text is prohibited; only structured nodes should be output." S602. Extract factual data from the candidate fragment set through a preset factual extraction agent, and attach the factual data to the corresponding node of the briefing outline to obtain a data outline containing constraints. The fact extraction agent acts as a data validator, receiving the reordered candidate fragments. And DAG outline, will The hard facts, such as terms, parameters, and historical reasons, are extracted and precisely attached to the corresponding nodes of the DAG to form a data outline with constraints. Example of the core instructions for the fact extraction agent: "Your input is the DAG nodes for planning the agent's output and the recalled context fragments." Your sole task is to extract hard factual data (e.g., specific temperature values, flange models, historical failure counts) corresponding to each DAG node from the fragments. Constraints: If a fragment lacks a corresponding fact, mark it as 'missing data'; fabricating numbers or conclusions is strictly prohibited. The output must be a list of facts indexed by nodes. S603. The pre-set writing agent generates text based on the data outline. If a logical gap is detected, a reverse query is initiated to the fact extraction agent to obtain supplementary related fact data. The text is then generated in combination with the related fact data, and finally a complete first accident report is output. Among them, the first accident briefing The generation logic aims to maximize the conditional probability, as follows: in, P( ) indicates in , , Given that all three conditions are met, the probability of generating text Y is determined to achieve the optimal solution under the constraints. Y is the text sequence to be generated, representing the candidate briefing text content that the agent attempts to generate. P is the conditional probability distribution, representing the probabilistic inference function of the large language model base. F is the accident feature vector, which provides constraints for the generation process to ensure that the generated briefing always revolves around the core elements of the current accident and prevents deviation from the topic. The role instruction parameters represent the specific system preset instructions given to the writing agent, specifying the generated writing style (rigorous, objective), the preference for the use of professional terminology, and the output format. Example of core instructions for the writing agent: "You are responsible for natural language synthesis based on the 'outline of constrained facts'. Core logic: 1. Strictly adhere to industry technical terminology standards; 2. Maintain an objective and rigorous writing style. Interactive instructions (reverse questioning): During the generation process, if you find that 'data missing' marked by the fact extraction agent causes the paragraph logic to fail to close (e.g., the known conclusion is that the flange is broken, but there is a lack of factual evidence of pressure change), you must immediately stop the generation and issue a 'supplementary test query instruction' to the fact extraction agent, requesting it to perform targeted secondary extraction in the context library." This invention, through a planning agent, generates a briefing outline, clarifying the logical framework and information dimensions of the incident briefing and providing structured guidance for subsequent content generation. A fact extraction agent extracts factual data from a candidate fragment set and appends it to the corresponding nodes of the briefing outline, forming a data outline containing constraints. This ensures that the generated content is strictly based on real parameters, effectively suppressing the illusion of fact in large language models. Furthermore, a writing agent generates text based on the data outline and, upon detecting logical gaps, proactively initiates a reverse query to the fact extraction agent to obtain supplementary related factual data before continuing generation. This achieves dynamic information completion and logical self-consistency during the generation process, ultimately outputting an incident briefing that is factually accurate, logically rigorous, and complete in content.
[0049] In one embodiment, after obtaining the first incident report, the method further includes multi-dimensional review and iterative optimization of the first incident report, and includes step S701, as follows: S701. Based on the comprehensive evaluation result of the incident briefing of the previous iteration, the incident briefing of the current iteration is iteratively updated until the comprehensive evaluation result of the current iteration meets the iteration termination condition, and a second incident briefing is output; wherein, in each iteration, the incident briefing of the previous iteration is evaluated for facts, logic and text content according to the preset review agent, and the comprehensive evaluation result of the current iteration is generated according to the evaluation results; the incident briefing of the current iteration is updated based on the comprehensive evaluation result and the incident briefing of the previous iteration, combined with the writing agent; in the first iteration, the incident briefing of the previous iteration is the first incident briefing.
[0050] The process for each iteration is as follows: I. Multi-dimensional review Three auditing agents were instantiated based on the underlying large language model: a fact-judging agent (checking whether parameters have been tampered with), a logic-judging agent (evaluating the closed-loop nature of the mechanism deduction), and a language-judging agent (auditing the accuracy of terminology). These agents were responsible for auditing the initial version of the briefing. Perform independent evaluation, output scores, a list of conflict points / omissions, and modification suggestions; the core task of the fact-checking agent is to compare the results with the first incident report. Based on the accident characteristics and multimodal raw data, factual conflicts are identified (e.g., writing "Unit 2" as "Unit 3"). The logic-judging agent examines the cause analysis section of the report based on the graph reasoning fragments to analyze the causal chain between entities (e.g., whether there is an intermediate logical break between "overpressure" and "rupture") and assess the scientific validity of the conclusions. The language-judging agent scans the terminology density in the text to ensure the use of ontology standard words and verifies whether the text conforms to a concise and objective report writing style. II. Generating a Reflection Log The overall quality score of the first incident report is calculated using a weighted calculation formula, as follows: in, Preset weights; The normalized score between 0 and 1 for each agent's output; like Below the preset threshold (For example, 0.85) Referee agents with lower scores will automatically generate targeted reflection tracks. For example, "the mechanism analysis section omitted the preconditions for flange aging."
[0051] III. Closed-loop rewriting The first draft of the briefing Reflection Log The data is then assembled and fed back into the writing agent for the second time. The wheel's correction generation is as follows: in, The draft incident briefing generated for round t; The reflection log generated for round t; For the set of candidate segments; Continue the iterative loop until the overall score is reached. Or, after reaching the maximum number of iterations, the final draft of the second incident briefing will be output.
[0052] This invention employs a pre-defined review agent to independently evaluate the generated incident briefing from multiple dimensions, including facts, logic, and text. This generates detailed sub-scores and modification suggestions, enabling a comprehensive quantitative diagnosis of the briefing's quality. A comprehensive quality score is calculated based on these sub-scores, and a reflection log is automatically generated, establishing a traceable link between quality defects and optimization directions. By concatenating the reflection log with the initial incident briefing and re-inputting it into the writing agent for iterative correction until the iteration termination condition is met, a final draft briefing is output, forming a closed-loop processing mechanism. This achieves automated and continuous optimization of the incident briefing's quality, significantly improving the factual accuracy, logical rigor, and standardized expression of the text.
[0053] like Figure 2 As shown in the production accident briefing generation based on intelligent agents, a corresponding system implementation is provided based on the above method implementation. This invention provides a production accident briefing generation system based on intelligent agents, including: an accident map construction module 801, a candidate fragment retrieval module 802, and an accident briefing generation module 803; The accident graph construction module 801 is used to construct an accident graph of production accidents based on the acquired multimodal raw data; wherein, the points of the accident graph are entities of accident events; and the edges of the accident graph are used to represent the causal spatiotemporal relationships between the entities. The candidate fragment retrieval module 802 is used to retrieve fragments from a preset historical accident briefing database based on the accident graph to obtain historical case fragments, and simultaneously retrieve graph reasoning fragments based on the accident graph and a preset knowledge graph to obtain graph reasoning fragments. The historical case fragments and the graph reasoning fragments are then merged to obtain a candidate fragment set. The accident briefing generation module 803 is used to generate a briefing outline through a preset planning agent and the accident map, add factual data to the briefing outline through a preset fact extraction agent and the candidate fragment set to obtain a data outline, and then generate text through a preset writing agent and the data outline to obtain a first accident briefing.
[0054] This invention constructs an accident map of production accidents, transforming raw data such as text and images from the scene into an accident map containing entities and their causal spatiotemporal relationships, laying a data foundation for subsequent element extraction of production accidents. Then, based on the accident map, it retrieves fragments from a historical accident report database and uses a knowledge graph for graph reasoning fragment retrieval, obtaining a set of candidate fragments that integrates historical experience and professional mechanisms. This overcomes the limitations of traditional single-channel retrieval with limited information and effectively suppresses the illusion of fact in large language models. A planning agent generates a report outline, clarifying the logical framework and information dimensions of the report. A fact extraction agent adds factual data to the report outline, ensuring that the generated content is strictly based on real parameters. Finally, a pre-set writing agent generates text, obtaining an accident report containing core accident elements, logical rigor, and standardized terminology, achieving automated and intelligent generation of accident reports and providing timely and accurate decision-making basis for safety supervisors.
[0055] It is understood that the above system item embodiments correspond to the method item embodiments of the present invention, and can implement the agent-based production accident briefing generation method provided by any of the above method item embodiments of the present invention.
[0056] It should be noted that the system embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0057] For ease of description and brevity, the system embodiments of the present invention include all the implementation methods described in the above embodiments of the production accident briefing generation method based on intelligent agents, and will not be repeated here.
[0058] Based on the above embodiments of the agent-based production accident briefing generation method, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the agent-based production accident briefing generation method of any embodiment of the present invention.
[0059] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0060] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0061] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0062] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the agent-based production accident briefing generation method described in any of the above-described method embodiments of the present invention.
[0063] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0064] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for generating production accident briefings based on intelligent agents, characterized in that, include: Based on the acquired multimodal raw data, an accident graph of production accidents is constructed; wherein, the points in the accident graph are entities of accident events; and the edges in the accident graph are used to represent the causal spatiotemporal relationships between the entities. Based on the accident graph, a search segment is performed in the preset historical accident briefing database to retrieve historical case segments. At the same time, a graph reasoning segment is retrieved based on the accident graph and the preset knowledge graph to retrieve graph reasoning segments. The historical case segments and the graph reasoning segments are merged to obtain a candidate segment set. A briefing outline is generated using a pre-defined planning agent and the accident graph. A data outline is obtained by adding factual data to the briefing outline using a pre-defined fact extraction agent and the candidate fragment set. Then, text is generated using a pre-defined writing agent and the data outline to obtain the first accident briefing.
2. The method for generating production accident reports based on intelligent agents as described in claim 1, characterized in that, After obtaining the first incident report, the process also includes multi-dimensional review and iterative optimization of the first incident report, specifically: Based on the comprehensive evaluation results of the previous iteration's incident report, the current iteration's incident report is iteratively updated until the comprehensive evaluation results of the current iteration meet the iteration termination conditions, and the second incident report is output. In each iteration, the incident report from the previous iteration is evaluated for facts, logic, and text content according to a preset review agent, and a comprehensive evaluation result for the current iteration is generated based on the evaluation results. The incident report for the current iteration is updated based on the comprehensive evaluation result and the incident report from the previous iteration, combined with the writing agent. In the first iteration, the incident report from the previous iteration is the first incident report.
3. The method for generating production accident reports based on intelligent agents as described in claim 1, characterized in that, The process involves generating a briefing outline using a pre-defined planning agent and the accident graph; adding factual data to the briefing outline using a pre-defined fact extraction agent and the candidate fragment set to obtain a data outline; and then generating text using a pre-defined writing agent and the data outline to obtain the first accident briefing. Specifically: Accident features are extracted from the accident map using a pre-defined planning agent, and a briefing outline is generated based on the accident features. The fact data is extracted from the candidate fragment set by a preset fact extraction agent, and the fact data is attached to the corresponding node of the briefing outline to obtain a data outline containing constraints. The pre-defined writing agent generates text based on the data outline. If a logical gap is detected, a reverse query is initiated to the fact extraction agent to obtain supplementary related fact data. The text is then generated by combining the related fact data, and finally a complete first accident report is output.
4. The method for generating production accident reports based on intelligent agents as described in claim 1, characterized in that, The process involves retrieving historical case fragments from a pre-defined historical accident briefing database based on the accident graph, and simultaneously retrieving graph inference fragments from the accident graph and a pre-defined knowledge graph to obtain graph inference fragments. The historical case fragments and the graph inference fragments are then merged to obtain a candidate fragment set. Specifically: The accident map is converted into query text. Based on the query text, a search is performed in a preset historical accident briefing database, and text fragments with similarity higher than a preset text similarity threshold are recalled to obtain historical case fragments. Using the points in the accident graph as the starting point for reasoning, graph reasoning retrieval is performed in the preset knowledge graph, and the text fragments corresponding to the reasoning starting point are recalled to obtain graph reasoning fragments. The historical case fragments and the graph reasoning fragments are merged to obtain an initial candidate fragment set. The initial candidate fragment set is then optimized and deduplicated to obtain the final candidate fragment set.
5. The method for generating production accident reports based on intelligent agents as described in claim 4, characterized in that, The step of performing graph reasoning retrieval in a preset knowledge graph and recalling the text fragments corresponding to the reasoning starting point to obtain graph reasoning fragments specifically involves: Based on the inference starting point, a personalized random walk iterative calculation is performed in the knowledge graph to obtain the node score of the inference starting point; Based on the node scores, nodes with scores higher than a preset threshold are selected for text fragment retrieval and splicing to obtain graph reasoning fragments.
6. The method for generating production accident reports based on intelligent agents as described in claim 4, characterized in that, The process of optimizing and deduplicating the initial candidate fragment set to obtain the final candidate fragment set specifically involves: Extract the accident features from the accident map, and calculate the correlation score between the candidate segment set and the corresponding accident features; Based on the relevance score, the maximum marginal relevance algorithm iteratively selects candidate segments from the candidate segment set whose similarity is higher than a preset segment similarity threshold, and removes duplicate candidate segments until the iteration condition is met, thus obtaining the final candidate segment set.
7. The method for generating production accident reports based on intelligent agents as described in claim 1, characterized in that, The step of constructing an accident map of production accidents based on the acquired multimodal raw data is as follows: The preset multimodal large language model is invoked to parse and extract the acquired multimodal raw data to obtain the entities of the accident events of the production accident and the causal spatiotemporal relationship between the entities; Based on the entities and the causal spatiotemporal relationships, an accident map of production accidents is constructed.
8. A production accident briefing generation system based on intelligent agents, characterized in that, include: The accident map construction module, the candidate fragment retrieval module, and the accident briefing generation module; The accident graph construction module is used to construct an accident graph of production accidents based on the acquired multimodal raw data; wherein, the points in the accident graph are entities of accident events; and the edges in the accident graph are used to represent the causal spatiotemporal relationships between the entities. The candidate fragment retrieval module is used to retrieve fragments from a preset historical accident briefing database based on the accident graph to obtain historical case fragments, and simultaneously retrieve graph reasoning fragments based on the accident graph and a preset knowledge graph to obtain graph reasoning fragments. The historical case fragments and the graph reasoning fragments are then merged to obtain a candidate fragment set. The accident briefing generation module is used to generate a briefing outline through a preset planning agent and the accident graph, add factual data to the briefing outline through a preset fact extraction agent and the candidate fragment set to obtain a data outline, and then generate text through a preset writing agent and the data outline to obtain a first accident briefing.
9. A terminal device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the agent-based production accident briefing generation method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the agent-based production accident briefing generation method as described in any one of claims 1-7.
