A method and system for intelligent checking of special equipment inspection reports based on a large language model

By using a large language model-based intelligent verification method, the challenges of semantic understanding and long text processing in special equipment inspection reports have been solved. This enables full content verification of special equipment inspection reports, improving the accuracy and efficiency of the review process and reducing the rate of missed inspections.

CN122491284APending Publication Date: 2026-07-31FUJIAN SPECIAL EQUIP TESTING RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUJIAN SPECIAL EQUIP TESTING RES INST
Filing Date
2026-04-29
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies for special equipment inspection reports suffer from a lack of semantic understanding capabilities, blind spots in unstructured data verification, and low efficiency in processing long texts, resulting in high missed detection rates and low review efficiency.

Method used

An intelligent verification method based on a large language model is adopted. Through data acquisition and structured parsing, multimodal information fusion, long text context association and block segmentation, and dynamic prompt word construction, the full content extraction and intelligent verification of special equipment inspection reports are realized. This includes semantic understanding of image information and block processing of long text. Combined with an asynchronous automatic verification mechanism, the review efficiency is improved.

Benefits of technology

It enables full content verification of special equipment inspection reports, eliminates verification blind spots, reduces the rate of missed inspections, improves the accuracy and efficiency of auditing, and reduces the fatigue of manual auditing and the time spent handling basic errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122491284A_ABST
    Figure CN122491284A_ABST
Patent Text Reader

Abstract

This invention relates to an intelligent verification method and system for special equipment inspection reports based on a large language model, belonging to the fields of natural language processing and intelligent document processing technology. The method mainly includes: acquiring and structurally parsing the PDF report to be verified, extracting text, tables, and image objects; processing image objects through a visual language model to generate semantic descriptions and integrate them into the text stream; segmenting the integrated text according to title level and page information, and injecting global metadata to maintain contextual relevance; dynamically constructing verification prompts by combining basic templates, historical error features, and legal knowledge graph logic rules according to the report type; driving the large language model to perform reasoning verification on each segment, and generating a structured verification report after aggregation and deduplication. This invention achieves comprehensive semantic verification of the report's text and image content through multimodal information extraction and contextually related segmentation, and improves review efficiency through an asynchronous task mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of natural language processing and intelligent document processing technology, specifically relating to an intelligent verification method and system for special equipment inspection reports based on a large language model. Background Technology

[0002] Special equipment inspection reports are crucial legal documents for determining the safety status of equipment, and their quality directly impacts the safe operation of the equipment. Currently, the special equipment inspection industry widely uses information management systems (such as inspection report management systems) to assist in report generation. These systems typically store structured data in databases and provide standard report templates. The report review process usually involves: inspectors writing and submitting the report -> reviewers (such as the responsible engineer) opening the report online for manual review -> issuance. In addition, some systems incorporate simple rule engines, using preset fixed logic (such as regular expressions and threshold checks) to perform basic validations on required fields, data formats, and simple logic (such as date sequence) in the report.

[0003] The closest technical solution currently available in the industry is an automatic verification system for inspection reports based on a rules engine. The implementation of this solution is as follows:

[0004] When inspectors save a report or submit it for review, the rule engine iterates through the structured fields in the report based on a pre-defined set of validation rules (such as "rated pressure cannot be empty" and "rated lifting capacity must be within a fixed range depending on the equipment type"). If data that does not conform to the rules is found, the system will display a prompt message.

[0005] For reports approved by the rules engine, reviewers need to manually open the PDF document, read it page by page, and rely on their visual inspection and professional knowledge to check for typos, semantic inconsistencies (such as the contradiction between the description of "severe corrosion" and "security status level 1"), as well as whether the content in the screenshots matches the text description, and finally give their review comments.

[0006] The existing technical solutions have the following drawbacks:

[0007] (1) Lack of semantic understanding ability and inability to verify logical contradictions: Existing rule engines can only process fixed logical judgments of structured data and cannot understand the semantics of natural language text. For example, the report may conclude that the test result is "qualified", but the description of the test result may contain negative descriptions such as "there are cracks and defects". The rule engine cannot identify such deep semantic contradictions and relies entirely on manual discovery, resulting in a high risk of missed detection.

[0008] (2) Difficulty in extracting unstructured data, resulting in a verification blind spot: Existing technologies mainly rely on structured fields stored in the database for verification, while the final generated PDF report contains a large amount of unstructured information. In particular, some non-destructive testing reports allow users to insert text descriptions, table screenshots, instrument reading photos, etc. Existing technologies cannot automatically extract text information from images for comparison, resulting in errors where the image content does not match the entered data and cannot be detected by the system, becoming a verification blind spot.

