A method for fine-grained classification of production safety accident levels

CN122333232BActive Publication Date: 2026-08-14湖南工商大学
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-03
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]基于此,有必要构建一种融合多智能体协同推理与垂直领域知识库的生产安全事故信息抽取与等级细粒度划分方法,通过融合大语言模型的深度语义理解能力与多智能体的协同推理机制,以解决现有单体大语言模型在复杂长文本抽取中的幻觉问题,并突破传统法定粗粒度评级的局限,实现事故报告高价值数据的精准提取与自动化细粒度定级,从而为生产安全管理的数字化转型提供可靠的技术支撑

Benefits of technology

通过采集在线平台的生产安全事故多维数据并结合国家标准《生产安全事故分类与编码》(GB 6441-2025)构建事故分类信息库,为信息抽取提供了专业化、标准化的知识底座;基于构建的事故报告全文本转换智能体与知识库检索智能体,实现了对事故特征的自动调用与精准匹配;在此核心基础上,本实施例创新性地提出基于多大语言模型的智能体协同架构,通过引入动态任务调度机制与三类异构聚合算法执行关键信息抽取,该机制不仅从根本上克服了单体大模型在处理复杂长文本时易诱发的“幻觉”与随机性偏差,更在显著提升事故名称、人员伤亡、起因物、责任主体等核心要素抽取精度的同时,实现了系统算力资源的高效动态分配;进一步地,本实施例基于《生产安全事故报告和调查处理条例》,首创了生产安全事故等级细粒度划分算法,成功突破了传统法定四大类粗粒度评级的应用局限,将事故严重程度精准量化映射至17类细粒度子等级,彻底实现了事故定级从高度依赖人工经验向完全数据驱动的自动化、精准化跨越。综上所述,本实施例完整打通了从多源异构数据预处理、多智能体协同高精抽取到细粒度量化智能评级的全自动化技术链路,极大提升了事故报告解析的客观性与智能化水平,为生产安全领域的精细化风险管控与数字化转型提供了强有力的底层技术支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122333232B_ABST
    Figure CN122333232B_ABST
Patent Text Reader

Abstract

This application relates to a fine-grained classification method for production safety accidents. This method obtains production accident classification elements, as well as the accident report title and full text of the production safety accident to be evaluated. Based on the production accident classification elements, the full text of the accident report is classified to obtain the accident type. Then, the text length and completeness levels of the full text of the accident report are determined, and based on the corresponding levels, the number of large language models performing the information extraction task is determined. A task-specific information extraction agent is constructed to extract information from the full text of the accident report, obtaining key accident information. Based on the key accident information and the fine-grained classification standard for accident levels, the production safety accident level is determined. This method effectively solves the extraction errors and illusions caused by single large models when processing complex long texts, overcomes the limitations of traditional legal coarse-grained rating, and achieves high-precision extraction and intelligent analysis of accident reports.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of text classification technology, and in particular to a fine-grained method for classifying production safety accident levels. Background Technology

[0002] In recent years, Large Language Models (LLMs) have demonstrated powerful text understanding capabilities in the field of natural language processing and have begun to be applied to automated information extraction tasks. However, when faced with production safety accident reports that are highly specialized, logically complex, and contain a large amount of numerical data and long texts, existing single large language model technologies have revealed significant limitations: on the one hand, single models are easily constrained by the context window when processing long texts and suffer from serious "illusion" problems and random biases, making it easy to extract key quantitative data (such as the number of casualties and economic losses) incorrect; on the other hand, single models lack the mandatory constraints of vertical domain expertise, making it difficult to accurately map non-standard natural language to legal standard vocabularies.

[0003] In summary, existing information extraction technologies and single-model application solutions cannot simultaneously meet the accuracy, consistency, and standardization requirements of complex information extraction in accident reports. Summary of the Invention

[0004] Therefore, it is necessary to construct a method for extracting and classifying production safety accident information in a fine-grained manner that integrates multi-agent collaborative reasoning with a vertical domain knowledge base. This method leverages the deep semantic understanding capabilities of large language models with multi-agent collaborative reasoning mechanisms to address the illusion problem in extracting complex, long texts using existing single-agent large language models. It also overcomes the limitations of traditional legal coarse-grained rating systems, enabling accurate extraction and automated fine-grained classification of high-value accident report data. This provides reliable technical support for the digital transformation of production safety management. Specifically, this method is a fine-grained classification method for production safety accident levels, which includes: S1: Collect production accident case data containing accident report webpage links and obtain production accident classification elements; obtain the accident report title and full text of the production safety accident to be evaluated based on the accident report webpage links; S2: Classify the full text of the accident report based on the production accident classification elements to obtain the accident type; S3: Determine the text length level of the full text of the accident report; construct primary indicators for information quantification and secondary indicators under each primary indicator; calculate the corresponding total score based on the number of secondary indicators contained in the full text of the accident report, and determine the completeness level of the full text of the accident report based on the total score. S4: Determine the number of large language models to perform the information extraction task based on the text length level and the completeness level, inject a structured prompt word template specific to the extraction task into each large language model, construct a task-specific information extraction agent, and use the task-specific information extraction agent to extract information from the full text of the accident report to obtain key accident information. S5: Construct a fine-grained classification standard for accident levels, and determine the level of production safety accidents based on key accident information and the fine-grained classification standard for accident levels.

[0005] Preferably, in S1, the collection of production accident case data containing accident report webpage links includes: Obtain the target webpage from the production safety accident information disclosure platform, parse the target webpage to obtain the list of accident cases and their pagination nodes; Construct asynchronous network requests according to pagination order, extract the URL of the target webpage using webpage parsing rules, use the URL as the link to the accident report webpage, and simultaneously parse out the industry classification and basic accident type information during the extraction process; The data in the accident case list, its industry classification, and basic accident type information are preprocessed, and the accident report webpage links and the preprocessed data are integrated to obtain the production accident case data.

[0006] Preferably, in S1, obtaining the production accident classification elements includes: The document on the classification standards for production safety accidents was obtained, and document structure parsing technology was used to extract the core classification elements, namely, the cause, the causative agent, the mode of harm, the unsafe condition, and the unsafe behavior, contained in the document. By aligning the core classification elements with the production accident case data, we obtain the production accident classification elements.

[0007] Preferably, the classification of the full text of the accident report based on production accident classification elements includes: Construct independent sub-knowledge bases corresponding to the causative agent, the harmful agent, the mode of harm, the unsafe state, and the unsafe behavior; Several parallel retrieval nodes are set up to enable synchronous access to each independent sub-knowledge base; The context data in the corresponding independent sub-knowledge base is retrieved by each retrieval node, and the retrieved context data is connected to the production safety accident classification intelligent agent. The accident type is output based on the full text of the accident report by the production safety accident classification intelligent agent. The production safety accident classification intelligent agent is constructed based on a large language model, designed classification prompt words, and a production safety cause analysis knowledge base.

[0008] Preferably, in S3, determining the text length level of the full text of the accident report includes: The total number of characters contained in the full text of the accident report is used as an indicator of text length. The cumulative frequency distribution curve of the text length of the full text of the historical accident report is parsed, and the values ​​at one-third of the cumulative frequency distribution curve of the text length from smallest to largest are extracted as the first level threshold and the values ​​at two-thirds of the curve are extracted as the second level threshold. When the text length index is less than or equal to the first classification threshold, the text length level of the full text of the accident report is determined to be short text; When the text length index is greater than the first grading threshold and less than the second grading threshold, the text length level of the full text of the accident report is determined to be medium text. When the text length index is greater than or equal to the second classification threshold, the text length level of the full text of the accident report is determined to be long text.

[0009] Preferably, in S3, determining the integrity level of the full text of the accident report based on the total score includes: Establish a primary indicator system that includes basic accident information, emergency response information, severity criterion information, causal factors information, and liability handling information; Several secondary indicators are further refined from the primary indicators to reflect specific information about the accident. When the full text of the accident report explicitly contains any secondary indicator, a first preset value is assigned to the score of the corresponding secondary indicator; otherwise, a second preset value is assigned. The total score is obtained by adding up the scores of all secondary indicators contained in the full text of the accident report; When the total score is greater than or equal to the first integrity threshold, the integrity level of the full text of the accident report is determined to be Level 1; When the total score is greater than the second integrity threshold and less than the first integrity threshold, the integrity level of the full text of the accident report is determined to be the second level. When the total score is less than or equal to the second integrity threshold, the integrity level of the full text of the accident report is determined to be level three; the first integrity threshold is greater than the second integrity threshold.

[0010] Preferably, in S4, determining the number of large language models for performing the information extraction task based on text length level and completeness level includes: The task difficulty value is mapped based on the text length level and the integrity level using a mapping function; The task difficulty value can only be one of the first difficulty threshold, the second difficulty threshold, or the third difficulty threshold; When the task difficulty value is the first difficulty threshold, a single large language model is invoked to perform the information extraction task. When the task difficulty value is the second difficulty threshold, the same number of large language models as the second difficulty threshold are called to execute the information extraction task in parallel. When the task difficulty value is the third difficulty threshold, the same number of large language models as the third difficulty threshold are invoked to perform the information extraction task in parallel.

