Risk analysis agent system and method based on large model and early warning model cooperation
By employing a risk analysis approach that integrates large-scale models and early warning models, a closed loop is constructed from natural language requests to data queries and interpretations. This solves the problem of data boundary drift in hazardous chemical production, achieves stability and consistency in assessment and interpretation, and ensures the traceability of reports and the consistency of query specifications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA ACAD OF SAFETY SCI & TECH
- Filing Date
- 2025-11-20
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies lack stable anchor points in the risk analysis of hazardous chemical production, leading to data boundary drift and inconsistent assessment interpretations, making it difficult to achieve end-to-end traceability and consistency.
A risk analysis approach that combines large-scale models and early warning models is adopted. By constructing a collaborative closed loop from natural language requests to data queries, early warning model evaluation, and knowledge interpretation, the risk analysis specification is generated by fine-tuning the large-scale language model using domain instructions. Combined with the preferred model path, the alternative hypothesis mapping table, and the directional replanning rules, the consistency of the boundaries of device identification, time range, and indicator fields is ensured.
It achieves stability and consistency in the assessment and interpretation of risk analysis in the production of hazardous chemicals, avoids data boundary drift, ensures the traceability of reports and the consistency of query specifications, and meets the stable delivery requirements for the interpretation of early warnings of major hazard sources.
Smart Images