[0009] (3) Limited processing of long context and low verification efficiency: Inspection reports for large special equipment (such as pressure pipelines) are often hundreds of pages long. Existing technologies lack effective long text processing mechanisms. Large language models directly processing long reports are limited by the context window, resulting in information loss or truncation. Manual review of long reports is extremely time-consuming and easily causes visual fatigue, leading to the neglect of typos, punctuation errors, etc. that are difficult to detect with the naked eye.

[0010] (4) Low efficiency of human-machine collaboration: Due to the lack of a background asynchronous preprocessing mechanism, the system cannot filter out low-level errors in advance. This forces highly professional auditors to spend a lot of energy on low-value labor such as identifying typos and missing formats, rather than focusing on core business logic such as equipment safety performance assessment, resulting in extremely low effective utilization of overall audit resources. Summary of the Invention

[0011] The purpose of this invention is to address the problems of semantic understanding deficiency, blind spots in unstructured data verification, and low efficiency in long text processing caused by the reliance on rule engines and manual review in existing technologies. It provides an intelligent verification method and system for special equipment inspection reports based on a large language model, which can extract all content (including image information) of special equipment inspection reports, overcome the limitations of long text, automatically identify semantic errors and hidden errors by utilizing the semantic understanding capabilities of the large language model, and improve the efficiency and accuracy of review through an asynchronous automatic verification mechanism.

[0012] To achieve the above objectives, the technical solution of the present invention is: an intelligent verification method for special equipment inspection reports based on a large language model, comprising:

[0013] S1. Data acquisition and structured parsing steps: Acquire the special equipment inspection report PDF file to be verified, and perform structured parsing on the PDF file to obtain structured document data including text content, table structure, title level information, image objects and image position indexes;

[0014] S2, Multimodal Information Fusion Step: For the image objects in the structured document data, call the visual language model to generate corresponding image semantic description data, and encapsulate the image semantic description data into preset image tags according to the image position index and insert them into the corresponding positions in the structured document data to obtain the image-text fusion text stream;

[0015] S3. Long text context association block segmentation step: Based on the title level information, page number boundary information and preset block length threshold of the image-text fusion text stream, the image-text fusion text stream is segmented to obtain multiple text blocks; and at least some information from the report number, equipment code, inspection category, equipment name and overall conclusion are extracted from the inspection report to construct a global meta data packet, and the global meta data packet is injected as a prefix into each text block to obtain a context-associative block input sequence;

[0016] S4. Dynamic prompt word construction steps: Determine the report type corresponding to the inspection report, and call the basic prompt word template corresponding to the report type; extract high-frequency error-prone point constraint information based on the error clustering results corresponding to the report type in the historical error corpus, and extract the logical verification rules corresponding to the report type based on the special equipment regulations and standards knowledge graph; combine the basic prompt word template, high-frequency error-prone point constraint information and logical verification rules to generate a dynamic verification instruction set.

[0017] S5. Intelligent verification reasoning and result aggregation steps: Input each text block and the dynamic verification instruction set into the large language model to obtain the preliminary verification results of the corresponding text blocks; the preliminary verification results include error level, error field, and verification description. Then, according to the error field identifier, the preliminary verification results are aggregated across blocks and deduplicated to generate the final structured verification report.

[0018] Furthermore, in step S2, the step of calling a visual language model to generate corresponding image semantic description data for image objects in structured document data includes:

[0019] Extract image object data and their position indices in the document stream from the structured document data, wherein the extracted image set is expressed as:

[0020]

[0021] in, For image data, This is the index of the image's position in the document stream;

[0022] Extracted image data The input is processed by a visual language model to obtain a structured text description. , expressed as:

[0023] This indicates a function that invokes a visual language model for recognition and semantic extraction.

[0024] Furthermore, in step S2, the image semantic description data is encapsulated into preset image tags and inserted into the corresponding position in the structured document data to obtain an image-text fusion text stream, including:

[0025] The structured text description Encapsulated as a preset image tag;

[0026] Based on location index Insert preset image markers into the original text stream. The final image-text fusion text stream is obtained by determining the corresponding position of the image in the middle. , expressed as:

[0027] in, This indicates an insertion or concatenation operation. This indicates that the encapsulated structured text description will be inserted based on its position index.

[0028] Furthermore, in step S4, the basic prompt word template, high-frequency error-prone point constraint information, and logical verification rules are combined to generate a dynamic verification instruction set, including:

[0029] The basic prompt word template, high-frequency error-prone point constraint information, and logical verification rules are combined to form a candidate prompt word set Q, expressed as:

[0030] Q = T + E + R

[0031] Where T is the basic prompt word template, E is the high-frequency error-prone point constraint information, and R is the logical verification rule.

[0032] Furthermore, step S4, generating the dynamic verification instruction set, also includes:

[0033] The prompt words in the candidate prompt word set Q are classified and filtered based on the error level, which includes high error level, medium error level and low error level;

[0034] The filtered results are reassembled to generate the final dynamic verification instruction set, Prompt, expressed as:

[0035] Prompt = H(Q) + M(Q) + L(Q)

[0036] Where H(Q) represents the high error level result set obtained after filtering the candidate prompt word set Q according to the high error level, M(Q) represents the medium error level result set obtained after filtering the candidate prompt word set Q according to the medium error level, and L(Q) represents the low error level result set obtained after filtering the candidate prompt word set Q according to the low error level.

[0037] Furthermore, in step S1, obtaining the PDF file of the special equipment inspection report to be verified includes:

[0038] Monitor the report status field in the business database using a database listener;

[0039] When the report status field is detected to change to the preset pending review status, the corresponding PDF file is retrieved from the file storage system based on the report's unique identifier.

[0040] Furthermore, in step S5, the intelligent verification reasoning and result aggregation steps are executed as asynchronous background tasks, including:

[0041] The verification process is initiated by a scheduled task or event trigger.

[0042] Steps S1 to S5 are executed asynchronously in the background, and the generated final structured verification report is stored in association with the original report.

[0043] This invention also provides an intelligent verification system for special equipment inspection reports based on a large language model, which executes the method described above, including:

[0044] The data acquisition and structured parsing module is used to monitor the report status in the business database and, when the status changes to the preset review status, acquire the corresponding PDF file of the special equipment inspection report to be verified; parse the PDF file to extract text content, table structure, title level information, image objects and image position indexes to generate structured document data;

[0045] The multimodal information fusion module, connected to the data acquisition and structured parsing module, is used to receive the structured document data, call the visual language model to generate corresponding image semantic description data for the image object, and encapsulate the image semantic description data into a preset image tag according to the image position index and insert it into the corresponding position in the structured document data to generate an image-text fusion text stream.

[0046] The long text context association block segmentation module is connected to the multimodal information fusion module. It is used to perform block processing based on the title level information and page number boundary information of the image and text fusion text stream to obtain multiple text blocks. It also constructs a global meta data package based on the global metadata extracted from the inspection report and adds the global meta data package as a prefix to each text block to generate a context association block input sequence.

[0047] The dynamic prompt word construction module is used to determine the report type corresponding to the inspection report, call the corresponding basic prompt word template, extract high-frequency error-prone point constraint information based on the historical error corpus, extract logical verification rules based on the special equipment regulations and standards knowledge graph, combine the basic prompt word template, high-frequency error-prone point constraint information and logical verification rules, and classify and filter them according to error level to generate a dynamic verification instruction set;

[0048] The intelligent verification reasoning and result aggregation module is connected to the long text context association block module and the dynamic prompt word construction module, respectively. It is used to input the input sequences of each block and the dynamic verification instruction set into the large language model for reasoning, to obtain the preliminary verification results of each text block, and to perform cross-block aggregation and deduplication on all preliminary verification results to generate the final structured verification report.

[0049] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to perform the steps of the method described above.

[0050] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method described above.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] 1. Significantly improved verification accuracy and elimination of blind spots: This application uses the VLM model to extract text information from images and combines it with rules for verification, which solves the shortcomings of existing technologies that cannot verify image content. It can detect hidden errors such as inconsistencies between screenshot readings and reported data, and achieve full verification of report content.

[0053] 2. It has semantic understanding capabilities and reduces the false negative rate: This application adopts dynamic prompt words to guide the large language model, which can understand the semantic logic of the report content. It solves the shortcomings of existing rule engines that cannot identify semantic contradictions and can effectively detect deep-seated errors such as "conclusions do not match the data" and "descriptions do not match the judgment criteria".

[0054] 3. Supports long text processing and is highly adaptable: This application adopts a block processing mechanism to solve the shortcomings of existing technologies in handling ultra-long special equipment reports, so that reports of length such as pressure pipelines can also be fully and meticulously checked, avoiding the fatigue and omissions in manual review of long reports.