[0011] Preferably, in S4, the process of obtaining key accident information includes: Information extraction tasks include: numerical information extraction tasks; Secondary indicators include numerical indicators, such as the number of deaths, the number of seriously injured, and direct economic losses. When a single large language model is invoked to perform a numerical information extraction task, the corresponding task-specific information extraction agent extracts the key numerical information of the first accident from the full accident report. When the same number of large language models as the second or third difficulty threshold are invoked to perform the numerical information extraction task, each corresponding task-specific information extraction agent extracts the numerical values ​​containing numerical indicators and the initial results of the thought chain reasoning path from the full accident report, and determines whether the extracted values ​​are consistent. If they are, the values ​​are output as the key numerical information of the second or third accident; otherwise, the remaining values ​​are corrected according to the value with the highest frequency and the thought chain reasoning path, and the key numerical information of the fourth or fifth accident is output.

[0012] Preferably, the step of correcting the remaining values ​​based on the most frequently occurring value and the thought chain reasoning path includes: The most frequently occurring value is used as the initial mode. The task-specific information extraction agents from which the initial mode is extracted are used as the largest consensus subset, and the task-specific information extraction agents from which the initial mode is not extracted are used as the subset to be calibrated. The reasoning path of the thought chain extracted from each largest consensus subset is used as feedback prompts to correct the reasoning path of the subset to be calibrated. For each corrected subset to be calibrated, the second value is extracted again from the full accident report, and the second value with the highest frequency is extracted. If there is a unique highest frequency occurrence, the corresponding second value is used as the key numerical information of the fourth accident or the fifth accident; otherwise, the second values ​​corresponding to multiple identical highest frequency occurrences and the thought chain reasoning path of the corresponding subset to be calibrated are input into the ensemble meta-model, and the key numerical information of the fourth accident or the fifth accident is output.

[0013] Preferably, S5 includes: Construct a numerical vector based on the key numerical information of the first accident, the second accident, the third accident, the fourth accident, or the fifth accident; Eleven numerical intervals were constructed for the number of deaths, the number of serious injuries, and the number of direct economic losses in the numerical vector. Based on the eleven numerical intervals corresponding to each element in the numerical vector, a fine-grained classification standard for accident levels containing 17 types of production safety accident levels was constructed. The accident level is determined by using a fine-grained classification standard based on the number of deaths, serious injuries, and direct economic losses in the numerical vector.

[0014] Beneficial effects: This method obtains the classification elements of production accidents, as well as the accident report title and full text of the production safety accident to be evaluated; classifies the full text of the accident report based on the classification elements to obtain the accident type; then, determines the text length level and completeness level of the full text of the accident report, and determines the number of large language models to perform the information extraction task based on the corresponding levels, constructing a task-specific information extraction agent to extract information from the full text of the accident report to obtain key accident information; based on the key accident information and the fine-grained classification standard of accident level, the production safety accident level is determined, effectively solving the extraction errors and illusions of single large models when processing complex long texts, breaking through the limitations of traditional legal coarse-grained rating, and realizing high-precision extraction and intelligent parsing of accident reports. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art 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 based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart of the fine-grained classification method for production safety accident levels in the embodiments of this application.

[0017] Figure 2 This is a flowchart of the processing of the intelligent agent for classifying production safety accidents in the embodiments of this application.

[0018] Figure 3 This is a flowchart illustrating the process of extracting the intelligent agent for incident report integrity assessment in this embodiment of the application.

[0019] Figure 4 This is a histogram showing the distribution of text length data in an embodiment of this application.

[0020] Figure 5This is a three-dimensional data distribution map of a general accident in the embodiments of this application.

[0021] Figure 6 This is a three-dimensional data distribution map of a major accident in an embodiment of this application.

[0022] Figure 7 This is a three-dimensional data distribution map of major accidents in the embodiments of this application. Detailed Implementation

[0023] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application are described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.

[0024] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0025] Example 1 like Figure 1 As shown, this embodiment provides a method for fine-grained classification of production safety accident levels, including: S1: Collect production accident case data containing accident report webpage links and obtain production accident classification elements; obtain the accident report title and full text of the production safety accident to be evaluated based on the accident report webpage links.

[0026] It is worth noting that the collection of production accident case data containing accident report webpage links includes: Obtain the target webpage from the production safety accident information disclosure platform, parse the target webpage to obtain the list of accident cases and their pagination nodes; Construct asynchronous network requests according to pagination order, extract the URL of the target webpage using webpage parsing rules, use the URL as the link to the accident report webpage, and simultaneously parse out the industry classification and basic accident type information during the extraction process; The data in the accident case list, its industry classification, and basic accident type information are preprocessed, and the accident report webpage links and the preprocessed data are integrated to obtain the production accident case data.

[0027] In some optional embodiments, a pre-defined production safety accident information disclosure platform is used as the data collection entry point. The target webpage structure is parsed to obtain a list of accident cases and their pagination nodes. Asynchronous network requests are constructed according to the pagination order, and the absolute uniform resource locators (URLs) of the accident report titles and their details pages are extracted using webpage parsing rules. During the extraction process, the industry classification and basic accident type information are parsed simultaneously. The acquired multi-source heterogeneous data is subjected to standardization processing such as deduplication, noise reduction, and format cleaning, and the processed structured data is written in batches to a pre-defined cloud database.

[0028] In this embodiment, obtaining the classification elements of production accidents includes: The document on the classification standards for production safety accidents was obtained, and document structure parsing technology was used to extract the core classification elements, namely, the cause, the causative agent, the mode of harm, the unsafe condition, and the unsafe behavior, contained in the document. By aligning the core classification elements with the production accident case data, we obtain the production accident classification elements.

[0029] In some optional embodiments, the national standard "Classification and Coding of Production Safety Accidents" (GB 6441-2025) document is obtained, and document structure parsing technology is used to extract core classification elements such as causative agents, harmful substances, modes of harm, unsafe conditions, and unsafe behaviors in a structured manner. The extracted classification elements are then structurally aligned with the accident case data collected above and uniformly stored in the cloud database, providing standardized data input support for the subsequent multi-agent information extraction process and the grade classification evaluation system.

[0030] It is worth noting that the process of obtaining the title and full text of the accident report for the production safety accident to be evaluated based on the accident report webpage link includes: Using the aforementioned accident report webpage links as input, a webpage content crawling tool from an intelligent agent platform was used to construct a large-scale intelligent agent for converting accident reports into full text. This agent iteratively retrieves information such as accident report titles, full text, and links. The retrieved full text is then preprocessed, including removing webpage noise tags and cleaning formatting symbols, to output standardized full-text data suitable for subsequent information quality analysis and information extraction processes.

[0031] In some optional embodiments, the original HTML text of the accident report details page is crawled iteratively using the aforementioned accident report webpage link as input, and the accident report title is extracted simultaneously. To ensure that the accident report text content is complete, standardized, and suitable for subsequent information quality analysis and information extraction processes, the acquired text is preprocessed using large language model prompts. The prompt design is shown in Table 1.

[0032] Table 1. Design of prompt words for the intelligent agent in accident text preprocessing ; S2: Classify the full text of the accident report based on the production accident classification elements to obtain the accident type.

[0033] Specifically, the classification of the full text of the accident report based on production accident classification elements includes: Construct independent sub-knowledge bases corresponding to the causative agent, the harmful agent, the mode of harm, the unsafe state, and the unsafe behavior; In some optional embodiments, based on the information from the national standard "Classification and Coding of Production Safety Accidents" (GB 6441-2025) document obtained above, independent sub-knowledge bases are constructed for multiple classification dimensions, including causative agents (57 items), harmful substances (52 items), modes of harm (20 items), unsafe conditions (41 items), and unsafe behaviors (42 items). The data imported into each sub-knowledge base undergoes structured processing to achieve standardized storage and efficient retrieval of accident classification information.

[0034] Several parallel retrieval nodes are set up to enable synchronous access to each independent sub-knowledge base; The context data in the corresponding independent sub-knowledge base is retrieved by each retrieval node, and the retrieved context data is connected to the production safety accident classification intelligent agent. The accident type is output based on the full text of the accident report by the production safety accident classification intelligent agent. The production safety accident classification intelligent agent is constructed based on a large language model, designed classification prompt words, and a production safety cause analysis knowledge base.

[0035] In some optional embodiments, a multi-knowledge-base parallel retrieval workflow is constructed, and synchronous invocation of the different-dimensional sub-knowledge bases is achieved by setting parallel retrieval nodes. Retrieval control parameters are configured for each retrieval node. The configuration rules for these parameters include: using the user-inputted accident description as the query parameter; employing a hybrid search strategy that integrates full-text retrieval and semantic retrieval to balance retrieval accuracy and coverage; setting a maximum recall threshold (e.g., 10 results) and a minimum semantic matching threshold (e.g., 0.7) to filter low-quality paragraphs below the matching standard. Simultaneously, query rewriting and result rearrangement functions are enabled in the retrieval chain to optimize query intent and improve the accuracy of generated answers. Finally, the context data recalled by each sub-knowledge base retrieval node is dynamically connected to the large language model processing node. The parameter configuration for the causal knowledge base retrieval node is shown in Table 2 below.