Figure CN121526327B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of safety risk analysis technology for hazardous chemical production, and in particular to a risk analysis method and system based on the synergy of a large model and an early warning model. Background Technology
[0002] The operation of hazardous chemical production facilities involves multi-source monitoring data, historical trends, and process safety knowledge. On-site early warning relies on the accurate reference and interpretation of facility identification, time ranges, and indicators. Business personnel often submit analysis requests in natural language, hoping they will be converted into executable structured queries and fed into early warning models for evaluation, while simultaneously generating actionable reports based on failure mechanisms and evidence patterns. Due to inconsistent sampling intervals, units, and field naming, as well as frequent scenario changes, maintaining consistency in data boundaries and terminology becomes a fundamental requirement for automated risk analysis. In the management of major hazard sources, the interpretation results must be traceable, verifiable, and able to be linked in a closed loop with existing knowledge bases and process specifications. Therefore, end-to-end integration from natural language to models and knowledge, as well as boundary-stable automatic orchestration, has become a common focus in the industry.
[0003] Existing technologies mostly employ rule dictionaries or template-driven natural language parsing to map the device, time, and indicators in the request into structured queries. After acquiring historical and real-time data, they perform quantitative assessments and generate risk scores based on preset early warning models or algorithm libraries. Some solutions combine knowledge bases and process specifications to provide mechanistic explanations and matching suggestions for handling anomalies; others use orchestration engines to implement streamlined tools for data retrieval, model invocation, and report generation, supporting field unit conversion, sampling alignment, and indicator-level display to form routine early warning and explanation outputs for major hazard sources. At the implementation level, common practices include constructing SQL or time-series query commands by merging aliases in the thesaurus and standardizing time expressions; the model side mainly focuses on threshold determination, trend fitting, and rule base comparison, and outputs explanatory content using report templates. Orchestration systems typically support the invocation and switching of multiple model paths, completing data acquisition, evaluation, and documentation step by step, and finally delivering data with device and time tags.
[0004] However, existing solutions generally lack a closed-loop organization centered on the candidate failure mechanism—evidence pattern—early warning model path, resulting in a lack of stable anchor points between evaluation and interpretation. Secondly, model path switching often relies on strategy or operator adaptation, which is easily accompanied by implicit changes in device, time, and indicator boundaries, leading to data boundary drift and difficulties in tracing the source. Thirdly, the judgment rules and feature extraction methods are not standardized and solidified, making it difficult to ensure consistent application and repeatable judgment of features such as slope and mean across different stages.
[0005] Therefore, a production risk analysis method and system that can overcome the shortcomings of the existing technology is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a risk analysis method and system based on the collaboration of a large-scale model and an early warning model. In the scenario of risk analysis for hazardous chemical production, this invention constructs a collaborative closed loop from natural language requests to data queries, early warning model evaluation, and knowledge interpretation. This ensures that the evaluation and interpretation always converge around candidate failure mechanisms, and strictly locks the boundaries of device identifiers, time ranges, and indicator fields throughout the path switching process, avoiding data boundary drift and ensuring that judgments and reports are directly traceable to the query specifications and stably delivered in the interpretation of early warnings for major hazard sources. Specifically, this requires unifying the reference of feature calculation and verification criteria, solidifying the binding relationship between query specifications and hypothesis identifiers, and orchestrating and executing natural language, model paths, and knowledge base entries within a single boundary, thereby achieving end-to-end consistency and traceability in actual device scenarios.
[0007] A risk analysis method based on the synergy of a large model and an early warning model according to an embodiment of the present invention includes the following steps:
[0008] S1. Receive natural language task requests, parse the identification, time range and monitoring indicators of hazardous chemical production facilities, and form a description of the analysis target;
[0009] S2. Based on the analysis objective description, use domain instructions to fine-tune the large language model to generate a risk analysis specification. The risk analysis specification includes query specifications, risk hypothesis set and verification criteria. The query specifications limit device identifier, time range and indicator fields. The risk hypothesis set provides candidate failure mechanisms, corresponding evidence patterns and their early warning model path labels. The verification criteria are used to determine the consistency between the quantitative assessment results and the evidence patterns. Output the risk analysis specification.
[0010] S3. Based on the risk analysis specification, the risk analysis task orchestration agent generates a task execution plan object. The task execution plan object includes a preferred model path, a candidate hypothesis mapping table, and a directional replanning rule. The directional replanning rule stipulates that when the verification criteria are not met, the model path is switched according to the candidate hypothesis mapping table while keeping the query specification unchanged, so that the evaluation and interpretation converge around the risk hypothesis, and the task execution plan object is output.
[0011] S4. Based on the query specifications and task execution plan objects, generate structured query instructions and obtain target data objects, maintaining consistency between fields and time boundaries under the constraints of directional replanning rules;
[0012] S5. Calculate the quantitative evaluation results based on the target data object and the preferred model path. Determine the results based on the verification criteria. If the results are met, generate a determined hypothesis identifier. If the results are not met, generate a candidate hypothesis identifier.
[0013] S6. Based on hypothesis identification and quantitative evaluation results, retrieve the knowledge base using hypothesis identification as the anchor point and generate explanation and disposal report objects;
[0014] S7. Output the interpretation and handling report as the interpretation result of the early warning of major hazard sources.
[0015] Optionally, step S1 specifically includes:
[0016] Using natural language task requests as input, text normalization and sentence segmentation are performed to establish a parsing channel for the identification, time range and monitoring indicators of hazardous chemical production facilities, and to remove modifiers and redundant descriptions that are irrelevant to the task.
[0017] Identify hazardous chemical production facility identifiers from natural language task requests, merge referentials and aliases, and determine a single, referable hazardous chemical production facility identifier.
[0018] The time range is analyzed, the start and end times are identified, and the absolute and relative times are unified to form a time range that includes the start and end times.
[0019] The monitoring indicators are analyzed, mapped to indicator fields, and the units of measurement and sampling intervals are standardized. The target description is then assembled and analyzed based on the identified hazardous chemical production equipment, time range, and monitoring indicators.
[0020] The format of the analysis target description is validated to ensure that the identification of the hazardous chemical production unit is unique, the time range includes the start and end times, the monitoring indicators correspond to the indicator fields and the units are consistent, and the analysis target description can be directly referenced.
[0021] Optionally, step S2 specifically includes:
[0022] The analysis target description is taken as input, and domain instructions are invoked to fine-tune the large language model to generate a three-part structure of risk analysis specification, which clearly includes query specifications, risk hypothesis set and verification criteria, and establishes the reference relationship between query specifications, risk hypothesis set and verification criteria.
[0023] Based on the device identifier, time range, and monitoring indicators in the analysis target description, a query specification is generated, limiting the device identifier, time range, and indicator fields, and performing item-by-item mapping and unification so that the query specification can be directly used for structured query commands.
[0024] Generate a risk hypothesis set, take candidate failure mechanisms as units, determine the corresponding evidence modes, and bind a warning model path label to each candidate failure mechanism, so that the candidate failure mechanism, evidence mode and warning model path label form a parameterized referenceable set.
[0025] Generate verification criteria, set judgment boundaries and comparison relationships based on the evidence patterns in the risk hypothesis set, specify the consistency judgment method between the quantitative assessment results and the evidence patterns, and give the judgment output of consistency and inconsistency;
[0026] Perform consistency verification on the risk analysis specification, check the consistency of terminology and closure of references in the query specifications, risk assumption set and verification criteria, and confirm the constraint relationship between the early warning model path label and device identifier, time range and indicator field;
[0027] In the risk analysis specification generation stage, pre-constraints such as early warning model path labels and verification criteria are introduced. These constraints are used as the input starting point for subsequent task execution plan objects to ensure that task arrangement and interpretation converge around candidate failure mechanisms.
[0028] The query specifications, risk hypothesis set, and verification criteria are standardized in a uniform format, and the boundaries of device identification, time range, and indicator fields are kept consistent, outputting a risk analysis specification.
[0029] Optionally, step S3 specifically includes:
[0030] Using the risk analysis specification as input, the risk analysis task orchestration agent parses the query specification, risk hypothesis set, and verification criteria, extracts the device identifier, time range, and indicator fields from the query specification, extracts the candidate failure mechanism, evidence mode, and early warning model path label from the risk hypothesis set, extracts the judgment boundary and comparison relationship from the verification criteria, and establishes the mapping relationship between the above content and the field of the task execution plan object.
[0031] Based on the early warning model path labels in the query specifications and risk assumption set, the preferred model path is determined. Priority is given to selecting early warning model path labels that are completely consistent with the set of indicator fields in the query specifications. If no completely consistent ones are found, the one with the largest number of required indicator fields is selected. The binding method of device identifier, time range and indicator fields is fixed in the preferred model path.
[0032] Construct a candidate hypothesis mapping table, decompose the verification criteria into decision items according to the indicator fields, use the decision items as indexes, assign a candidate failure mechanism and its early warning model path label to each decision item, require that the evidence mode corresponding to the specified early warning model path label directly involves the indicator field corresponding to the decision item, and record the switching direction between the candidate failure mechanism and the preferred model path.
[0033] Generate targeted replanning rules, with the judgment result of the verification criteria as the trigger condition. When any judgment item is not met, switch to the corresponding early warning model path label according to the candidate hypothesis mapping table, keep the query specifications unchanged, prohibit modification of device identifier, time range and indicator fields, and keep the judgment boundary and comparison relationship of the verification criteria unchanged.
[0034] In the directional replanning rules, switchover sequence control is set, and the switchover is triggered one by one according to the listing order of the judgment items in the verification criteria. Parallel triggering is prohibited, and the output definition of the quantitative evaluation results in the task execution plan object is used after the switchover.
[0035] Pre-defined hypothesis identifier generation rules are set in the task execution plan object to form hypothesis identifiers by corresponding candidate failure mechanisms with the path labels of the early warning model one by one, and the pointers of the hypothesis identifiers to be generated are updated when switching paths, so that the hypothesis identifiers can be consistent with the query specifications.
[0036] The preferred model path, the alternative hypothesis mapping table, and the directional replanning rules are assembled into a task execution plan object, and the task execution plan object is output.
[0037] Optionally, step S4 specifically includes:
[0038] The query specification and task execution plan object are taken as input. The device identifier, time range and indicator fields in the query specification are parsed, and the preferred model path and directional replanning rules in the task execution plan object are parsed. The binding method in the task execution plan object is used as a constraint to generate structured query instructions.
[0039] Generate a structured query instruction based on the query specification, limiting the device identifier to the device identifier in the query specification, the time boundary to the time range in the query specification, and the fields to the indicator fields in the query specification, thus forming a structured query instruction that can be executed directly.
[0040] Execute the structured query command to obtain the target data object. When the directional replanning rule triggers the path switching, keep the query specifications unchanged according to the directional replanning rule and repeatedly execute the structured query command to ensure that the device identifier, time range and indicator fields are consistent with the query specifications.
[0041] Perform consistency checks on the target data object, verifying that the indicator fields of the target data object cover the indicator fields in the query specification, verifying that the time boundary of the target data object covers the time range in the query specification, and confirming that the target data object can be directly referenced by the preferred model path or the switched early warning model path.
[0042] Optionally, step S5 specifically includes:
[0043] The target data object and the preferred model path are used as inputs. The target data object is quantitatively calculated according to the preferred model path to generate a quantitative evaluation result.
[0044] Based on the judgment boundaries and control relationships in the verification criteria, the consistency of the quantitative evaluation results is determined, and a judgment result of whether the results are met or not is obtained.
[0045] When the consistency judgment is satisfied, the candidate failure mechanism and the early warning model path label are combined to generate the determined hypothesis identifier, and the determined hypothesis identifier is kept consistent with the device identifier, time range and indicator field.
[0046] When the consistency judgment is not met, the candidate failure mechanism and the early warning model path label are combined to generate a candidate hypothesis identifier, and the candidate hypothesis identifier is referenced in a consistent manner with the device identifier, time range and indicator field.
[0047] Optionally, step S6 specifically includes:
[0048] Using the hypothesis identifier and quantitative evaluation results as input, the knowledge base is retrieved with the hypothesis identifier as the anchor point. The retrieval scope is limited to the candidate failure mechanisms and evidence patterns corresponding to the hypothesis identifier, and the boundaries of the device identifier, time range and indicator fields in the query specification are followed.
[0049] Based on the evidence patterns corresponding to the hypothesis labels in the knowledge base, the judgment boundaries and control relationships in the verification criteria are used to compare the quantitative evaluation results and form a comparative conclusion that the mechanisms are consistent or inconsistent.
[0050] Based on the comparison conclusions, the correspondence between the hypothesis identifier, quantitative evaluation results and evidence patterns is written into the interpretation and disposal report object, and the correspondence between the device identifier, time range and indicator field of the query specification is clearly defined in the interpretation and disposal report object;
[0051] Based on the correspondence between the knowledge base and the hypothesis identifiers, the comparison conclusions are merged to generate an explanation and handling report object, which is then marked with the device identifier, time range, and indicator fields in the query specifications, and the explanation and handling report object is output.
[0052] Optionally, step S7 specifically includes:
[0053] Align the objects of the explanation and handling report with the query specifications, and use the device identifier, time range and indicator fields in the query specifications for identification. Use the hypothesis identifier and quantitative evaluation results as reference items for the objects of the explanation and handling report, and form the corresponding explanation and handling content based on the judgment conclusion of the verification criteria. List the candidate failure mechanism and early warning model path label corresponding to the hypothesis identifier in the objects of the explanation and handling report.
[0054] Perform consistency verification on the objects of the explanation and disposal report to confirm that the hypothesis identifier, quantitative evaluation results and device identifier, time range and indicator fields in the query specifications are consistent. Confirm that the device identifier, time range and indicator fields do not change in both the case of triggering and not triggering the directional replanning rule, and retain the consistency verification conclusion.
[0055] Mark the identified hypothesis or alternative hypothesis in the interpretation and handling report object, and associate it with the early warning model path label and the judgment conclusion of the verification criteria to ensure that each item can be directly traced by the query specification. At the same time, maintain consistent referencing of device identifier, time range and indicator field, and output the interpretation and handling report object as the early warning interpretation result of major hazard source.
[0056] A risk analysis intelligent agent system based on the collaboration of a large model and an early warning model includes:
[0057] The natural language parsing module is used to parse the identification, time range and monitoring indicators of hazardous chemical production facilities and generate a description of the analysis target.
[0058] The risk analysis specification generation module is used to call domain commands to fine-tune the large language model and generate query specifications, risk hypothesis sets, and verification criteria.
[0059] The risk analysis task orchestration module is used to generate task execution plan objects that include preferred model paths, candidate hypothesis mapping tables, and directional replanning rules;
[0060] The query and data acquisition module is used to generate structured query instructions and acquire target data objects based on query specifications and task execution plan objects;
[0061] The quantitative assessment and hypothesis labeling module is used to calculate the quantitative assessment results according to the preferred model path and generate determined hypothesis labels or candidate hypothesis labels according to the verification criteria.
[0062] The knowledge retrieval and interpretation generation module is used to retrieve knowledge bases using hypothesis identifiers as anchors and generate interpretation and disposal report objects based on evidence patterns and quantitative evaluation results.
[0063] The alignment and output module is used to align the interpretation and handling report objects with the query specifications and perform consistency verification, associate the early warning model path labels with the judgment conclusions, and output the interpretation results of the major hazard source early warning.
[0064] The beneficial effects of this invention are:
[0065] 1. This proposal puts forward an improved method for risk analysis task orchestration and targeted replanning. Based on the ternary organization of "candidate failure mechanism - evidence model - early warning model path", it adopts the technical means of preferred model path selection, candidate hypothesis mapping table and unmodifiable field set, and uses the judgment item of the verification criterion as the trigger for single-step switching control. The preferred path is determined by the matching score of coverage priority and extension penalty. During the switching process, the binding method of device identifier, time range and indicator field is fixed and the established output definition is used. The improved method maintains the stability of data boundary throughout the model path switching process, so that the assessment and interpretation always converge around the failure mechanism, avoids data boundary drift, and ensures the consistency and traceability of report and query specifications, meeting the stable delivery requirements of early warning interpretation of major hazard sources on site.
[0066] 2. This proposal puts forward a novel three-stage risk analysis specification generation method and hypothesis labeling mechanism. It utilizes a large language model with domain instruction fine-tuning to output a closed structure containing query specifications, risk hypothesis sets, and verification criteria. During the generation stage, it explicitly binds the early warning model path labels and judgment trigger relationships, and completes the verification of terminology consistency, reference closure, and boundary locking constraints. The technical means include a unified executable description of slope and mean features, sampling interval alignment and weighted consistency scores, and hypothesis labels composed of "candidate failure mechanism + path label" (carrying device, time, and field meta-information). The method ensures that the judgment rules maintain consistent reference in all stages of parsing, evaluation, and interpretation, ensuring the repeatability of mechanism judgment and the accuracy of field-level comparison, and providing a stable anchor point for knowledge retrieval and processing generation.
[0067] 3. This proposal puts forward a collaborative method that aligns natural language parsing with structured querying, quantitative assessment, and knowledge retrieval. It uses query specifications to lock boundaries and generate structured query instructions, combines time coverage, field coverage, and sampling consistency checks to obtain target data objects, and uses hypothesis markers as anchors to drive knowledge base retrieval and report generation. Finally, it outputs a major hazard source early warning interpretation result aligned with the query specifications. The overall method ensures usable data enters the assessment through a data consistency score threshold. The reporting stage performs hypothesis marker metadata verification, quantitative result boundary verification, and path switching stability verification, forming an end-to-end referable closed loop. Unlike existing practices that use templates or strategy adaptations for process assembly, this proposal uses boundary stability and mechanism anchoring as core designs, enabling natural language, model paths, and knowledge base entries to be orchestrated and executed within a single boundary, solving the collaborative closed loop and traceability consistency issues from a scenario perspective. Attached Figure Description
[0068] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0069] Figure 1 This is a flowchart of a risk analysis method based on the collaboration of a large model and an early warning model proposed in this invention;
[0070] Figure 2 This is a natural language parsing flowchart of a risk analysis method based on the collaboration of a large model and an early warning model proposed in this invention;
[0071] Figure 3 This is a flowchart illustrating the generation process of a risk analysis specification for a risk analysis method based on the collaboration of a large model and an early warning model proposed in this invention.
[0072] Figure 4 This is a flowchart of the task orchestration and directional replanning process for a risk analysis method based on the collaboration of a large model and an early warning model proposed in this invention.
[0073] Figure 5 This is a flowchart illustrating the structured query and data acquisition process of a risk analysis method based on the collaboration of a large model and an early warning model proposed in this invention.
[0074] Figure 6 This is a flowchart illustrating the quantitative assessment and judgment process of a risk analysis method based on the synergy of a large model and an early warning model proposed in this invention.
[0075] Figure 7 This is a before-and-after comparison view of the directional replanning of a risk analysis intelligent agent system based on the collaboration of a large model and an early warning model proposed in this invention;
[0076] Figure 8 This is a screenshot showing the system integration overview of a production risk analysis system based on the collaboration of a large model and an early warning model proposed in this invention. Detailed Implementation
[0077] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0078] refer to Figures 1 to 8 A risk analysis method based on the collaboration of a large model and an early warning model, characterized by the following steps:
[0079] S1. Receive natural language task requests, parse the identification, time range and monitoring indicators of hazardous chemical production facilities, and form a description of the analysis target;
[0080] S2. Based on the analysis objective description, use domain instructions to fine-tune the large language model to generate a risk analysis specification. The risk analysis specification includes query specifications, risk hypothesis set and verification criteria. The query specifications limit device identifier, time range and indicator fields. The risk hypothesis set provides candidate failure mechanisms, corresponding evidence patterns and their early warning model path labels. The verification criteria are used to determine the consistency between the quantitative assessment results and the evidence patterns. Output the risk analysis specification.
[0081] S3. Based on the risk analysis specification, the risk analysis task orchestration agent generates a task execution plan object. The task execution plan object includes a preferred model path, a candidate hypothesis mapping table, and a directional replanning rule. The directional replanning rule stipulates that when the verification criteria are not met, the model path is switched according to the candidate hypothesis mapping table while keeping the query specification unchanged, so that the evaluation and interpretation converge around the risk hypothesis, and the task execution plan object is output.
[0082] S4. Based on the query specifications and task execution plan objects, generate structured query instructions and obtain target data objects, maintaining consistency between fields and time boundaries under the constraints of directional replanning rules;
[0083] S5. Calculate the quantitative evaluation results based on the target data object and the preferred model path. Determine the results based on the verification criteria. If the results are met, generate a determined hypothesis identifier. If the results are not met, generate a candidate hypothesis identifier.
[0084] S6. Based on hypothesis identification and quantitative evaluation results, retrieve knowledge base using hypothesis identification as anchor point and generate explanation and disposal report objects.
[0085] In this embodiment, step S1 specifically includes:
[0086] Let the natural language task request be denoted as Before entering the parsing process, Text standardization and sentence segmentation are performed. Character standardization is adopted to convert full-width characters to half-width characters, unify Chinese numerals to Arabic numerals, unify unit expressions to standard unit words, and use periods, semicolons and commas as segmentation boundaries to form sentence segment sequences.
[0087] Establish parsing channels for the identification, time range, and monitoring indicators of hazardous chemical production facilities. Perform term matching and structure extraction in the corresponding channels, and remove modifiers and redundant descriptions that are irrelevant to the task at the channel entrance to ensure that subsequent extraction only applies to the segments directly related to the identification, time range, and monitoring indicators of hazardous chemical production facilities.
[0088] In the resolution of hazardous chemical production equipment identification, the sentence sequence is input into the hazardous chemical production equipment identification resolution channel, and the hazardous chemical production equipment identification vocabulary is used for matching. Candidate segments are extracted and the main segment is determined according to the longest matching priority strategy.
[0089] Construct an identification mapping table for hazardous chemical production facilities, merge designations and aliases, and map all candidate fragments to a unique identifier. ;
[0090] When multiple candidate segments are mapped to different identifiers, the identifier corresponding to the segment appearing in the first sentence is given priority, and subsequent segments are eliminated while maintaining the original identifier. only;
[0091] When multiple fragments are mapped to the same identifier, that identifier is retained. Remove duplicate segments to ensure that a single, referable identifier for a hazardous chemical production facility is identified.
[0092] In time range analysis, the absolute and relative times in the sentence segment sequence are unified;
[0093] The absolute time phrase is directly parsed into start time and end time, denoted as follows: and The relative time phrase is recorded using the system timestamp. Perform the conversion if the phrase is in the past. Minutes, then the time range is denoted as ;
[0094] When multiple time expressions exist, a candidate time range set is generated. Calculate the intersection ,like If not empty, then As a time range;
[0095] like If empty, then take the extended coverage area. As a time range;
[0096] This ultimately forms a time range that includes both start and end times. and the identification of hazardous chemical production facilities. Bind;
[0097] In the analysis of monitoring indicators, the nouns of monitoring indicators are extracted from the sentence sequence to form a set of monitoring indicators, denoted as . ;
[0098] Each monitoring indicator Mapped to system-referenceable indicator fields, forming a set of indicator fields denoted as . ;
[0099] The unit of measurement for each monitoring indicator is standardized, and the mentioned units are normalized to the standard units of the corresponding indicator fields. The sampling interval is standardized to the sampling interval explicitly mentioned in the natural language task request. If not explicitly mentioned, the default sampling interval for the current monitoring indicator is used as the standardized value. ;
[0100] After unifying the units and sampling intervals, the hazardous chemical production facilities will be labeled. Time range With indicator field set The components are assembled to form a description of the analysis objectives, ensuring the correspondence and referenceability between the various components;
[0101] In the format validation, completeness and consistency checks are performed on the description of the analysis target;
[0102] Verify the uniqueness of the identification of hazardous chemical production facilities to confirm that only one exists. And it is consistent with the segments in the sentence sequence;
[0103] Verify the integrity of the time range boundaries and confirm the time range. Includes start time With end time ,and ;
[0104] Verify the consistency of fields for monitoring indicators and confirm the set of monitoring indicators. With indicator field set —Correspondingly, after confirming that the units are unified, all indicator fields use standard units; after confirming that the sampling interval is unified, all indicator fields share the same sampling interval. ;
[0105] After the above verification is satisfied, the output is a description of the analysis target that can be directly referenced in subsequent steps, and the identification of hazardous chemical production facilities, time range and indicator fields in the description of the analysis target are consistently referenced in subsequent objects.
[0106] In this embodiment, step S2 specifically includes:
[0107] Let the description of the analysis objective be denoted as... This includes device identification. Time range With indicator field set ;
[0108] Will As input, domain-specific instructions are invoked to fine-tune the large language model, utilizing system prompts. Domain instructions With structural constraints The combination requires the output to strictly follow a three-part structure, corresponding to the query specification, risk hypothesis set, and verification criteria respectively. During the generation stage, the reference links from the query specification to the risk hypothesis set and from the risk hypothesis set to the verification criteria should be explicitly established, so that the three can maintain consistent boundaries in terms of device identification, time range, and indicator fields and can reference each other.
[0109] When generating query specifications, with , and Perform item-by-item mapping for the input;
[0110] The device identifier is limited to Limit the time range to The start and end times in the data limit the indicator field to: All fields in;
[0111] Field names should follow the same naming rules as the indicator field set; units should follow the same unit rules as the indicator field set; and sampling intervals should use the sampling intervals already standardized in the analysis objective description. Write boundary locking constraints within the query specification to stipulate that the device identifier, time range, and indicator fields cannot be modified in subsequent objects and can only be called as references, so as to ensure consistency between the generation of subsequent structured query instructions and the task execution plan object;
[0112] When generating the risk hypothesis set, the set is constructed on a per-candidate failure mechanism basis;
[0113] Let each candidate failure mechanism be denoted as... In the set of indicator fields Screening and The subset of fields directly related to the mechanism is denoted as ;
[0114] Based on existing knowledge bases and process safety specifications The mechanism is developed to generate an evidence pattern, which clearly describes the expected characteristics, cross-comparison relationships and allowable deviations of each field over a time range.
[0115] for The path label of the bound early warning model is denoted as Agreement To identify the path that can be directly referenced by subsequent task execution plan objects, a parameterized representation is used. With the query specifications , and Perform boundary binding to form a set of referable and determinate risk hypotheses;
[0116] When generating verification criteria, the evidence model is transformed into decisionable rules oriented towards quantitative evaluation results, within a time frame. The slope and mean of the fields obtained from subsequent quantitative evaluation are used as features. A consistency score is defined for each candidate failure mechanism, and the following determination formula is adopted:
[0117] ;
[0118] in, For candidate failure mechanisms Consistency score, for The set of indicator fields involved To verify the fields in the criteria The weight, In the time range The slope of the field obtained by subsequent quantitative evaluation using least-squares linear fitting is shown above. For evidence pattern to fields The expected sign of the slope, For fields The slope threshold, In the time range The mean of the field is calculated by subsequent quantitative evaluation. This serves as a reference value for the mean of the evidence pattern. The mean deviation threshold, This is a decision function; the value is 0 if the condition is true.
[0119] Using consistency score threshold As a boundary for judgment, it is stipulated that when The output is consistent, when The output is inconsistent.
[0120] threshold , , Compared with reference value The weights are given by the knowledge base entries and process safety specifications. The sensitivity to the mechanism was set and normalized.
[0121] When performing consistency verification on the risk analysis statement, the query specifications, risk assumption set and verification criteria are compared item by item.
[0122] check Is it A subset of the data is used to verify whether each field has a corresponding decision item in the expected features of the evidence pattern, whether each decision item provides a clear threshold and reference value, whether the weights are normalized, and to verify each... Each is bound to a unique early warning model path label. ;
[0123] After the verification is passed, the reference closure relationship is recorded to ensure that when the task execution plan object reads it later, it can directly point to the specific fields and judgment items in the query specification and verification criteria.
[0124] Pre-constraints such as early warning model path labels and verification criteria are introduced during the risk analysis specification generation stage.
[0125] Each Consistency scores will serve as a candidate source for the preferred or alternative model paths in the task execution plan. The judgment output serves as the trigger condition for directional replanning. After triggering, the device identifier, time range, and indicator fields in the query specification must remain unchanged.
[0126] This pre-constraint ensures that task orchestration and interpretation converge around candidate failure mechanisms and avoids data boundary drift during path switching.
[0127] The query specifications, risk hypothesis set, and validation criteria will be standardized and formatted.
[0128] The solidification process employs a combination of structured text paragraphs and key-value descriptions to ensure device identification. Time range With indicator field set It appears consistently in a three-part structure and does not involve alias substitution;
[0129] ensure With decision parameters The binding relationship exists stably;
[0130] Once solidified, a risk analysis statement is output, specifying it as the sole input source for generating subsequent structured query commands, constructing task execution plan objects, and determining consistency.
[0131] Furthermore, it should be noted that the calculation methods for the slope and mean in this application are given in the verification criteria as an executable description;
[0132] For slope Time range The least-squares line fit calculated for equally spaced samples within the mean is... Time range Calculation of internal arithmetic mean:
[0133] When the sampling intervals are inconsistent, refer to the sampling interval in the query specification. Perform linear interpolation for the target interval before recalculating;
[0134] The above calculation method is used as part of the verification criteria, so that the quantitative evaluation results have a repeatable feature extraction method when entering the judgment.
[0135] Supplementary explanation of the reference relationship: In this application, each indicator field in the query specification is mapped to a subset of fields in the risk hypothesis set, each subset of fields is mapped to a judgment item in the verification black rule, each candidate failure mechanism is mapped to a unique early warning model path label, and each early warning model path label is bound to the triggering condition of the consistency score.
[0136] This organizational approach allows the risk analysis specification to be read by the task execution plan object, directly determining the inputs required for the preferred model path, candidate hypothesis mapping table, and directional replanning rules, without the need to parse natural language content again. This ensures that the query specifications, risk hypothesis set, and verification criteria are consistent in terms of fields and time boundaries and can be directly used in subsequent steps.
[0137] In this embodiment, step S3 specifically includes:
[0138] The risk analysis explanation is written as The risk analysis task orchestration agent Perform parsing and extract the device identifier from the query specifications. Time range With indicator field set Extract the set of candidate failure mechanisms from the risk hypothesis set. Corresponding evidence patterns and early warning model path label set Extract the judgment boundaries and comparison relationships from the verification criteria, and establish the mapping relationship between the above content and the fields of the task execution plan object;
[0139] The task execution plan object is denoted as ,exist Binding via key-value pairs , and Binding by index and The set of decision items in the verification criteria is bound to their boundary parameters in a sequential manner;
[0140] When determining the preferred model path, use the set of indicator fields in the query specification. A subset of fields in the risk assumption set Perform a comparison;
[0141] If it exists If the warning model path label is specified, then the corresponding warning model path label will be set as the preferred model path. and in The binding method between the intermediate curing device identification, time range, and indicator fields;
[0142] If there are no completely identical ones, then for all Calculate the fit score and select the early warning model path label with the highest fit score as the optimal choice. The following formula for the fitting score is used:
[0143] ;
[0144] in, Path labels for early warning models The fit score, To query the set of indicator fields in the specification, For candidate failure mechanisms The corresponding evidence pattern involves a subset of indicator fields. To verify the fields in the criteria In mechanism Weight on, This is the weighting coefficient for the coverage item, and it takes a positive value. This is the extensional penalty coefficient, which takes a non-negative value. The cardinality of the field difference set represents the path label of the early warning model. The number of fields required but not provided in the query specification;
[0145] With the maximum corresponding set up and solidify , and The binding method.
[0146] When constructing the candidate hypothesis mapping table, the verification criteria are decomposed into a set of decision items according to the indicator fields, denoted as _____. ;
[0147] Based on the decision item For the index, a candidate failure mechanism and its early warning model path label are assigned to each decision item. The evidence corresponding to the specified early warning model path label must directly relate to the indicator field corresponding to that decision item, forming a candidate hypothesis mapping table denoted as […]. ;
[0148] exist Record from the preferred model path The switching direction of the path label to the backup early warning model is recorded, along with the trigger judgment item number of the indicator fields and verification criteria involved in the switching, to ensure that subsequent switching can be executed accurately.
[0149] When generating directional replanning rules, the judgment result of the verification criteria is used as the trigger condition;
[0150] When any decision item If not satisfied, refer to the candidate hypothesis mapping table. Switch to the corresponding early warning model path label, keep the query specifications unchanged, and do not modify the device identifier. Time range With indicator field set And keep the judgment boundaries and control relationships in the verification criteria unchanged;
[0151] Let the directional replanning rule be denoted as ,exist The document specifies the trigger source, switching target, set of unmodifiable fields, and decision boundary constraints.
[0152] Set switching sequence control in the directional replanning rules;
[0153] The switching should be triggered sequentially according to the order of the judgment items in the verification criteria, and parallel triggering is prohibited. After each switching is completed, the task execution plan object should be reused. The output definition of the quantitative evaluation results allows subsequent judgments to use them directly without introducing new output formats;
[0154] If multiple conditions are not met in a series of consecutive triggers, a sequential execution strategy of listing first and switching first is adopted. After each switch, the remaining decision items are re-evaluated to avoid boundary conflicts caused by multiple targets switching at the same time.
[0155] Pre-defined assumption identifier generation rules in the task execution plan object;
[0156] Candidate failure mechanisms Early warning model path labels Correspondingly, the generated hypothesis identifier is denoted as ;
[0157] When a directional replanning rule triggers a switch, the pointer of the hypothesis identifier to be generated is updated, so that... The path label is consistent with the currently used early warning model and matches the device identifier in the query specification. Time range With indicator field set Maintain consistent referencing;
[0158] Preferred model path Alternative Hypothesis Mapping Table With directional replanning rules Assembled into a task execution plan object ;
[0159] exist The system defines fixed field mapping relationships, fixed switching order control and unmodifiable field sets, fixed assumption identifier generation rules and path switching direction; China retains , , With weight The reference enables the quantitative evaluation results to be directly determined and driven by the verification criteria. The execution;
[0160] After assembly is complete, output the task execution plan object. It provides direct access for generating structured query commands and performing quantitative evaluation calculations.
[0161] In this embodiment, step S4 specifically includes:
[0162] Let the query specification be denoted as The task execution plan object is recorded as ;
[0163] Analysis Obtain device identification Time range Indicator Field Set With sampling interval ;
[0164] Analysis Obtain the preferred model path With directional replanning rules Continue to use The binding method in the middle will , and As an immutable constraint for generating structured query instructions;
[0165] The field names and units in the query specifications should follow the unified expressions already used in the risk analysis report to avoid adding aliases or changing units;
[0166] When generating structured query instructions, with The input construction instruction is denoted as ,exist The settings for the device filter are as follows: Set the time filter as start time With end time Set field projection to All fields in;
[0167] A uniform interval is used for sampling. For field values with inconsistent sampling, linear interpolation is used to align the timestamp to the specified range without changing the value domain. ;
[0168] Prohibited in Add to Irrelevant filter options, ensuring that structured query commands are only affected by... , and constraint;
[0169] Execute structured query instructions The target data object is obtained and denoted as ;
[0170] Will Organization by field Indexed time series sets and uniform timestamp sequences Each of them Corresponding value sequence ;
[0171] When directional replanning rules Do not modify when path switching is triggered. Repeat execution and maintain , and Unchanged; only the path label of the currently used early warning model is updated in the task execution plan object for subsequent quantitative evaluation and interpretation, ensuring the stability of data boundaries and field sets;
[0172] For target data object To encapsulate, , , and Write as metadata, record exist The actual start and end times within are denoted as follows: and For each field Count the number of valid samples Statistical sample size for a unified timestamp sequence Calculate the interval between adjacent samples ;
[0173] The above statistics are only used for consistency verification and preparation for subsequent quantitative evaluation, and do not change the The value;
[0174] Consistency verification is jointly determined by time coverage, field coverage, and sampling consistency, and is calculated using a composite consistency score, defined as follows:
[0175] ;
[0176] in, The consistency score of the target data object. The actual start time of the target data object within the time range. The actual end time of the target data object within the time range. , , This is a weighting coefficient, taken as a non-negative value, and set in the task execution plan object. The cardinality of the indicator field set. For fields The number of valid samples within the time frame. To ensure a uniform number of samples in the timestamp sequence, To set the field coverage threshold, bind it to the indicator field in the risk analysis specification. The interval between adjacent timestamps To query the sampling interval of the specification, This is a decision function; it takes the value 1 if the condition is true and 0 if the condition is false.
[0177] Set a consistency threshold ,when The time determination is consistent, confirm. Preferred model path Alternatively, the path of the switched early warning model can be directly referenced;
[0178] when Inconsistent judgments are made when the same query specification is applied to the command. Perform a single re-execution and maintain , and constant;
[0179] Through the above generation, execution, and verification process, the structured query instructions are strictly constrained by the query specifications and task execution plan objects. This ensures that the boundaries of the device identifier, time range, and indicator fields remain consistent whether the directional replanning rule is triggered or not. This provides directly referable target data objects for the subsequent calculation, interpretation, and generation of disposal report objects for quantitative evaluation results.
[0180] In this embodiment, step S5 specifically includes:
[0181] Let the target data object be denoted as Let the preferred model path be denoted as ;
[0182] Identified by the query specification reading device Time range Indicator Field Set With sampling interval Maintain consistent field naming and units with the risk analysis statement;
[0183] Will The organization is a time series collection indexed by indicator fields, where each field Both the corresponding value sequence and the unified timestamp sequence are within the time range. Inner alignment to sampling interval ;
[0184] Will As a computational pipeline, its field mappings and feature operators are loaded and cannot be modified. , and The boundary;
[0185] The target data object and the preferred model path are used as inputs, and the target data object is quantized according to the preferred model path.
[0186] Use within a time range Least squares linear fitting within each field Calculate slope characteristics Using within a time range The arithmetic mean is calculated for each field. Calculate the characteristic of the mean Maintain sample truncation and sequence length and sampling interval Consistent;
[0187] All and The results are summarized into a quantitative assessment and denoted as follows: ,in It consists of a set of key-value pairs, where the key is a field. The value is determined by and The resulting feature pairs are directly referenced in subsequent consistency determinations;
[0188] Based on the judgment boundaries and control relationships in the verification criteria, the consistency of the quantitative evaluation results is determined;
[0189] Preferred model path The corresponding early warning model path label is denoted as The candidate failure mechanisms corresponding to each other are denoted as To verify the correlation between the thresholds specified in the criteria and the reference values. A comparison is performed based on the consistency score and the threshold. Make a judgment;
[0190] A consistency score is considered satisfied when it is not less than the threshold, and unsatisfied when it is less than the threshold.
[0191] For cases involving multiple decision items, the verification criteria are listed in order, and each item is compared and a single decision conclusion is synthesized. The decision items are not synthesized in parallel.
[0192] When the consistency determination is satisfied, the hypothesis identifier generation rule in the task execution plan object is used to identify the candidate failure mechanism. Early warning model path labels Combined generation of determined hypothesis identifiers, denoted as ;
[0193] exist Embedded device logo Time range With indicator field set The reference metadata ensures that the identified hypothesis identifiers are consistent with the boundaries of the query specifications and with the quantitative evaluation results. Maintain field-level traceability;
[0194] Will Used for anchoring the subject of subsequent interpretation and handling of the report, and is prohibited from [using] [the following]. , and Make any replacements or extensions;
[0195] When the consistency criteria are not met, the candidate hypothesis mapping table in the task execution plan object is read. Using the first non-metd requirement as an index, the corresponding candidate failure mechanism and its warning model path label are selected, denoted as follows: and ;
[0196] When multiple candidate failure mechanisms can be indexed by the same decision item, the candidate failure mechanism with the largest corresponding weight in the verification criterion is selected as the sole candidate.
[0197] Will and Combined to generate candidate hypothesis identifiers, denoted as and in Embedded device logo Time range With indicator field set The reference metadata ensures that the candidate hypothesis identifier is consistent with the query specification and can be directly referenced by the subsequent interpretation and processing report objects;
[0198] This application explains the linear relationship of the technical route. During the generation of the determined hypothesis markers and candidate hypothesis markers, the application does not quantify the evaluation results. Perform secondary processing without creating new feature sets;
[0199] All comparisons were performed strictly in accordance with the judgment boundaries and control relationships given by the verification criteria;
[0200] If there are inconsistent fields in the candidate path of the mapping table between the conclusion and the candidate hypothesis, the candidate path is directly eliminated according to the constraint of the set of unmodifiable fields in the task execution plan object, and the next available candidate path is selected, until the candidate hypothesis identifier is generated or the candidate paths are exhausted.
[0201] Through the above calculation, judgment and identification generation process, the determined hypothesis identifier and the candidate hypothesis identifier are made consistent with the query specifications in terms of device identifier, time range and indicator field boundaries, and provide directly referable anchor points for subsequent interpretation and handling of the report object retrieval and organization.
[0202] In this embodiment, step S6 specifically includes:
[0203] Let the hypothesis be labeled as The quantitative evaluation results will be recorded as The query specification is recorded as ,in Includes device identification Time range With indicator field set ;
[0204] The knowledge base is denoted as ,exist China-Israel candidate failure mechanism set With the corresponding set of evidence patterns Build an index and link it to the early warning model path label set. Maintain one-to-one binding;
[0205] by Parse the corresponding mechanism for the input. Early warning model path labels Limit the search scope to include only Entries, and continue to be used In , and As a boundary, it does not extend to other device identifiers, time ranges, and indicator fields;
[0206] During the retrieval phase, with For anchor point pairs Perform a query and return the evidence mode. field subset Expected slope sign set Slope threshold set Mean reference value set set of thresholds for deviation from the mean ;
[0207] Perform boundary checks on the returned content to confirm. for A subset of the threshold set and the reference value set are both given in the verification criteria and can be directly used for judgment;
[0208] If found Including those not in If a field is specified in the search results, the corresponding entries for that field will be removed from the search results to ensure that subsequent comparisons only involve fields specified in the search results. Conducted within the boundaries;
[0209] In the control phase, based on the judgment boundaries and control relationships in the verification criteria, the... Perform a consistency check;
[0210] Read Each field Features ,in In the time range Slope characteristics calculated internally. In the time range The mean characteristics calculated within the range;
[0211] For each Two judgments are made: Judgment 1 is and The direction is compared with the threshold to determine the second one. and and Deviation comparison;
[0212] The consistency score of the candidate failure mechanism is obtained by synthesizing all decision items using the consistency score rule in the verification criteria. , and consistency score threshold When a comparison is performed, Not less than The timing is consistent with the mechanism, when Less than The timing is inconsistent with the mechanism;
[0213] During the report generation phase, the field-level correspondence between the comparison conclusions and the evidence patterns is written into the interpretation and disposition report object, denoted as... ;
[0214] exist China and Israel As an explanatory anchor, the following are listed ( )and For each corresponding item, the satisfaction status of the slope and mean criteria is marked for each field, and referenced in each entry. In , and To maintain the correspondence between device identification, time range, and indicator fields;
[0215] The knowledge base targeting The proposed solutions are attached as structured entries. Only select with For directly relevant processing items, it is forbidden to attach content that is unrelated to the current boundary, ensuring that the report object can be directly invoked by subsequent outputs;
[0216] In the conclusion merging stage, the comparative conclusions are summarized based on the correspondence between the knowledge base and hypothesis labels. When the mechanisms are consistent, the conclusions are... The mechanistic conclusions are marked as consistent, and the early warning model path labels are associated. This is for future tracing purposes, and in cases where the mechanisms are inconsistent, [the following will be considered]. The mechanistic conclusions are labeled as inconsistent, and at the same time... The specific fields and corresponding boundary parameters for which the condition is not met are retained, and extension to them is prohibited. Other fields;
[0217] Ultimately In , and Identify and output the objects of the explanation and handling report. ,ensure The device identification, time range, and indicator field boundaries are completely consistent with the query specifications and can be directly referenced by subsequent interpretation results of major hazard source warnings.
[0218] In this embodiment, step S7 specifically includes:
[0219] The recipients of the explanation and handling report are recorded as follows: The query specification is recorded as ,in Includes device identification Time range With indicator field set ;
[0220] Let the hypothesis be labeled as The quantitative evaluation results will be recorded as Let the set of path labels for the early warning model be denoted as ;
[0221] When performing alignment operations, The header of the page is set to , and Do not add or replace field aliases;
[0222] Will and Write as a reference item The reference section ensures that the reference path directly points to the determined hypothesis identifier or the supplementary hypothesis identifier and its corresponding field features;
[0223] The judgment conclusion based on the verification criteria is as follows: The system generates explanations and handling content, listing the candidate failure mechanisms corresponding to the hypothesis identifiers and their early warning model path labels, and uses a field-level mapping method to... The field features are compared side-by-side with the corresponding evidence pattern items, so that each mapping falls within the range of... and It is within the boundary and can be directly indexed;
[0224] When performing consistency checks on the interpretation and handling reports, three verification steps are performed sequentially.
[0225] First, verify the metadata carried by the hypothesis identifier to confirm. The device identifier, time range, and indicator field set in the data are respectively related to... , and If they are consistent, then... Inconsistent sources are identified and output is blocked.
[0226] Subsequently, the boundary consistency of the quantitative assessment results was verified to confirm... The set of fields involved and Consistent, confirmed All the referenced data timestamps are in Within this timeframe, fields exceeding the specified time range or missing required fields are not permitted.
[0227] Re-verify the stability under both triggered and non-triggered conditions of the directional replanning rule, and read... The reference to the path switching status confirms that path switching only changes the path label in the early warning model, and does not change the path label. , and The consistency verification result is denoted as... ,exist The text uses a combination of Boolean flags and text descriptions. The Boolean flags indicate whether the pass / fail condition is met, while the text descriptions provide the names of the fields that failed or the time segments that were not passed, ensuring that subsequent symmetrical true values can be directly referenced. This will give you the complete alignment.
[0228] When making the final annotations in the interpretation and handling report objects, based on Distinguish by type;
[0229] like The identified hypothesis is denoted as Then in The labels in the text have been identified and associated with the early warning model path tags. The judgment conclusion of the verification criteria is consistent, and the satisfaction status and corresponding boundary parameters of each indicator field are marked in the field-level comparison.
[0230] like The alternative hypothesis is denoted as Then in The alternative hypothesis identifier is labeled and associated with the early warning model path label. The conclusion of the verification criteria cited is inconsistent, and the specific judgment items that are not met and their threshold sources are retained in the field-level comparison.
[0231] Both types of labels require that device markings be maintained. Time range With indicator field set exist The one-to-one correspondence in the text is prohibited from being extended to other forms. Other fields or splits The boundary;
[0232] After completing the annotation, Final labeling is performed according to query specifications, to , and As the sole external retrieval key, it ensures that the content of explanations and actions, hypothesis identification, and quantitative evaluation results can all be directly traced through the query specifications;
[0233] by As a basis for consistency, it allows subsequent objects to be directly determined without repeated verification. Availability;
[0234] Ultimately The output is the interpretation result of the early warning for major hazard sources, ensuring that the output object aligns with the boundaries of the device identification, time range, and indicator fields. Strict consistency, and can be directly referenced by subsequent processes for binding trigger conditions for display, delivery and disposal execution.
[0235] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A risk analysis method based on the synergy of a large-scale model and an early warning model, characterized in that, Includes the following steps: S1. Receive natural language task requests, parse the identification, time range and monitoring indicators of hazardous chemical production facilities, and form a description of the analysis target; S2. Based on the analysis objective description, use domain instructions to fine-tune the large language model to generate a risk analysis specification. The risk analysis specification includes query specifications, risk hypothesis set and verification criteria. The query specifications limit device identifier, time range and indicator fields. The risk hypothesis set provides candidate failure mechanisms, corresponding evidence patterns and their early warning model path labels. The verification criteria are used to determine the consistency between the quantitative assessment results and the evidence patterns. Output the risk analysis specification. S3. Based on the risk analysis specification, the risk analysis task orchestration agent generates a task execution plan object. The task execution plan object includes a preferred model path, a candidate hypothesis mapping table, and a directional replanning rule. The directional replanning rule stipulates that when the verification criteria are not met, the model path is switched according to the candidate hypothesis mapping table while keeping the query specification unchanged, so that the evaluation and interpretation converge around the risk hypothesis, and the task execution plan object is output. S4. Based on the query specifications and task execution plan objects, generate structured query instructions and obtain target data objects, maintaining consistency between fields and time boundaries under the constraints of directional replanning rules; S5. Calculate the quantitative evaluation results based on the target data object and the preferred model path. Determine the results based on the verification criteria. If the results are met, generate a determined hypothesis identifier. If the results are not met, generate a candidate hypothesis identifier. S6. Based on hypothesis identification and quantitative evaluation results, retrieve the knowledge base using hypothesis identification as the anchor point and generate explanation and disposal report objects; S7. Output the interpretation and handling report as the interpretation result of the early warning of major hazard sources; S3 includes: Using the risk analysis specification as input, the risk analysis task orchestration agent parses the query specification, risk hypothesis set, and verification criteria, extracts the device identifier, time range, and indicator fields from the query specification, extracts the candidate failure mechanism, evidence mode, and early warning model path label from the risk hypothesis set, extracts the judgment boundary and comparison relationship from the verification criteria, and establishes the mapping relationship between the above content and the field of the task execution plan object. Based on the early warning model path labels in the query specifications and risk assumption set, the preferred model path is determined. Priority is given to selecting early warning model path labels that are completely consistent with the set of indicator fields in the query specifications. If no completely consistent ones are found, the one with the largest number of required indicator fields is selected. The binding method of device identifier, time range and indicator fields is fixed in the preferred model path. Construct a candidate hypothesis mapping table, decompose the verification criteria into decision items according to the indicator fields, use the decision items as indexes, assign a candidate failure mechanism and its early warning model path label to each decision item, require that the evidence mode corresponding to the specified early warning model path label directly involves the indicator field corresponding to the decision item, and record the switching direction between the candidate failure mechanism and the preferred model path. Generate targeted replanning rules, with the judgment result of the verification criteria as the trigger condition. When any judgment item is not met, switch to the corresponding early warning model path label according to the candidate hypothesis mapping table, keep the query specifications unchanged, prohibit modification of device identifier, time range and indicator fields, and keep the judgment boundary and comparison relationship of the verification criteria unchanged. In the directional replanning rules, switchover sequence control is set, and the switchover is triggered one by one according to the listing order of the judgment items in the verification criteria. Parallel triggering is prohibited, and the output definition of the quantitative evaluation results in the task execution plan object is used after the switchover. Pre-defined hypothesis identifier generation rules are set in the task execution plan object to form hypothesis identifiers by corresponding candidate failure mechanisms with the path labels of the early warning model one by one, and the pointers of the hypothesis identifiers to be generated are updated when switching paths, so that the hypothesis identifiers can be consistent with the query specifications. The preferred model path, the alternative hypothesis mapping table, and the directional replanning rules are assembled into a task execution plan object, and the task execution plan object is output.
2. The risk analysis method based on the synergy of a large model and an early warning model according to claim 1, characterized in that, Step S1 is as follows: Using natural language task requests as input, text normalization and sentence segmentation are performed to establish a parsing channel for the identification, time range and monitoring indicators of hazardous chemical production facilities, and to remove modifiers and redundant descriptions that are irrelevant to the task. Identify hazardous chemical production facility identifiers from natural language task requests, merge referentials and aliases, and determine a single, referable hazardous chemical production facility identifier. The time range is analyzed, the start and end times are identified, and the absolute and relative times are unified to form a time range that includes the start and end times. The monitoring indicators are analyzed, mapped to indicator fields, and the units of measurement and sampling intervals are standardized. The target description is then assembled and analyzed based on the identified hazardous chemical production equipment, time range, and monitoring indicators. The format of the analysis target description is validated to ensure that the identification of the hazardous chemical production unit is unique, the time range includes the start and end times, the monitoring indicators correspond to the indicator fields and the units are consistent, and the analysis target description can be directly referenced.
3. The risk analysis method based on the synergy of a large model and an early warning model according to claim 1, characterized in that, Step S2 is as follows: The analysis target description is taken as input, and domain instructions are invoked to fine-tune the large language model to generate a three-part structure of risk analysis specification, which clearly includes query specifications, risk hypothesis set and verification criteria, and establishes the reference relationship between query specifications, risk hypothesis set and verification criteria. Based on the device identifier, time range, and monitoring indicators in the analysis target description, a query specification is generated, limiting the device identifier, time range, and indicator fields, and performing item-by-item mapping and unification so that the query specification can be directly used for structured query commands. Generate a risk hypothesis set, take candidate failure mechanisms as units, determine the corresponding evidence modes, and bind a warning model path label to each candidate failure mechanism, so that the candidate failure mechanism, evidence mode and warning model path label form a parameterized referenceable set. Generate verification criteria, set judgment boundaries and comparison relationships based on the evidence patterns in the risk hypothesis set, specify the consistency judgment method between the quantitative assessment results and the evidence patterns, and give the judgment output of consistency and inconsistency; Perform consistency verification on the risk analysis specification, check the consistency of terminology and closure of references in the query specifications, risk assumption set and verification criteria, and confirm the constraint relationship between the early warning model path label and device identifier, time range and indicator field; In the risk analysis specification generation stage, pre-constraints such as early warning model path labels and verification criteria are introduced. These constraints are used as the input starting point for subsequent task execution plan objects to ensure that task arrangement and interpretation converge around candidate failure mechanisms. The query specifications, risk hypothesis set, and verification criteria are standardized in a uniform format, and the boundaries of device identification, time range, and indicator fields are kept consistent, outputting a risk analysis specification.
4. The risk analysis method based on the synergy of a large model and an early warning model according to claim 1, characterized in that, Step S4 is as follows: The query specification and task execution plan object are taken as input. The device identifier, time range and indicator fields in the query specification are parsed, and the preferred model path and directional replanning rules in the task execution plan object are parsed. The binding method in the task execution plan object is used as a constraint to generate structured query instructions. Generate a structured query instruction based on the query specification, limiting the device identifier to the device identifier in the query specification, the time boundary to the time range in the query specification, and the fields to the indicator fields in the query specification, thus forming a structured query instruction that can be executed directly. Execute the structured query command to obtain the target data object. When the directional replanning rule triggers the path switching, keep the query specifications unchanged according to the directional replanning rule and repeatedly execute the structured query command to ensure that the device identifier, time range and indicator fields are consistent with the query specifications. Perform consistency checks on the target data object, verifying that the indicator fields of the target data object cover the indicator fields in the query specification, verifying that the time boundary of the target data object covers the time range in the query specification, and confirming that the target data object can be directly referenced by the preferred model path or the switched early warning model path.
5. The risk analysis method based on the synergy of a large model and an early warning model according to claim 1, characterized in that, Step S5 is as follows: The target data object and the preferred model path are used as inputs. The target data object is quantitatively calculated according to the preferred model path to generate a quantitative evaluation result. Based on the judgment boundaries and control relationships in the verification criteria, the consistency of the quantitative evaluation results is determined, and a judgment result of whether the results are met or not is obtained. When the consistency judgment is satisfied, the candidate failure mechanism and the early warning model path label are combined to generate the determined hypothesis identifier, and the determined hypothesis identifier is kept consistent with the device identifier, time range and indicator field. When the consistency judgment is not met, the candidate failure mechanism and the early warning model path label are combined to generate a candidate hypothesis identifier, and the candidate hypothesis identifier is referenced in a consistent manner with the device identifier, time range and indicator field.
6. The risk analysis method based on the synergy of a large model and an early warning model according to claim 1, characterized in that, Step S6 is as follows: Using the hypothesis identifier and quantitative evaluation results as input, the knowledge base is retrieved with the hypothesis identifier as the anchor point. The retrieval scope is limited to the candidate failure mechanisms and evidence patterns corresponding to the hypothesis identifier, and the boundaries of the device identifier, time range and indicator fields in the query specification are followed. Based on the evidence patterns corresponding to the hypothesis labels in the knowledge base, the judgment boundaries and control relationships in the verification criteria are used to compare the quantitative evaluation results and form a comparative conclusion that the mechanisms are consistent or inconsistent. Based on the comparison conclusions, the correspondence between the hypothesis identifier, quantitative evaluation results and evidence patterns is written into the interpretation and disposal report object, and the correspondence between the device identifier, time range and indicator field of the query specification is clearly defined in the interpretation and disposal report object; Based on the correspondence between the knowledge base and the hypothesis identifiers, the comparison conclusions are merged to generate an explanation and handling report object, which is then marked with the device identifier, time range, and indicator fields in the query specifications, and the explanation and handling report object is output.
7. The risk analysis method based on the synergy of a large model and an early warning model according to claim 1, characterized in that, Step S7 is as follows: Align the objects of the explanation and handling report with the query specifications, and use the device identifier, time range and indicator fields in the query specifications for identification. Use the hypothesis identifier and quantitative evaluation results as reference items for the objects of the explanation and handling report, and form the corresponding explanation and handling content based on the judgment conclusion of the verification criteria. List the candidate failure mechanism and early warning model path label corresponding to the hypothesis identifier in the objects of the explanation and handling report. Perform consistency verification on the objects of the explanation and disposal report to confirm that the hypothesis identifier, quantitative evaluation results and device identifier, time range and indicator fields in the query specifications are consistent. Confirm that the device identifier, time range and indicator fields do not change in both the case of triggering and not triggering the directional replanning rule, and retain the consistency verification conclusion. Mark the identified hypothesis or alternative hypothesis in the interpretation and handling report object, and associate it with the early warning model path label and the judgment conclusion of the verification criteria to ensure that each item can be directly traced by the query specification. At the same time, maintain consistent referencing of device identifier, time range and indicator field, and output the interpretation and handling report object as the early warning interpretation result of major hazard source.
8. A risk analysis intelligent agent system based on the collaboration of a large model and an early warning model, used to execute the risk analysis method based on the collaboration of a large model and an early warning model as described in any one of claims 1 to 7, comprising: The natural language parsing module is used to parse the identification, time range and monitoring indicators of hazardous chemical production facilities and generate a description of the analysis target. The risk analysis specification generation module is used to call domain commands to fine-tune the large language model and generate query specifications, risk hypothesis sets, and verification criteria. The risk analysis task orchestration module is used to generate task execution plan objects that include preferred model paths, candidate hypothesis mapping tables, and directional replanning rules; The query and data acquisition module is used to generate structured query instructions and acquire target data objects based on query specifications and task execution plan objects; The quantitative assessment and hypothesis labeling module is used to calculate the quantitative assessment results according to the preferred model path and generate determined hypothesis labels or candidate hypothesis labels according to the verification criteria. The knowledge retrieval and interpretation generation module is used to retrieve knowledge bases using hypothesis identifiers as anchors and generate interpretation and disposal report objects based on evidence patterns and quantitative evaluation results. The alignment and output module is used to align the interpretation and handling report objects with the query specifications and perform consistency verification, associate the early warning model path labels with the judgment conclusions, and output the interpretation results of the major hazard source early warning.