[0055] 4. Significantly improved review efficiency: This application adopts a timer-based asynchronous automatic verification in the background, which solves the shortcomings of the existing technology in terms of review delays and time-consuming manual handling of low-level errors. Reviewers can directly obtain the AI ​​verification results and only need to focus on key judgments, which significantly shortens the review cycle. Attached Figure Description

[0056] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0057] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.

[0058] This invention provides an intelligent verification method for special equipment inspection reports based on a large language model, comprising:

[0059] S1. Data acquisition and structured parsing steps: Acquire the special equipment inspection report PDF file to be verified, and perform structured parsing on the PDF file to obtain structured document data including text content, table structure, title level information, image objects and image position indexes;

[0060] S2, Multimodal Information Fusion Step: For the image objects in the structured document data, call the visual language model to generate corresponding image semantic description data, and encapsulate the image semantic description data into preset image tags according to the image position index and insert them into the corresponding positions in the structured document data to obtain the image-text fusion text stream;

[0061] S3. Long text context association block segmentation step: Based on the title level information, page number boundary information and preset block length threshold of the image-text fusion text stream, the image-text fusion text stream is segmented to obtain multiple text blocks; and at least some information from the report number, equipment code, inspection category, equipment name and overall conclusion are extracted from the inspection report to construct a global meta data packet, and the global meta data packet is injected as a prefix into each text block to obtain a context-associative block input sequence;

[0062] S4. Dynamic prompt word construction steps: Determine the report type corresponding to the inspection report, and call the basic prompt word template corresponding to the report type; extract high-frequency error-prone point constraint information based on the error clustering results corresponding to the report type in the historical error corpus, and extract the logical verification rules corresponding to the report type based on the special equipment regulations and standards knowledge graph; combine the basic prompt word template, high-frequency error-prone point constraint information and logical verification rules to generate a dynamic verification instruction set.

[0063] S5. Intelligent verification reasoning and result aggregation steps: Input each text block and the dynamic verification instruction set into the large language model to obtain the preliminary verification results of the corresponding text blocks; the preliminary verification results include error level, error field, and verification description. Then, according to the error field identifier, the preliminary verification results are aggregated across blocks and deduplicated to generate the final structured verification report.

[0064] This invention also provides an intelligent verification system for special equipment inspection reports based on a large language model, which executes the method described above, including:

[0065] The multimodal information fusion module, connected to the data acquisition and structured parsing module, is used to receive the structured document data, call the visual language model to generate corresponding image semantic description data for the image object, and encapsulate the image semantic description data into a preset image tag according to the image position index and insert it into the corresponding position in the structured document data to generate an image-text fusion text stream.

[0066] The long text context association block segmentation module is connected to the multimodal information fusion module. It is used to perform block processing based on the title level information and page number boundary information of the image and text fusion text stream to obtain multiple text blocks. It also constructs a global meta data package based on the global metadata extracted from the inspection report and adds the global meta data package as a prefix to each text block to generate a context association block input sequence.

[0067] The dynamic prompt word construction module is used to determine the report type corresponding to the inspection report, call the corresponding basic prompt word template, extract high-frequency error-prone point constraint information based on the historical error corpus, extract logical verification rules based on the special equipment regulations and standards knowledge graph, combine the basic prompt word template, high-frequency error-prone point constraint information and logical verification rules, and classify and filter them according to error level to generate a dynamic verification instruction set;

[0068] The intelligent verification reasoning and result aggregation module is connected to the long text context association block module and the dynamic prompt word construction module, respectively. It is used to input the input sequences of each block and the dynamic verification instruction set into the large language model for reasoning, to obtain the preliminary verification results of each text block, and to perform cross-block aggregation and deduplication on all preliminary verification results to generate the final structured verification report.

[0069] The following are specific implementation examples of the present invention.

[0070] Example 1: System Overall Architecture and Workflow

[0071] This embodiment provides an intelligent verification system for special equipment inspection reports based on a large language model. Through the collaborative work of five core modules (including a data acquisition and structured parsing module, a multimodal information fusion module, a long text context association and segmentation module, a dynamic prompt word construction module, and an intelligent verification reasoning and result aggregation module), it solves the problems of low efficiency and high false negative rate of traditional manual verification, as well as the illusion and inability to handle excessively long context when the LLM large language model is processing long documents in professional fields. Figure 1 This is a flowchart of the overall workflow of the system in this example. The overall workflow mainly includes:

[0072] S1. Data acquisition and structured parsing steps: Acquire the special equipment inspection report PDF file to be verified, and perform structured parsing on the PDF file to obtain structured document data including text content, table structure, title level information, image objects and image position indexes;

[0073] S2, Multimodal Information Fusion Step: For the image objects in the structured document data, call the visual language model to generate corresponding image semantic description data, and encapsulate the image semantic description data into preset image tags according to the image position index and insert them into the corresponding positions in the structured document data to obtain the image-text fusion text stream;

[0074] S3. Long text context association block segmentation step: Based on the title level information, page number boundary information and preset block length threshold of the image-text fusion text stream, the image-text fusion text stream is segmented to obtain multiple text blocks; and at least some information from the report number, equipment code, inspection category, equipment name and overall conclusion are extracted from the inspection report to construct a global meta data packet, and the global meta data packet is injected as a prefix into each text block to obtain a context-associative block input sequence;

[0075] S4. Dynamic prompt word construction steps: Determine the report type corresponding to the inspection report, and call the basic prompt word template corresponding to the report type; extract high-frequency error-prone point constraint information based on the error clustering results corresponding to the report type in the historical error corpus, and extract the logical verification rules corresponding to the report type based on the special equipment regulations and standards knowledge graph; combine the basic prompt word template, high-frequency error-prone point constraint information and logical verification rules to generate a dynamic verification instruction set.

[0076] S5. Intelligent verification reasoning and result aggregation steps: Input each text block and the dynamic verification instruction set into the large language model to obtain the preliminary verification results of the corresponding text blocks; the preliminary verification results include error level, error field, and verification description. Then, according to the error field identifier, the preliminary verification results are aggregated across blocks and deduplicated to generate the final structured verification report.

[0077] Example 2: Specific Implementation of the Data Acquisition and Structured Parsing Module

[0078] As the input end of the system, it is mainly used to solve the problems of automatically acquiring PDF files of special equipment inspection reports and converting unstructured documents into structured document data.

[0079] Step S1 (Report Status Monitoring and Source File Acquisition):

[0080] The system backend deploys a database listener that uses polling or trigger mechanisms to monitor the report status field in the business tables in real time. When the status field value changes to "pending review" or a similar preset status, the data retrieval process is immediately triggered. The system generates a file address path based on the report's unique identifier (such as ISP_ID) and pulls the corresponding PDF binary stream from a distributed file system or object storage server.

[0081] Step S2 (PDF parsing and structure conversion):

[0082] The system invokes a document parsing service (which can be built on an open-source PDF parsing library or a self-developed OCR engine) to perform deep parsing of the PDF binary stream. The parsing logic goes beyond simply extracting plain text; it also includes:

[0083] Table structure recognition: Utilizes visual algorithms to identify table borders and cells (supports complex tables, merged cells, etc.), converts them into Markdown Table syntax or HTML table format, ensuring that the row and column correspondence of values ​​is not lost.

[0084] Hierarchical Restoration: Based on font size, bolding attribute, and paragraph spacing, the document's heading hierarchy (such as H1-H6) is identified, and the flat text is reconstructed into a tree-like logical structure, which facilitates subsequent modules' understanding of chapter semantics.

[0085] Example 3: Specific Implementation of the Multimodal Information Fusion Module

[0086] It is mainly used to solve the problem that the content of images in special equipment inspection reports cannot be used for plain text verification, so that the system can identify and verify hidden errors such as inconsistencies between images and text.

[0087] Step S3 (Image Object Location and Extraction):

[0088] During the parsing process in step S2, the system simultaneously launches an image object detection subprocess. For image objects embedded in the PDF report (including site drawings, equipment nameplates, photographs of paper materials, etc.), the system records their coordinate information on the page, extracts image data based on the coordinates, and generates the image's position index in the document flow. The extracted image set can be expressed as:

[0089]

[0090] Where: I stands for Image, which is the image data extracted based on coordinate position, and P stands for Position, which is the position index of the image in the document stream.

[0091] Step S4 (Visual Language Model Recognition):

[0092] The system has a VLM inference interface that interfaces with a lightweight visual language model. Extracted image data is input into the model, which then executes specific semantic extraction commands. For example, for a pressure gauge photo, the command is "identify the dial reading and unit of measurement"; for a nameplate photo, the command is "extract the equipment model, manufacturing date, and rated parameters." The model outputs structured text descriptions, rather than simple OCR characters, demonstrating its ability to understand image content. The structured text processed by the VLM model inference interface can be expressed as:

[0093]