[0036] Table 2. Parameter Configuration for the Causative Knowledge Base Retrieval Node ; By designing prompt words, an intelligent agent for classifying production safety accidents is constructed based on a large language model and a knowledge base for production safety causal analysis. Accidents are accurately classified and their causes analyzed according to the national standard "Classification and Coding of Production Safety Accidents" (GB 6441-2025) and industry specifications. The design of the classification prompt words is shown in Table 3.

[0037] Table 3. Category Hint Design ; like Figure 2 As shown in the figure, this embodiment provides a processing flowchart for a production safety accident classification intelligent agent.

[0038] S3: Determine the text length level of the full text of the accident report; construct primary indicators for information quantification and secondary indicators under each primary indicator; calculate the corresponding total score based on the number of secondary indicators contained in the full text of the accident report, and determine the completeness level of the full text of the accident report based on the total score.

[0039] It is worth noting that the determination of the text length level of the full text of the accident report includes: The total number of characters contained in the full text of the accident report is used as an indicator of text length. The cumulative frequency distribution curve of the text length of the full text of the historical accident report is parsed, and the values ​​at one-third of the cumulative frequency distribution curve of the text length from smallest to largest are extracted as the first level threshold and the values ​​at two-thirds of the curve are extracted as the second level threshold. When the text length index is less than or equal to the first classification threshold, the text length level of the full text of the accident report is determined to be short text; When the text length index is greater than the first grading threshold and less than the second grading threshold, the text length level of the full text of the accident report is determined to be medium text. When the text length index is greater than or equal to the second classification threshold, the text length level of the full text of the accident report is determined to be long text.

[0040] In some optional embodiments, the preprocessed full text of the accident report is obtained, and its total character count is calculated to generate a text length index B. To achieve a quantitative assessment of the text complexity of the accident report and provide a decision-making basis for subsequent multi-agent collaborative scheduling, a text complexity hierarchical standard is preset based on statistical analysis of historical accident report sample sets. The hierarchical standard is constructed using a three-part principle based on cumulative frequency, that is, by analyzing the cumulative frequency distribution curve of the text length of historical samples, the truncation intervals at one-third and two-thirds of the cumulative frequency are extracted as the judgment benchmark, thereby setting the first hierarchical threshold. (e.g., 2750 words) and the second-level threshold (For example, 5750 words).

[0041] Perform complexity quantification assessment and level determination. The text length assessment agent compares the text length index B of the incident report to be processed with a preset level threshold, classifies it into three complexity levels, and assigns a corresponding scheduling label to each level. Short text determination (B=B1): when When the text is identified as low-complexity short text, it is characterized by highly omitted information in incident reports. The system marks it as a low-difficulty task and triggers an external knowledge base completion instruction to assist in subsequent extraction. Medium text determination (B=B2): When At that time, the text was determined to be of medium complexity. Such texts are characterized by a relatively standardized accident investigation report structure, and the system marked them as medium difficulty tasks, executing the standard information extraction workflow. Long text determination (B=B3): When When the text is deemed to be a highly complex long text, the system identifies it as such. Such texts typically correspond to major accident investigation reports with complete chains of evidence and complex causal logic across paragraphs. The system marks these reports as high-difficulty tasks and triggers special processing or chunking instructions for long texts that are subject to the limitation of excessively long context windows.

[0042] Furthermore, the determination of the completeness level of the full text of the accident report based on the total score includes: Establish a primary indicator system that includes basic accident information, emergency response information, severity criterion information, causal factors information, and liability handling information; Several secondary indicators are further refined from the primary indicators to reflect specific information about the accident. When the full text of the accident report explicitly contains any secondary indicator, a first preset value is assigned to the score of the corresponding secondary indicator; otherwise, a second preset value is assigned. The total score is obtained by adding up the scores of all secondary indicators contained in the full text of the accident report; When the total score is greater than or equal to the first integrity threshold, the integrity level of the full text of the accident report is determined to be Level 1; When the total score is greater than the second integrity threshold and less than the first integrity threshold, the integrity level of the full text of the accident report is determined to be the second level. When the total score is less than or equal to the second integrity threshold, the integrity level of the full text of the accident report is determined to be level three; the first integrity threshold is greater than the second integrity threshold.

[0043] In some optional embodiments, an evaluation matrix is ​​established containing five categories of primary indicators: basic accident information, emergency response information, level judgment information, causal factor information, and responsibility handling information. This matrix is ​​further refined into 20 secondary indicators. A weighted binary scoring logic is set for these 20 secondary indicators: a single-item scoring function is defined as f(x). If the target text explicitly contains information for a certain secondary indicator, a preset full score is assigned to that item (e.g., f(x) = 5); if it is not contained or is extremely vague, f(x) = 0. The total score S is obtained by summing the scores of all secondary indicators, with a maximum score of 100. The secondary indicators corresponding to each primary indicator and their score weights are configured as shown in Table 4.

[0044] Table 4 Quantitative Assessment Table for Information Integrity ; Then, based on the calculated total score S, an information quality grading standard is established, and the evaluation agent maps the information integrity of the accident report into three quantitative levels: Level 1 (A1 / Strong Integrity): When The fact that this determination is triggered at specific times indicates that the report contains complete information elements and that the core causes and chain of responsibility are clear. Level 2 (A2 / Medium Completeness): This judgment is triggered when 60 points < S < 80 points, indicating that the report contains most of the key information but some details are missing; Level 3 (A3 / Poor Integrity): When This judgment is triggered at specific times, indicating that the report has a serious information gap (such as a lack of specific cause analysis).

[0045] Finally, the evaluation agent outputs the determined integrity level (A1, A2 or A3) as a metadata tag to directly trigger and guide the dynamic computing power scheduling and parallel model number allocation strategy of "on-demand allocation" in the downstream multi-agent system.

[0046] As a preferred embodiment, a prompt-driven information integrity assessment agent is configured. The preprocessed full text of the accident report is used as input, and a prompt word template is configured to constrain the large language model to perform information extraction and existence judgment. The integrity assessment agent scans the text content one by one, automatically judging and accumulating scores for 20 secondary indicators based on the weighted binary scoring logic, and outputting the total integrity score S of the current accident report. To ensure the objectivity of the assessment and the parsability of the output, the design structure of the prompt word template is shown in Table 5.

[0047] Table 5. Design of prompts for the intelligent agent in assessing accident integrity information. ; like Figure 3 As shown in the figure, this embodiment provides a flowchart of the process for extracting intelligent agents for accident report integrity assessment.

[0048] S4: Determine the number of large language models for performing the information extraction task based on the text length level and the completeness level, inject a structured prompt word template specific to the extraction task into each large language model, construct a task-specific information extraction agent, and use the task-specific information extraction agent to extract information from the full text of the accident report to obtain key accident information.

[0049] It is worth noting that the determination of the number of large language models for performing information extraction tasks based on text length level and completeness level includes: The task difficulty value is mapped based on the text length level and the integrity level using a mapping function; The task difficulty value can only be one of the first difficulty threshold, the second difficulty threshold, or the third difficulty threshold; When the task difficulty value is the first difficulty threshold, a single large language model is invoked to perform the information extraction task. When the task difficulty value is the second difficulty threshold, the same number of large language models as the second difficulty threshold are called to execute the information extraction task in parallel. When the task difficulty value is the third difficulty threshold, the same number of large language models as the third difficulty threshold are invoked to perform the information extraction task in parallel.

[0050] In some optional embodiments, a task difficulty mapping matrix based on a two-dimensional feature of "text length-completeness" is constructed. The output text length level (denoted as...) is obtained. (corresponding to long, medium, and short texts respectively) and the information integrity level of the output from step 5 (denoted as...). (These correspond to strong, medium, and poor completeness, respectively). Define a task difficulty mapping function. The output value N represents the number of parallel large language model agents allocated by the system to the current task. In the scheduling configuration matrix, allocation is set based on the principle of "on-demand allocation". For example, when the input is (A1, B3), the mapped output N=1; when the input is (A3, B1), the mapped output N=5. The specific scheduling configuration matrix is ​​shown in Table 6.

[0051] Table 6. Matrix for Determining the Number of Scheduling Agents ; Then, the scheduling agent determines the mapping function. The output value N dynamically routes the current incident report extraction task to the corresponding processing hierarchy mode: L1 lightweight inference mode (triggered when N=1) is designed for low-difficulty tasks with short texts and complete information. The system calls only a single agent to complete the extraction, so as to minimize the consumption of computing resources and achieve fast response. L2 robust inference mode (triggered when N=3) is designed for routine tasks of moderate difficulty. The system calls on 3 agents to work in parallel and introduces a majority voting mechanism to eliminate individual randomness errors. L3 deep verification mode (triggered when N=5) is designed for challenging tasks with long texts and significant information loss. The system calls five parallel agents to perform collaborative extraction and triggers multiple consensus verification and arbitration mechanisms to combat the semantic dilution problem caused by long texts through computational redundancy.

[0052] It is worth noting that before performing multi-model aggregation, task-specific prompt word designs are first injected into each individual large language model within the cluster based on prompt word engineering to drive the individual model to complete the initial basic information extraction. Taking "extraction of key factors for accident level assessment (casualty data and direct economic loss data)" in the quantitative indicators as an example, an intelligent agent for extracting key factors for accident level assessment is constructed based on the large language model to automatically extract key information such as casualty data of production safety accidents (including the number of deaths and serious injuries). The structured prompt word template design is shown in Table 7.

[0053] Table 7 Structured prompt word template design ; Furthermore, the process of obtaining key information about the accident includes: Information extraction tasks include: numerical information extraction tasks; Secondary indicators include numerical indicators, such as the number of deaths, the number of seriously injured, and direct economic losses. When a single large language model is invoked to perform a numerical information extraction task, the corresponding task-specific information extraction agent extracts the key numerical information of the first accident from the full accident report. When the same number of large language models as the second or third difficulty threshold are invoked to perform the numerical information extraction task, each corresponding task-specific information extraction agent extracts the numerical values ​​containing numerical indicators and the initial results of the thought chain reasoning path from the full accident report, and determines whether the extracted values ​​are consistent. If they are, the values ​​are output as the key numerical information of the second or third accident; otherwise, the remaining values ​​are corrected according to the value with the highest frequency and the thought chain reasoning path, and the key numerical information of the fourth or fifth accident is output.

[0054] As a preferred embodiment, the process of obtaining key accident information includes: Information extraction tasks include: numerical information extraction tasks, short text information extraction tasks, and / or long text information extraction tasks; Secondary indicators include numerical indicators, short text indicators, and long text indicators; numerical indicators include the number of casualties and economic losses; short text indicators include the accident name, the cause, and the harmful substance; long text indicators include the accident occurrence process, liability determination, and corrective measures. When a single large language model is invoked to perform numerical information extraction tasks, short text information extraction tasks, and / or long text information extraction tasks, the corresponding task-specific information extraction agent extracts the key numerical information of the first accident, the key short text information of the first accident, and / or the key long text information of the second accident from the full accident report.

[0055] If the number of agents N > 1, then within the allocated multi-agent collaborative processing cluster, the following three types of heterogeneous aggregation algorithms are configured and executed for different types of accident elements: When the same number of large language models as the second or third difficulty threshold are invoked to perform the numerical information extraction task, each corresponding task-specific information extraction agent extracts the numerical values ​​containing numerical indicators and the initial results of the thought chain reasoning path from the full accident report, and determines whether the extracted values ​​are consistent. If they are, the values ​​are output as the key numerical information of the second or third accident; otherwise, the remaining values ​​are corrected according to the value with the highest frequency and the thought chain reasoning path, and the key numerical information of the fourth or fifth accident is output.

[0056] For key indicators such as accident name, causative agent, and harmful substance, which are unique short texts, a semantic normalization process with enhanced retrieval is performed to address the mismatch between the model's natural language representation and legal standard terminology. When the same number of large language models as the second or third difficulty threshold are invoked to perform the short text information extraction task, each corresponding task-specific information extraction agent extracts the initial short text from the full accident report and calculates the cosine similarity between the semantic vector of any initial short text and the semantic vectors of several standard terms (the semantic vectors of each standard term in the pre-set national standard domain knowledge base (controlled vocabulary, constructed based on "Classification and Coding of Production Safety Accidents" (GB 6441-2025)). The standard term with the highest cosine similarity greater than the preset similarity threshold (e.g., 0.85) is retained as the candidate term output by the corresponding task-specific information extraction agent. The candidate terms that are not retained are judged as invalid illusions and are removed. The candidate term with the highest frequency of occurrence or the candidate term with the highest mean of corresponding cosine similarity is used as the key short text information of the second or third accident.

[0057] For narrative-style long text metrics such as the accident occurrence, liability determination, and rectification measures, a semantic consistency-based fusion extraction algorithm is executed to avoid the failure of traditional literal matching. When the same number of large language models as the second or third difficulty threshold are invoked to perform the long text information extraction task, each corresponding task-specific information extraction agent extracts the initial long text from the full accident report, calculates the second cosine similarity between the semantic vectors of any two initial long texts, calculates the average similarity between the semantic vector of any initial long text and the semantic vectors of the remaining initial long texts, removes outlier texts with an average similarity lower than the preset consensus threshold (i.e., model illusions that seriously deviate from the mainstream consensus), and retains the initial long texts with an average similarity not lower than the preset consensus threshold as candidate texts; the candidate text with the highest average similarity is used as the main framework, and the remaining candidate texts are used as supplementary context inputs to the fusion meta-model, instructing the fusion meta-model to extract missing details (such as specific time, key actions, causal relationships, etc.) in the reference context and rewrite the main baseline text, outputting logically coherent second or third accident key long text information with no missing core elements.

[0058] It is worth noting that the fusion meta-model is a natural language sequence generation module that performs a key information knowledge fusion mechanism (usually configured as a large language model with a parameter scale larger than that of a task-specific intelligent agent).

[0059] The input to the fusion meta-model is configured to receive three types of structured feature data: a preset fusion processing instruction. fuse The candidate text with the highest centrality (as the baseline anchor) and the remaining text set after removing the anchor from the candidate set (as the reference context).

[0060] The fusion meta-model aims to balance the complementarity of different underlying models in terms of detailed description, performing information completion and dynamic rewriting tasks. Specifically, the model is controlled by the fusion processing instructions, strictly preserving the main narrative logic of the baseline anchor text during the calculation process, while cross-referencing the reference context set to dynamically retrieve and extract fine-grained key details (including but not limited to specific time nodes, spatial locations, and relevant responsible parties) that were missing in the anchor text. Subsequently, the meta-model seamlessly weaves the extracted incremental key information into the main framework through context interpolation, and finally outputs a target long text with complete core elements and coherent contextual logic through autoregression.

[0061] In this embodiment, a comparison of the three heterogeneous aggregation algorithms is shown in Table 8.

[0062] Table 8 Comparison of three heterogeneous aggregation algorithms ; Furthermore, the step of correcting the remaining values ​​based on the most frequently occurring value and the thought chain reasoning path includes: The most frequently occurring value is used as the initial mode. The task-specific information extraction agents from which the initial mode is extracted are used as the largest consensus subset, and the task-specific information extraction agents from which the initial mode is not extracted are used as the subset to be calibrated. The reasoning path of the thought chain extracted from each largest consensus subset is used as feedback prompts to correct the reasoning path of the subset to be calibrated. For each corrected subset to be calibrated, the second value is extracted again from the full accident report, and the second value with the highest frequency is extracted. If there is a unique highest frequency occurrence, the corresponding second value is used as the key numerical information of the fourth accident or the fifth accident; otherwise, the second values ​​corresponding to multiple identical highest frequency occurrences and the thought chain reasoning path of the corresponding subset to be calibrated are input into the ensemble meta-model, and the key numerical information of the fourth accident or the fifth accident is output.

[0063] It is worth noting that the integrated meta-model is a logic evaluation and decision arbitration module based on CoT reasoning (usually configured as a large language model with high-order logic verification and fact-checking capabilities).

[0064] The ensemble meta-model constructs a dedicated arbitration function architecture, whose input is configured to jointly receive multiple types of feature data: a pre-defined arbitration instruction (Instruction vote), the original incident report document (D), and multiple most frequent candidate values ​​(e.g., v) that lead to a tie. A and v B ), and the underlying thought chain reasoning path that supports the corresponding candidate values ​​(e.g., c A and c B ).

[0065] The ensemble meta-model aims to address the "highest frequency identical (tie-and-win)" problem that persists after multi-agent extraction iterations, executing a final decision based on logical confidence. Specifically, controlled by the arbitration directive, the model avoids blindly voting on numerical values. Instead, it cross-checks the reasoning paths of each candidate value with the original incident report document. By comparing the logical consistency and rigor of different reasoning paths in entity extraction, arithmetic operations, and contextual facts, it accurately identifies and eliminates options with reasoning fallacies, ultimately "voting" to select the most logically sound and factually accurate value (y). * This is output as absolutely certain key numerical information about the accident.

[0066] S5: Construct a fine-grained classification standard for accident levels, and determine the level of production safety accidents based on key accident information and the fine-grained classification standard for accident levels.

[0067] Specifically, the steps include: Construct a numerical vector based on the key numerical information of the first accident, the second accident, the third accident, the fourth accident, or the fifth accident; Eleven numerical intervals were constructed for the number of deaths, the number of serious injuries, and the number of direct economic losses in the numerical vector. Based on the eleven numerical intervals corresponding to each element in the numerical vector, a fine-grained classification standard for accident levels containing 17 types of production safety accident levels was constructed. The accident level is determined by using a fine-grained classification standard based on the number of deaths, serious injuries, and direct economic losses in the numerical vector.