[0094] Where: S is the output structured text description, and I is Image, which is the image data extracted based on coordinate position.

[0095] Step S5 (Content Blending and Markup Insertion):

[0096] To enable the subsequent large language model to "perceive" image content, this step employs a marker injection method. The structured text output by the VLM is encapsulated into a specific format (e.g., ...), and based on the position index recorded in step S3, precisely insert the marker into the original position of the image in the Markdown text stream. The final complete text can be expressed as:

[0097]

[0098] in, For the original text stream, For insertion / merging operations, This means adding the processed structured text based on the image's position index in the document flow. Insert the original image after the tag.

[0099] Example 4: Specific Implementation of the Long Text Context-Associated Block Segmentation Module

[0100] This addresses the issue of excessively long inspection reports for special equipment, which can easily exceed the context window when directly input into a large language model, thus reducing recognition performance.

[0101] Step S6 (Splitting by Page and Chapter):

[0102] Special equipment inspection reports typically consist of multiple single-page reports and appendices, making them ideal for page-by-page and chapter-by-chapter splitting. The system uses Markdown's heading hierarchy (e.g., "# Pressure Vessel Data Review Report", "# Pressure Vessel Macroscopic Inspection Report") as block boundaries. Simultaneously, combined with page numbering, long texts are segmented into multiple independent text blocks. The number of tokens in each text block is controlled within a preset threshold (e.g., 4K-8K tokens) to avoid overflow while ensuring the integrity of semantic segments.

[0103] Step S7 (Context Association Processing):

[0104] To prevent logical fragmentation caused by segmentation (for example, the "Document Review Report" segment mentioned "the cylinder material is Q345R", but this information is lost when the "corrosion rate" is judged in the later segment), this step constructs a "global meta data package".

[0105] Extraction: Before segmenting, prioritize extracting key metadata from the report header (report number, equipment name, equipment code, inspection category, overall conclusion, etc.).

[0106] Injection: This global metadata packet is forcibly added as a "system prefix" to the header of every chunk of text.

[0107] In this way, when the large model processes any block, it can clearly know "which inspection report of which device this is about", thus ensuring the consistency of the reasoning logic.

[0108] Example 5: Specific Implementation of the Dynamic Prompt Text Construction Module for Special Equipment

[0109] This paper utilizes a dynamic prompt word construction method that incorporates report type identification, historical error feature extraction, and regulatory standard knowledge graph enhancement to address the problems of traditional static prompt words being unable to adapt to different special equipment report types, failing to fully utilize historical audit experience, and being unable to reflect the logical constraints of regulations and standards.

[0110] Step S8 (Report Type Identification and Routing):

[0111] The system parses the report type field of the input data to identify which type of equipment, such as boilers, pressure vessels, or elevators, the periodic inspection or supervision inspection report belongs to, and routes it to the corresponding prompt word template library branch.

[0112] Step S9 (Historical Data Cluster Analysis and Error-Prone Point Extraction):

[0113] The system has a historical error corpus, storing "report rollback records" and "supervisory spot check non-compliance records" from previous years. Unsupervised learning algorithms (such as K-Means clustering or DBSCAN) are used to perform cluster analysis on historical error descriptions, extracting high-frequency error-prone features of these reports (such as "inspection items marked 'x' were not described in the defect and handling" and "safety valve calibration date expired"). These features are dynamically populated into the "key inspection items" area of ​​the prompt words.

[0114] Step S10 (Enhancing the Regulatory and Standards Knowledge Graph):

[0115] To address the logical constraints of regulations and standards for current reporting types, a knowledge graph of special equipment regulations and standards (such as TSG21-2016) is introduced. By defining entity types in the graph (such as inspection items, equipment attributes, logical conditions, judgment conclusions, etc.) and constructing semantic relationship edges between entities (such as reference relationships, mapping relationships, prerequisite dependencies, and mutual exclusion relationships, etc.), a large number of natural language clauses in special equipment inspection procedures and standards are transformed into logical paths in the graph.

[0116] Step S11 (Dynamic Instruction Assembly):

[0117] The system integrates the basic prompt word template T called in step S9, the high-frequency error-prone point checking instructions E extracted in step S9, and the logical verification rules R extracted in step S10 to assemble and generate the final dynamic verification prompt word Q. Subsequently, based on the error level of the problem corresponding to each prompt word item, the candidate prompt word set Q is filtered for high error level, medium error level, and low error level respectively, resulting in high error level result sets, medium error level result sets, and low error level result sets. These are then reassembled to generate the final dynamic verification prompt word. Its expression can be represented as:

[0118] Q = T + E + R

[0119] After forming the candidate prompt word set Q, the system categorizes and filters the candidate prompt word set Q according to the error level of the problem corresponding to each prompt word item. High-risk problem items correspond to problems that directly affect equipment safety judgment, key inspection item conclusions, or overall inspection conclusions; medium-risk problem items correspond to problems that affect the completeness, consistency, or logical correspondence of inspection items; and low-risk problem items correspond to problems that mainly affect format specifications, terminology specifications, and consistency of text expression. The system then reassembles and generates the final dynamic verification prompt words, whose expression can be represented as:

[0120] Prompt = H(Q) + M(Q) + L(Q)

[0121] Where H(Q) represents the high error level result set obtained after filtering the candidate prompt word set Q according to the high error level; M(Q) represents the medium error level result set obtained after filtering the candidate prompt word set Q according to the medium error level; and L(Q) represents the low error level result set obtained after filtering the candidate prompt word set Q according to the low error level.

[0122] In this way, the system does not simply overlay the basic prompt word template, high-frequency error-prone point check instructions, and legal standard logic verification rules. Instead, it first forms a set of candidate prompt words, and then classifies, filters, and assembles them in layers according to the error level to generate dynamic verification prompt words.

[0123] Example 6: Intelligent Verification Reasoning and Result Aggregation Steps

[0124] Steps S12-S13 (Reasoning and Summary):

[0125] The system inputs the processed chunked text and dynamic prompts into a Large Language Model (LLM). The model outputs structured verification results chunk by chunk (including error location, error type, error level, and suggested modifications). The system backend has a result aggregator that identifies duplicate errors across chunks, performs a deduplication algorithm, and generates a unique final verification report.

[0126] Steps S14-S16 (Asynchronous Task Scheduling and Interaction):

[0127] Considering the long inference time of large models, the system adopts an asynchronous task scheduling mechanism.

[0128] Scheduled scanning: The backend daemon thread periodically scans records that are "pending review" and "unverified" and adds them to the task queue.

[0129] Asynchronous execution: The task consumer executes the above S1-S13 processes asynchronously without blocking the front-end operations of the reviewers.

[0130] Front-end support: When the reviewer opens the report, the system reads the stored verification results, highlights and annotates them on the original text, and realizes an efficient workflow of "AI pre-review and manual review".

[0131] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to perform the steps of the method described above.

[0132] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method described above.

[0133] The above are preferred embodiments of the present invention. Any changes made to the technical solution of the present invention that do not exceed the scope of the technical solution of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for intelligent checking of a special equipment inspection report based on a large language model, characterized in that, include: S1. Data acquisition and structured parsing steps: Acquire the special equipment inspection report PDF file to be verified, and perform structured parsing on the PDF file to obtain structured document data including text content, table structure, title level information, image objects and image position indexes; S2, Multimodal Information Fusion Step: For the image objects in the structured document data, call the visual language model to generate corresponding image semantic description data, and encapsulate the image semantic description data into preset image tags according to the image position index and insert them into the corresponding positions in the structured document data to obtain the image-text fusion text stream; S3. Long text context association block segmentation step: Based on the title level information, page number boundary information and preset block length threshold of the image-text fusion text stream, the image-text fusion text stream is segmented to obtain multiple text blocks; The key information from the inspection report, including the report number, equipment code, inspection category, equipment name, and overall conclusion, is extracted to construct a global meta-data packet. This global meta-data packet is then used as a prefix and injected into each text block to obtain a context-related block input sequence. S4. Dynamic prompt word construction steps: Determine the report type corresponding to the inspection report, and call the basic prompt word template corresponding to the report type; extract high-frequency error-prone point constraint information based on the error clustering results corresponding to the report type in the historical error corpus, and extract the logical verification rules corresponding to the report type based on the special equipment regulations and standards knowledge graph; combine the basic prompt word template, high-frequency error-prone point constraint information and logical verification rules to generate a dynamic verification instruction set. S5. Intelligent verification reasoning and result aggregation steps: Input each text block and the dynamic verification instruction set into the large language model to obtain the preliminary verification results of the corresponding text blocks; the preliminary verification results include error level, error field, and verification description. Then, according to the error field identifier, the preliminary verification results are aggregated across blocks and deduplicated to generate the final structured verification report.