[0068] In some optional embodiments, the method includes constructing a three-dimensional vector of accident features and traditional coarse-grained benchmark determination. The core quantitative indicators of the accident, extracted from the multi-agent collaborative extraction output, are obtained, including the number of deaths (denoted as D), the number of seriously injured (denoted as S), and the direct economic loss (denoted as E, unit: RMB 10,000). A three-dimensional vector of accident features, T=(D,S,E), is constructed in the system memory. Based on the national "Regulations on Reporting and Handling Production Safety Accidents" (GB 6441-2025), a traditional accident level benchmark determination module based on a "logical OR" rule is configured in the system, as shown in Table 9 below. The logical rule of the benchmark determination module is: when any one of the three indicators reaches the upper limit threshold, a high-level determination is triggered, thereby initially classifying the accident into four basic categories: general accidents (L0), major accidents (L1), serious accidents (L2), and particularly serious accidents (L3). The specific accident level classification standards are shown in Table 9.

[0069] Table 9 Accident Classification Standards ; In this embodiment, the determination logic is as follows: the accident level is determined by any one of the three indicators—the number of deaths, the number of serious injuries, and the direct economic loss—meeting the corresponding numerical standard (i.e., the "logical OR" rule). For example, if an accident causes 100 serious injuries (S≥100), even if the number of deaths (D=0) and the direct economic loss (E=50 million yuan) do not reach the corresponding standard for a particularly serious accident, it should still be determined as a particularly serious accident.

[0070] However, in reality, the ranges for the number of deaths, serious injuries, and direct economic losses corresponding to the four accident levels are quite wide, necessitating finer-grained classification. Therefore, a tripartite structure for accident information is proposed, including the number of deaths, serious injuries, and direct economic losses, specifically comprising: This refers to a range of death tolls. This refers to the range of seriously injured individuals. For the direct economic loss range, all three types of information have 11 possible scenarios, namely... The specific details are shown in Table 10.

[0071] Table 10. Range of values ​​for the number of deaths, the number of seriously injured, and the direct economic losses. ; In Table 10, the above interval scenarios exhibit a relationship of inclusion and being included, such as... The interval corresponding to this situation includes , , The corresponding interval for the scenario is determined by the "logical OR" criterion used in judging major accidents. This means that not every indicator is required to meet a threshold; rather, exceeding any indicator is allowed to meet the criteria for a major accident. When the number of deaths does not meet the threshold, [the following is used:] The value <3 represents this state, which essentially encompasses... , , This representation simplifies the classification logic for all cases.

[0072] Based on the above, the corresponding sets of the four levels in the "Regulations on Reporting and Handling Production Safety Accidents" are given as follows: ; ; ; .

[0073] To quantitatively identify the severity level of an accident, an accident severity level identification function L(S) is defined to determine the accident category corresponding to different combinations of factors: ,in This represents a mapping function.

[0074] (a) Fine-grained classification of general accidents, the fine-grained classification criteria for general accidents are shown in Table 11; Table 11 Fine-grained classification criteria for general accidents ; In Table 11, Level 5 represents the most minor, general accident: α0=0 (no deaths), β0=0 (no serious injuries), γ0∈(0,100) (direct economic losses of 0-1 million yuan).

[0075] (b) A fine-grained classification of major accidents is performed. The fine-grained classification criteria for major accidents are shown in Table 12. Table 12 Fine-grained classification criteria for major accidents ; In Table 12, Level 5 represents the least serious major accident: α3<3 (number of deaths less than 3), β3<10 (number of seriously injured less than 10), γ4∈[1000,2500) (direct economic loss of 10-25 million yuan).

[0076] (c) Major accidents are classified in a fine-grained manner. The fine-grained classification criteria for major accidents are shown in Table 13. Table 13 Fine-grained classification criteria for major accidents ; In Table 13, Level 5 represents the least serious accident: α6<10 (number of deaths less than 10), β6<50 (number of seriously injured less than 50), γ7∈[5000,7500) (direct economic loss of 5000-7500 million yuan).

[0077] (d) A fine-grained classification of particularly serious accidents is carried out. The fine-grained classification criteria for particularly serious accidents are shown in Table 14. Table 14 Fine-grained classification criteria for particularly serious accidents ; In Table 14, Level 2 represents the least serious accident: α9<30 (number of deaths less than 30), β9<100 (number of seriously injured less than 100), γ 10 >100 million yuan (direct economic losses exceeding 100 million yuan).

[0078] As a preferred embodiment, based on the aforementioned fine-grained classification method for production safety accident levels, and combined with the key accident information extracted in step S4 (including the number of deaths, the number of serious injuries, and direct economic losses), a fine-grained classification agent for production safety accident levels based on a large language model is constructed. The workflow includes a multi-branch "selector (IF node)" used to determine the primary level category of the accident (general accident, major accident, serious accident, and extremely serious accident). The output of the selector node is connected to multiple large language model task nodes, each corresponding to a fine-grained accident level classification model: a general accident fine-grained classification model; a major accident fine-grained classification model; a serious accident fine-grained classification model; and an extremely serious accident fine-grained classification model.

[0079] Then, by designing prompt words, a fine-grained intelligent agent for classifying production safety accident levels based on a large language model is constructed. Taking the fine-grained classification of general accidents as an example, the prompt word design is shown in Table 15; Table 15 Fine-grained classification of general accident levels and agent prompt word design ; Through the above steps, a fine-grained intelligent agent for classifying production safety accident levels based on a large language model was constructed, which transformed accident level classification from manual experience-based judgment to data-driven automated intelligent assessment, significantly improving the accuracy and response efficiency of accident level determination.

[0080] The fine-grained classification method for production safety accident levels provided in this embodiment has the following beneficial effects: By collecting multidimensional data on production safety accidents from online platforms and combining it with the national standard "Classification and Coding of Production Safety Accidents" (GB 1999-2000), (6441-2025) Constructs an accident classification information database, providing a professional and standardized knowledge foundation for information extraction; Based on the constructed accident report full-text conversion intelligent agent and knowledge base retrieval intelligent agent, automatic invocation and accurate matching of accident features are realized; On this core basis, this embodiment innovatively proposes an intelligent agent collaborative architecture based on multiple language models, and performs key information extraction by introducing a dynamic task scheduling mechanism and three types of heterogeneous aggregation algorithms. This mechanism not only fundamentally overcomes the "illusion" and randomness bias easily induced by single large models when processing complex long texts, but also significantly improves the extraction accuracy of core elements such as accident name, casualties, cause, and responsible party, while realizing the efficient dynamic allocation of system computing resources; Furthermore, based on the "Regulations on Reporting and Handling Production Safety Accidents", this embodiment pioneers a fine-grained classification algorithm for production safety accident levels, successfully breaking through the application limitations of the traditional four categories of coarse-grained ratings, accurately quantifying and mapping the severity of accidents to 17 fine-grained sub-levels, and completely realizing the leap from highly dependent on human experience to fully data-driven automation and accuracy in accident rating. In summary, this embodiment has fully established a fully automated technical chain from multi-source heterogeneous data preprocessing and multi-agent collaborative high-precision extraction to fine-grained quantitative intelligent rating, which greatly improves the objectivity and intelligence level of accident report analysis and provides strong underlying technical support for refined risk management and digital transformation in the field of production safety.

[0081] Example 2 In this embodiment, an example of applying the fine-grained classification method for production safety accident levels is provided, including: T1: Collect production accident case data containing accident report webpage links and obtain production accident classification elements; obtain the accident report title and full text of the production safety accident to be evaluated based on the accident report webpage links.

[0082] Specifically, the homepage of the safety management network case library was used as the data collection entry point. Python tools were used to batch crawl accident report data from the safety management website, obtaining the titles and corresponding URLs of over 26,000 accident reports from 1959 to 2025. The processed structured data was then uniformly written into a pre-set cloud document or cloud database. Simultaneously, the national standard "Classification and Coding of Production Safety Accidents" (GB 6441-2025) was parsed, extracting classification elements such as causative agents, harmful substances, modes of harm, unsafe conditions, and unsafe behaviors. These elements, along with the collected accident case data, were stored in a cloud document. Table 16 below shows examples of the collected industry classifications and typical problem data for production safety accident reports.

[0083] Table 16. Industry Classification and Typical Issues in Production Safety Accident Reporting: Data Examples ; Using the obtained accident report webpage links as input, and leveraging the plugin functionality of the intelligent agent platform, the platform's webpage content extraction tool is invoked to automatically parse and extract the accident report webpage content. Through a loop processing method, the accident report titles, full text, and corresponding links are obtained in batches, and the results are converted into structured data. Table 17 shows a data example for production safety accident report R1.