2. The method of claim 1, wherein the method further comprises: In step S2, the step of calling a visual language model to generate corresponding image semantic description data for image objects in structured document data includes: Extract image object data and their position indices in the document stream from the structured document data, wherein the extracted image set is expressed as: wherein, is picture data, is a position index of the picture in the document stream; extracted picture data inputting the visual language model for processing to obtain a structured textual description , expressed as: A function representing calling a visual language model for recognition and semantic extraction.

3. The method of claim 2, wherein the method further comprises: In step S2, the image semantic description data is encapsulated into preset image tags and inserted into the corresponding position in the structured document data to obtain an image-text fusion text stream, including: The structured text description Encapsulated as a preset image tag; According to the position index Inserting the preset image mark into the original text stream The position corresponding to the middle picture, obtaining the final text stream of image-text fusion , expressed as: wherein, represents an insertion or splicing operation, represents the insertion of the encapsulated structured text description according to the position index.

4. The intelligent verification method for special equipment inspection reports based on a large language model according to claim 1, characterized in that, In step S4, the basic prompt word template, high-frequency error-prone point constraint information, and logical verification rules are combined to generate a dynamic verification instruction set, including: The basic prompt word template, high-frequency error-prone point constraint information, and logical verification rules are combined to form a candidate prompt word set Q, expressed as: Q = T + E + R Where T is the basic prompt word template, E is the high-frequency error-prone point constraint information, and R is the logical verification rule.

5. The intelligent verification method for special equipment inspection reports based on a large language model according to claim 4, characterized in that, Step S4, generating the dynamic verification instruction set, also includes: The prompt words in the candidate prompt word set Q are classified and filtered based on the error level, which includes high error level, medium error level and low error level; The filtered results are reassembled to generate the final dynamic verification instruction set, Prompt, expressed as: Prompt = H(Q) + M(Q) + L(Q) Where H(Q) represents the high error level result set obtained after filtering the candidate prompt word set Q according to the high error level, M(Q) represents the medium error level result set obtained after filtering the candidate prompt word set Q according to the medium error level, and L(Q) represents the low error level result set obtained after filtering the candidate prompt word set Q according to the low error level.

6. The intelligent verification method for special equipment inspection reports based on a large language model according to claim 1, characterized in that, In step S1, obtaining the PDF file of the special equipment inspection report to be verified includes: Monitor the report status field in the business database using a database listener; When the report status field is detected to change to the preset pending review status, the corresponding PDF file is retrieved from the file storage system based on the report's unique identifier.

7. The intelligent verification method for special equipment inspection reports based on a large language model according to claim 1, characterized in that, In step S5, the intelligent verification reasoning and result aggregation steps are executed as asynchronous background tasks, including: The verification process is initiated by a scheduled task or event trigger. Steps S1 to S5 are executed asynchronously in the background, and the generated final structured verification report is stored in association with the original report.

8. A special equipment inspection report intelligent verification system based on a large language model, executing the method as described in any one of claims 1 to 7, characterized in that, include: The data acquisition and structured parsing module is used to monitor the report status in the business database and, when the status changes to the preset audit status, obtain the corresponding PDF file of the special equipment inspection report to be verified. The PDF file is parsed to extract text content, table structure, heading level information, image objects, and image position indexes to generate structured document data; The multimodal information fusion module, connected to the data acquisition and structured parsing module, is used to receive the structured document data, call the visual language model to generate corresponding image semantic description data for the image object, and encapsulate the image semantic description data into a preset image tag according to the image position index and insert it into the corresponding position in the structured document data to generate an image-text fusion text stream. The long text context association block segmentation module is connected to the multimodal information fusion module. It is used to perform block processing based on the title level information and page number boundary information of the image and text fusion text stream to obtain multiple text blocks. It also constructs a global meta data package based on the global metadata extracted from the inspection report and adds the global meta data package as a prefix to each text block to generate a context association block input sequence. The dynamic prompt word construction module is used to determine the report type corresponding to the inspection report, call the corresponding basic prompt word template, extract high-frequency error-prone point constraint information based on the historical error corpus, extract logical verification rules based on the special equipment regulations and standards knowledge graph, combine the basic prompt word template, high-frequency error-prone point constraint information and logical verification rules, and classify and filter them according to error level to generate a dynamic verification instruction set; The intelligent verification reasoning and result aggregation module is connected to the long text context association block module and the dynamic prompt word construction module, respectively. It is used to input the input sequences of each block and the dynamic verification instruction set into the large language model for reasoning, to obtain the preliminary verification results of each text block, and to perform cross-block aggregation and deduplication on all preliminary verification results to generate the final structured verification report.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 7.