[0084] Table 17. Data Example for Production Safety Accident Report R1 ; To ensure the completeness, standardization, and suitability of the accident report text for subsequent information quality analysis and extraction processes, large language model prompts were designed to preprocess the acquired text. The prompt design is shown in Table 18 below.

[0085] Table 18. Design of Prompt Words for Accident Text Preprocessing Agent ; T2: Classify the full text of the accident report based on the production accident classification elements to obtain the accident type.

[0086] Specifically, based on the information obtained from the national standard document "Classification and Coding of Production Safety Accidents" (GB 6441-2025), classification dimensions such as causative agents (57 items), harmful agents (52 items), mode of harm (20 items), unsafe conditions (41 items), and unsafe behaviors (42 items) were organized. Independent knowledge bases were established for each dimension in the knowledge base management module of the intelligent agent platform. An example of knowledge base construction is shown in Table 19.

[0087] Table 19 Example of Analysis Results for "Classification and Coding of Production Safety Accidents" (GB 6441-2025) ; In the workflow design module of the intelligent agent platform, parallel retrieval nodes are established to realize synchronous access to knowledge bases such as causative agents, harmful agents, harmful methods, unsafe states, and unsafe behaviors. For each retrieval node, key parameters such as retrieval scope, maximum recall quantity, and minimum matching degree are configured. Taking the above-mentioned accident report text as an example, the running results are shown in Table 20 below.

[0088] Table 20 Examples of Knowledge Base Retrieval Output Results ; The next step involves using the accident elements obtained through parallel retrieval as input, designing prompt word templates based on a large language model, and achieving matching and judgment between accident elements and the standard classification system to output the corresponding accident category. The output results of the large-scale production safety accident classification model are shown in Table 21 below.

[0089] Table 21 Output Results of the Large-Scale Model for Classifying Production Safety Accidents ; T3: Determine the text length level of the full text of the accident report; construct primary indicators for information quantification and secondary indicators under each primary indicator; calculate the corresponding total score based on the number of secondary indicators contained in the full text of the accident report, and determine the completeness level of the full text of the accident report based on the total score.

[0090] Specifically, based on the full text of the accident report obtained in step T1 above, in order to achieve a quantitative assessment of the complexity of the accident report text and provide a decision-making basis for subsequent multi-agent scheduling, this embodiment first performed a statistical analysis of the text length of approximately 1,000 valid samples.

[0091] (1) Text length metric: The frequency distribution histogram based on a 500-character step size shows that the text length of accident reports exhibits a significant right-skewed distribution, with the data mainly concentrated in the 500-1500 character range. Figure 4 As shown, this indicates a significant difference in the amount of information in investigation reports corresponding to different accident levels: minor accidents are often presented in the form of brief reports, while major accidents include detailed investigation records and analysis reports.

[0092] (2) Three-level stratification criteria based on cumulative frequency: Given that text length is a crucial indicator of information capacity and processing difficulty, and that a unified grading threshold is currently lacking in the field, this embodiment employs a "tripartite principle based on cumulative frequency" to construct a grading standard. Analysis of the cumulative frequency distribution curve reveals that the cutoff point at 1 / 3 of the cumulative frequency (approximately 330 samples) lies in the 2500-3000 character range, and the cutoff point at 2 / 3 of the cumulative frequency (approximately 660 samples) lies in the 5500-6000 character range. For ease of calculation and execution, this embodiment ultimately determines 2750 characters and 5750 characters as grading thresholds, dividing the text length index B into three levels. Taking the full text of the accident report obtained in step T1 as an example, this text of 5420 characters belongs to the medium-length text category (denoted as B=B2).

[0093] Furthermore, based on the standardized full text of the accident report obtained in step 2, an intelligent agent for assessing the integrity of accident report information is constructed. An accident report integrity assessment system is built based on five primary indicators: basic accident information, emergency response information, severity criterion information, causative factor information, and liability handling information. Basic accident information includes six secondary indicators: accident name, accident location, accident occurrence process, information on relevant personnel, information on relevant units, and contract signing status. Emergency response information includes one secondary indicator: emergency response and assessment. Severity criterion information includes three secondary indicators: number of deaths, number of serious injuries, and direct economic losses. Causative factor information includes seven secondary indicators: direct cause, indirect cause, causative agent, harmful agent, mode of harm, unsafe condition, and unsafe act. Liability handling information includes three secondary indicators: responsible party, handling recommendations, and corrective measures. A quantitative scoring standard is also set, with weights of 30, 5, 15, 35, and 15 points for the five primary indicators, respectively, for a total score of 100 points. The specific indicator composition and weight allocation are shown in Table 22.

[0094] Table 22 Quantitative Assessment Table for Information Integrity ; Information Quality Grading Standard: Based on the total score S, this embodiment divides the information integrity of the full text of the accident report into three levels ( ), as an indicator to measure the "information gap" of a task: (High completeness): S ≥ 80 points. This type of report has complete information elements, clear core causes and responsibility chains, and is suitable as benchmark data for building high-quality knowledge graphs.

[0095] (Completeness): 75 points > S > 60 points. This type of report contains most of the key information, but some details may be missing.

[0096] (Poor completeness): S≤60 points. This type of report usually has serious information gaps (such as missing specific cause analysis or corrective measures).

[0097] T4: Determine the number of large language models to perform the information extraction task based on the text length level and the completeness level. Inject a structured prompt word template specific to the extraction task into each large language model, construct a task-specific information extraction agent, and use the task-specific information extraction agent to extract information from the full text of the accident report to obtain key accident information.

[0098] In this embodiment, the results of extracting key accident information are shown in Table 23.

[0099] Table 23 Results of Key Accident Information Extraction ; As shown in Table 23, the total score S=90 points, indicating that the information elements of the report are complete, the core causes and the chain of responsibility are clear, and it belongs to the strong integrity level A1 range (A=A1).

[0100] Furthermore, define a task difficulty mapping function. The output value N represents the number of parallel large language model agents allocated by the system to the current task. In the scheduling configuration matrix, N∈{1,3,5} is set based on the "on-demand allocation" principle. The specific scheduling configuration matrix is ​​shown in Table 24.

[0101] Table 24 Decision Matrix for the Number of Scheduling Agents ; Furthermore, the text length level (medium text) and integrity level (strong integrity) obtained above are obtained. The scheduling agent uses the received two-dimensional feature label combination (medium text, strong integrity) as the retrieval key value and inputs it into the preset task difficulty mapping matrix (i.e., Table 24) for coordinate lookup and cross-comparison.

[0102] Based on the built-in feedback rules of the mapping matrix, the system's comprehensive evaluation concludes that although the report is of medium length, its information elements are extremely complete (high integrity), and its overall contextual logic is clear, lacking a high-difficulty reasoning threshold. Therefore, the system classifies it as a "low-difficulty extraction task," and the mapping function outputs the number of parallel large language model agents allocated, N=1. The scheduling agent, based on the output value N=1, automatically routes the current extraction task to "L1 lightweight inference mode." The system allocates and wakes up only a single large language model instance to take over the extraction of this incident report, effectively avoiding computational redundancy while ensuring information extraction accuracy, thus minimizing system computational resource consumption and optimizing processing latency.

[0103] Then, based on the constructed task-specific information extraction agent, information is extracted from the full text of the accident report to obtain key accident information. The extraction results are shown in Table 25.

[0104] Table 25 Results of Key Numerical Information Extraction from the Accident ; To eliminate the randomness bias and domain illusion of the Monolithic Large Language Model (LLM), this embodiment designs three types of heterogeneous aggregation algorithms for different types of incident elements.

[0105] 1. Aggregation mechanism for numerical information extraction: For numerical indicators such as the number of deaths and the number of seriously injured, an iterative consistency discrimination algorithm based on the CoT (CoT) feedback is adopted.

[0106] Task definition: Let D be the input full text of the accident report, and extract task X, which refers to numerical indicators such as the number of deaths, the number of seriously injured, or direct economic losses.

[0107] Model set: Let for A collection of large language models of different types.

[0108] Output space: : Representation Model The result of the t-th iteration. : The set of extraction results for all models in round t.

[0109] : Representation Model In the reasoning process of the thought chain generated in the t-th iteration, : The set of thought chains for all models in round t.

[0110] The polymerization process is as follows: Step 1: Initial Reasoning: In the first iteration t=1, all models The results and reasoning process are generated independently based on the input D: ; At this point, the extraction result set is obtained. and Mind Chain .

[0111] Step 2: Consistency Identification and Set Partitioning: Step 2.1: Global consistency determination, definition The number of distinct values ​​in the result set: ; Case 1 (Completely identical): If This means that all models output the same result. In this case, directly output the final result. : The algorithm terminates.

[0112] Case 2 (Disagreement exists): If If so, the dispute resolution process will begin.

[0113] Step 2.2: Majority identification, defining the counting function The frequency of the value v in the result set: ; in, This is an indicator function.

[0114] Find the value that appears most frequently (i.e., the mode): ; Step 2.3: Model set partitioning, based on , model set It is divided into two mutually exclusive subsets, including the maximum consensus set and the set to be calibrated, as follows: Subset 1: Maximum consensus set : ; The corresponding set of thought chains is .

[0115] Subset 2: Set to be calibrated : ; Step 3: Feedback iteration, in order to utilize collective intelligence to correct biases, from A representative thought chain is randomly selected from the data. : ,right Guided generation of the model in the middle, making it based on Rethink it. The rules for updating the results in Round 2 are as follows: ; The updated result set is .

[0116] Step 4: Consistency analysis and arbitration after iteration: Step 4.1: Unique mode test. Calculate the frequency of each value in the second round of results and sort them. Let... The set of values ​​with the highest frequency: ; Case 1 (There exists a unique mode), if If so, then there exists a unique optimal consensus. Output this result directly: The algorithm terminates.

[0117] Case 2 (Multiple modes exist), if This indicates that there are at least two results. They have the same highest frequency.

[0118] Step 4.2: Ensemble Model Arbitration, Introducing the Ensemble Model To make a final decision, extract the thought processes corresponding to the two outcomes that led to the deadlock. and (From supporters) and (model).

[0119] Construct the arbitration function: ; in, The instruction model compares two inference paths and votes to select the more reasonable one.

[0120] Step 5: Final Output - Output the optimal estimate determined through the above steps. This serves as the final result of the death toll.

[0121] 2. Aggregation mechanism for short text information extraction: For key indicators in accident reports, such as the causative agent, the harmful agent, the mode of harm, unsafe conditions, and unsafe acts, the generative nature of large language models often results in natural language descriptions rather than standard terminology (e.g., describing "crane injury" as "being hit by a crane"). To address this semantic-standard mismatch, this embodiment proposes a standardized integration method based on domain knowledge base mapping for enhanced semantic normalization in retrieval.

[0122] Task Definition: Let D be the input full text of the accident report. Extraction task X refers to mapping non-standard descriptions to a controlled vocabulary.

[0123] The aggregation steps are as follows: Step 1: Knowledge base definition (5 types), introducing a domain knowledge base built based on the national standard "Classification and Coding of Production Safety Accidents" (GB6441-2025). ,in Representative standard terminology, This is the vector representation of the term in the pre-trained semantic space.

[0124] Step 2: Semantic mapping and normalization. Let the set of original natural language outputs from n large models for a certain classification task be: .

[0125] Because the model output may contain non-standard expressions (e.g., the output "fell from scaffolding" while the standard term is "fall from height"), a mapping function needs to be established. For each raw output Calculate its vector representation Vectors of all standard terms in the knowledge base Cosine similarity: ; The standard term with the highest similarity was selected as the normalization result.

[0126] ; To ensure the reliability of the mapping, a similarity threshold is set. (e.g., 0.85). If Then mark .

[0127] Step 3: Consistent decision-making after normalization, after obtaining the normalized set. Then, the frequency distribution of each standard term is calculated: Final output result The most frequently used standard terms: ; If the same "Tie" occurs frequently, calculate the mean of the original similarity for each candidate term and select the one with the higher semantic match. .

[0128] 3. Aggregation mechanism for extracting information from long texts: For long text-based indicators such as accident descriptions, liability determinations, and rectification measures, the traditional "precise matching-mode voting" strategy is no longer applicable due to the diversity of natural language expressions. Therefore, this study designs a fusion extraction scheme based on semantic vector space. This scheme first uses a high-dimensional embedding model to convert the text output of each agent into semantic vectors, and then quantifies the "consistency of viewpoints" between different models by calculating the cosine similarity between each pair of agents.

[0129] The core hypothesis of the experiment is that, despite the different wording of different models, correct and high-quality extraction results should cluster in close regions within the semantic space, while illusory or erroneous results will act as outliers far from the semantic center. Therefore, a "multi-model fusion extraction algorithm based on semantic consistency" is proposed. This method does not pursue completely identical output text, but rather semantic consensus, and ultimately fuses highly consensus information into a final standard answer through a meta-model.

[0130] Problem Definition: Let the task be the extraction of qualitative indicators (such as accident details and corrective measures) from long texts. .

[0131] Model collection The output text result set is ,in The natural language text paragraph generated for the h-th model.

[0132] The aggregation steps are as follows: Step 1: Semantic Vectorization Representation. Since long texts cannot be directly matched with symbols, a pre-trained semantic embedding model is introduced, denoted as... Map the output text of each model to a high-dimensional vector space. : ;in For text The semantic vector.

[0133] Step 2: Construct the semantic consistency matrix. Calculate the pairwise cosine similarity between model outputs to build a similarity matrix. , of which elements This indicates the degree of consistency between the outputs of model i and model j: ; Step 3: Semantic centroid identification and anomaly removal, defining the semantic centrality of each output result. That is, the average similarity of the result with all other results, used to measure its ability to serve as a "consensus representative": ; Set a similarity threshold (For example, 0.85). If the centrality of a result... If it is not, it is considered an "illusion" or "outlier" that deviates from semantic consensus and is included in the removal set. The retained high-quality results constitute the candidate set. : ;like If empty, a retry mechanism is triggered or a selection is made. The biggest result.

[0134] Step 4: Knowledge fusion based on key information. To ensure the complementarity of different models in detailed description, a fusion strategy is adopted instead of directly selecting a single result. The text with the highest centrality is selected. As a baseline, a meta-model with a larger number of parameters is introduced to... Main branch, with reference to candidate set Perform information completion and rewriting tasks on the other text in the file. Final output. The generation process is formalized as follows: ; in, The instruction model states: "Retain the main logic of the Anchor, check if there are any key details missing from the Anchor in the References (such as specific time, location, and responsible person), supplement them if they exist, and output the final text that is logically coherent."

[0135] T5: Construct a fine-grained classification standard for accident levels, and determine the level of production safety accidents based on key accident information and the fine-grained classification standard for accident levels.

[0136] Specifically, a fine-grained classification method for production safety accident levels is constructed, based on interval subdivisions of the number of deaths, serious injuries, and direct economic losses in the accident. For example, if the number of deaths is D=1, it corresponds to... In the scenario where the number of seriously injured is S=0, the corresponding... In the scenario where direct economic loss is 100 ≤ E < 500, the corresponding... Scenario. To quantitatively identify the severity level of an accident, an accident severity level identification function L(S) is defined to determine the accident category corresponding to different combinations of factors: According to the grading standards, Level 4 Therefore, this general accident level is further divided into four levels.

[0137] To verify the applicability and necessity of the fine-grained accident severity classification method, this embodiment constructs a three-dimensional accident data distribution map based on general accident sample data, such as... Figure 5 As shown in the figure, the three-dimensional coordinate axes represent the number of deaths (X-axis, ranging from 0 to 2 people), the number of seriously injured (Y-axis, ranging from 0 to 9 people), and the direct economic loss (Z-axis, ranging from 0 to 10 million yuan). Each scatter point corresponds to an accident record, which is used to reflect the correlation between casualties and economic losses in the accident.

[0138] In data preprocessing, a total of 761 general accident samples were collected. After removing 127 non-standard reports with zero economic loss, 634 valid samples were retained. The three-dimensional scatter distribution characteristics show that: (1) The sample is mainly concentrated in the range of low number of deaths (0 to 2 people) and low to medium economic loss (0 to 5 million yuan), indicating that most accidents are characterized by minor to moderate economic impact; (2) The number of seriously injured people is relatively dispersed and is distributed in different economic loss ranges, indicating that there is a strong non-linear correlation between serious injury and economic loss. (3) Some samples appeared in areas with low mortality and low serious injury but high economic loss, reflecting the "single-factor exceeding the limit for classification" characteristic, where exceeding the economic loss limit alone can lead to an upgrade in accident level. Three-dimensional visualization analysis shows that the accident samples exhibit obvious intersections and fuzzy boundaries in the three dimensions, making it difficult for traditional level determination methods based on a single threshold to accurately reflect the subtle differences in accident severity. Therefore, based on the above data analysis results, a fine-grained accident level classification agent based on a large language model is further proposed to achieve automated intelligent determination of complex accident levels. Figure 6 This is a three-dimensional data distribution map of a major accident. Figure 6 In the middle, for example, the point (4,0,0) satisfies The situation falls under level five of a major accident. That is, the least serious major accident; all other points can be identified according to their corresponding three-dimensional coordinates. The situation determines the fine-grained level of each event in a larger accident. Figure 7For a three-dimensional data distribution map of major accidents, in Figure 7 In the middle, the point (12,1,1771.6) satisfies The situation falls under level five of a major accident. That is, the least serious accident; point (10,1,890) satisfies The situation falls under level five of a major accident. That is, the least serious accident; point (10,3,721.5) satisfies The situation falls under level five of a major accident. That is, the least serious major accident; point (29,4,1164.3) satisfies The situation falls under level four of a major accident. That is, a minor major accident; point (28, 56, 340) satisfies The situation falls under level four of a major accident. That is, a minor major accident.

[0139] Furthermore, by combining the key accident information parameters extracted above (including the number of deaths, the number of seriously injured, and the direct economic losses), a fine-grained accident level classification intelligent agent based on a large language model is constructed.

[0140] First, an accident classification workflow is built in the intelligent agent platform. An input module is set up to receive accident sample data, including the number of fatalities, the number of seriously injured, and the direct economic loss. The workflow includes a multi-branch "selector (IF node)" to determine the primary accident category (general accident, major accident, serious accident, and extremely serious accident). Then, the output of the selector node is connected to multiple large language model task nodes. Each node corresponds to a fine-grained accident classification model: a fine-grained model for general accidents; a fine-grained model for major accidents; a fine-grained model for serious accidents; and a fine-grained model for extremely serious accidents. Each task node is built based on a unified prompt word template and internally calls the large language model to perform accident level sub-interval identification and fine-grained classification judgment tasks. Second, corresponding prompt words are designed for each level model. The prompt content includes the input variable definitions (fatalities, injuries, economic loss), interval judgment criteria, and fine-grained classification logic, enabling the large language model to automatically generate fine-grained judgment results for the corresponding level based on the defined interval rules. By embedding interval thresholds and judgment conditions in the prompt words, the model can make accurate level classification judgments under multi-dimensional input conditions.

[0141] The solution in this embodiment effectively solves the extraction errors and illusions that occur when a single large model processes complex and long texts. It breaks through the limitations of traditional legal coarse-grained rating, not only achieving high-precision extraction and intelligent analysis of accident reports, but also providing efficient support for the digital transformation of production safety management, and significantly improving the level of precision in accident analysis and prevention.

[0142] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0143] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this patent application should be determined by the appended claims.

Claims

1. A method for fine-grained classification of production safety accident levels, characterized in that, include: S1: Collect production accident case data containing accident report webpage links and obtain production accident classification elements; Obtain the title and full text of the accident report for the production safety accident to be assessed from the accident report webpage link; S2: Classify the full text of the accident report based on the production accident classification elements to obtain the accident type; S3: Determine the text length level of the full text of the accident report; construct primary indicators for information quantification and secondary indicators under each primary indicator; calculate the corresponding total score based on the number of secondary indicators contained in the full text of the accident report, and determine the completeness level of the full text of the accident report based on the total score. S4: Determine the number of large language models to perform information extraction tasks based on text length and completeness levels, including: The task difficulty value is mapped based on the text length level and the integrity level using a mapping function; The task difficulty value can only be one of the first difficulty threshold, the second difficulty threshold, or the third difficulty threshold; When the task difficulty value is the first difficulty threshold, a single large language model is invoked to perform the information extraction task. When the task difficulty value is the second difficulty threshold, the same number of large language models as the second difficulty threshold are called to execute the information extraction task in parallel. When the task difficulty value is the third difficulty threshold, the same number of large language models as the third difficulty threshold are called to perform the information extraction task in parallel. Each of the aforementioned large language models is injected with a structured prompt word template specific to the extraction task, constructing a task-specific information extraction agent. This task-specific information extraction agent is then used to extract information from the full text of the accident report, obtaining key accident information, including: Information extraction tasks include: numerical information extraction tasks; Secondary indicators include numerical indicators, such as the number of deaths, the number of seriously injured, and direct economic losses. When a single large language model is invoked to perform a numerical information extraction task, the corresponding task-specific information extraction agent extracts the key numerical information of the first accident from the full accident report. When the same number of large language models as the second or third difficulty threshold are invoked to perform the numerical information extraction task, each corresponding task-specific information extraction agent extracts the numerical values ​​containing numerical indicators and the initial results of the thought chain reasoning path from the full accident report, and determines whether the extracted values ​​are consistent. If they are, the values ​​are output as the key numerical information of the second or third accident; otherwise, the remaining values ​​are corrected according to the value with the highest frequency and the thought chain reasoning path, and the key numerical information of the fourth or fifth accident is output. The process of correcting the remaining values ​​based on the most frequently occurring values ​​and the reasoning path of the thought chain includes: The most frequently occurring value is used as the initial mode. The task-specific information extraction agents from which the initial mode is extracted are used as the largest consensus subset, and the task-specific information extraction agents from which the initial mode is not extracted are used as the subset to be calibrated. The reasoning path of the thought chain extracted from each largest consensus subset is used as feedback prompts to correct the reasoning path of the subset to be calibrated. For each corrected subset to be calibrated, the second value is extracted again from the full accident report, and the second value with the highest frequency is extracted. If there is a unique highest frequency occurrence, the corresponding second value is used as the key numerical information of the fourth accident or the fifth accident; otherwise, the second values ​​corresponding to multiple identical highest frequency occurrences and the thought chain reasoning path of the corresponding subset to be calibrated are input into the ensemble meta-model, and the key numerical information of the fourth accident or the fifth accident is output. S5: Construct a fine-grained classification standard for accident levels, and determine the level of production safety accidents based on key accident information and the fine-grained classification standard for accident levels.

2. The method according to claim 1, characterized in that, In S1, the collection of production accident case data containing accident report webpage links includes: Obtain the target webpage from the production safety accident information disclosure platform, parse the target webpage to obtain the list of accident cases and their pagination nodes; Construct asynchronous network requests according to pagination order, extract the URL of the target webpage using webpage parsing rules, use the URL as the link to the accident report webpage, and simultaneously parse out the industry classification and basic accident type information during the extraction process; The data in the accident case list, its industry classification, and basic accident type information are preprocessed, and the accident report webpage links and the preprocessed data are integrated to obtain the production accident case data.

3. The method according to claim 1, characterized in that, In S1, obtaining the classification elements of production accidents includes: The document on the classification standards for production safety accidents was obtained, and document structure parsing technology was used to extract the core classification elements, namely, the cause, the causative agent, the mode of harm, the unsafe condition, and the unsafe behavior, contained in the document. By aligning the core classification elements with the production accident case data, we obtain the production accident classification elements.

4. The method according to claim 3, characterized in that, The classification of the full text of the accident report based on production accident classification elements includes: Construct independent sub-knowledge bases corresponding to the causative agent, the harmful agent, the mode of harm, the unsafe state, and the unsafe behavior; Several parallel retrieval nodes are set up to enable synchronous access to each independent sub-knowledge base; The context data in the corresponding independent sub-knowledge base is retrieved by each retrieval node, and the retrieved context data is connected to the production safety accident classification intelligent agent. The accident type is output based on the full text of the accident report by the production safety accident classification intelligent agent. The production safety accident classification intelligent agent is constructed based on a large language model, designed classification prompt words, and a production safety cause analysis knowledge base.

5. The method according to claim 1, characterized in that, In S3, determining the text length level of the full text of the accident report includes: The total number of characters contained in the full text of the accident report is used as an indicator of text length. The cumulative frequency distribution curve of the text length of the full text of the historical accident report is parsed, and the values ​​at one-third of the cumulative frequency distribution curve of the text length from smallest to largest are extracted as the first level threshold and the values ​​at two-thirds of the curve are extracted as the second level threshold. When the text length index is less than or equal to the first classification threshold, the text length level of the full text of the accident report is determined to be short text; When the text length index is greater than the first grading threshold and less than the second grading threshold, the text length level of the full text of the accident report is determined to be medium text. When the text length index is greater than or equal to the second classification threshold, the text length level of the full text of the accident report is determined to be long text.

6. The method according to claim 1, characterized in that, In S3, determining the integrity level of the full text of the accident report based on the total score includes: Establish a primary indicator system that includes basic accident information, emergency response information, severity criterion information, causal factors information, and liability handling information; Several secondary indicators are further refined from the primary indicators to reflect specific information about the accident. When the full text of the accident report explicitly contains any secondary indicator, a first preset value is assigned to the score of the corresponding secondary indicator; otherwise, a second preset value is assigned. The total score is obtained by adding up the scores of all secondary indicators contained in the full text of the accident report; When the total score is greater than or equal to the first integrity threshold, the integrity level of the full text of the accident report is determined to be Level 1; When the total score is greater than the second integrity threshold and less than the first integrity threshold, the integrity level of the full text of the accident report is determined to be the second level. When the total score is less than or equal to the second integrity threshold, the integrity level of the full text of the accident report is determined to be level three; the first integrity threshold is greater than the second integrity threshold.

7. The method according to claim 1, characterized in that, S5 include: Construct a numerical vector based on the key numerical information of the first accident, the second accident, the third accident, the fourth accident, or the fifth accident; Eleven numerical intervals were constructed for the number of deaths, the number of serious injuries, and the number of direct economic losses in the numerical vector. Based on the eleven numerical intervals corresponding to each element in the numerical vector, a fine-grained classification standard for accident levels containing 17 types of production safety accident levels was constructed. The accident level is determined by using a fine-grained classification standard based on the number of deaths, serious injuries, and direct economic losses in the numerical vector.

Citation Information

Patent Citations

  • Accident case library and white book generation method based on large language model

    CN117056457A

  • Model orientation evaluation method and device based on vehicle condition data

    CN117591847A