An intelligent auditing method and system based on semantic-level atomization detection
Patent Information
- Application Number
- CN202610915826.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]本发明所要解决的技术问题是现有运营商业务智能审核技术存在多源文档处理低效、审核逻辑硬编码扩展性差、API/知识库/大模型能力割裂的问题,导致整体审核效率和准确率难以满足业务需求
[0019]采用上述进一步方案的有益效果是:将条件类型和条件值作为配置参数存储在数据库中,支持多种常用的条件类型,能够满足绝大多数审核场景的需求,当需要新增条件类型时,只需在数据库中添加相应的配置,无需修改代码,显著提高了系统的灵活性和可扩展性,能够快速响应运营商业务不断变化的审核需求。
Smart Images

Figure CN123014912A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent moderation and natural language processing technology, specifically to an intelligent moderation method and system based on semantic-level atomic detection. Background Technology
[0002] With the deepening of operators' digital transformation, the workload of reviewing various business documents such as contracts, financial statements, project approval documents, and user qualification materials is increasing exponentially. Existing intelligent review methods fail to organically integrate document preprocessing, configurable task orchestration, and atomic execution of heterogeneous capabilities, resulting in a fragmented review process, poor scalability, and low accuracy, making it difficult to meet the actual needs of operators' businesses. Specifically, the existing document preprocessing stage lacks specificity, applying a uniform processing flow to PDF documents from all sources, which wastes computing resources and cannot guarantee processing quality; the review logic is mostly hard-coded and deeply coupled with the code, requiring a complete development and release process for each new review scenario or adjustment of inspection rules, resulting in slow response speed and inability to adapt to the rapid iteration characteristics of operators' businesses; different review technologies operate independently, lacking coordination between external API calls, knowledge base retrieval, and large language model inference, and failing to flexibly combine advantageous capabilities according to task requirements, resulting in unsatisfactory overall review efficiency and accuracy, seriously hindering the digitalization process of operators' businesses. Summary of the Invention
[0003] The technical problem to be solved by this invention is that existing intelligent auditing technologies for operator services suffer from inefficient multi-source document processing, poor scalability of hard-coded auditing logic, and fragmented capabilities of API / knowledge base / large model, resulting in overall auditing efficiency and accuracy failing to meet business needs.
[0004] The technical solution of this invention to solve the above-mentioned technical problems is as follows: An intelligent review method based on semantic-level atomic detection, comprising the following steps: S1, preprocessing the document to be reviewed, converting the document to be reviewed into a vector representation and storing it in a vector database, and establishing a vector index to obtain vectorized structured data; S2, reading the pre-configured scenarios, rules and atomic check item associations from the configuration database, and generating an execution plan containing the calling order and dependencies of each atomic check item; S3, according to the execution plan, and based on the vectorized structured data, sequentially calling each atomic check item executor, each atomic check item executor completing a single check by integrating at least one of the following capabilities: external application programming interface calls, vector knowledge base retrieval and large language model reasoning, and summarizing all check results to generate a review report.
[0005] The beneficial effects of this invention are as follows: It divides the intelligent review process into three core stages: document preprocessing, execution plan generation, and atomic check execution, achieving end-to-end automated processing from document input to review report output, significantly improving review efficiency. By decomposing review tasks into indivisible atomic check items and supporting flexible combinations of various heterogeneous capabilities, it can select the optimal technical solution according to the characteristics of different review tasks, greatly improving review accuracy. Through configurable management of review logic, it achieves zero-code development for new review scenarios, significantly improving the system's response speed to business iterations. By storing document information through a unified vector database, it provides a high-quality data foundation for semantic-level review, solving the problem that traditional keyword matching technology cannot understand semantics.
[0006] Further, S1 specifically includes: S11, performing source type adaptive detection on the input PDF document to determine that the PDF document belongs to one of a preset variety of document source types; S12, adaptively selecting a processing strategy based on the detection result to convert the PDF document into a preset lightweight markup format, while retaining the table structure and heading hierarchy information in the original document during the conversion process; S13, performing semantic segmentation on the lightweight markup format content, using a text embedding model to convert each segment into a vector representation, storing the vector representation in the vector database, and establishing the vector index.
[0007] The beneficial effects of adopting the above-mentioned further solution are as follows: Through source type adaptive detection technology, the source type of PDF documents can be automatically identified and the optimal processing strategy can be selected. While ensuring processing accuracy, the average document preprocessing time is significantly shortened and the consumption of computing resources is reduced. At the same time, the lightweight markup format is used to preserve the structural information of the document, providing a richer context for subsequent semantic understanding and significantly improving the accuracy of semantic retrieval.
[0008] Further, S11 specifically includes: S101, extracting the metadata of the PDF document, calculating a first score by matching preset keywords; analyzing the aspect ratio of each page of the PDF document, calculating a second score; calculating the text density in the PDF document, and calculating a third score; S102, assigning a first weight, a second weight, and a third weight to the first score, the second score, and the third score respectively, performing a weighted summation, and obtaining a comprehensive score; S103, setting a first threshold and a second threshold, comparing the comprehensive score with the first threshold and the second threshold, and determining whether the PDF document belongs to a first type, a second type, or a third type; S104, adaptively selecting a subsequent processing strategy based on the determination result: for the first type of document, directly extracting text according to a preset processing flow; for the second type of document, directly extracting text and skipping the optical character recognition step; for the third type of document, enabling a high-precision optical character recognition module for text extraction.
[0009] The beneficial effects of adopting the above-mentioned further scheme are as follows: by using a three-dimensional feature weighted detection algorithm, which comprehensively considers the features of metadata, page aspect ratio and text density, the accuracy of PDF source type detection is greatly improved. By assigning different weights to different features, the contribution of each feature to the source type determination can be more accurately reflected. At the same time, the dual threshold determination mechanism effectively avoids the misjudgment problem caused by a single threshold, ensuring that different types of documents can be processed correctly.
[0010] Further, S2 specifically includes: S21, reading scenario configuration information from the configuration database, parsing the completely decoupled table structure of the scenario layer, rule layer, and atomic check item layer, wherein the scenario layer is used to store business domain boundaries and applicable scope, the rule layer is used to group check items according to business logic and define the execution order, and the atomic check item layer is used to store the smallest execution unit and its corresponding execution parameters; S22, according to the applicable scope of the scenario corresponding to the current audit, filtering out all rules that need to be executed under the scenario from the configuration database, and further parsing the list of atomic check items attached to each rule; S23, for each atomic check item, reading the check item type, capability combination mode, condition type, and condition value configured for the atomic check item; generating an execution plan according to the condition type and the condition value, and clarifying the calling order and possible dependencies between the atomic check items.
[0011] The beneficial effects of adopting the above-mentioned further solution are as follows: By adopting a three-layer, fully decoupled configuration architecture consisting of a scenario layer, a rule layer, and an atomic check item layer, the audit logic is clearly layered and independently managed, which greatly improves the efficiency of configuration management. The scenario layer defines the business boundaries, the rule layer is responsible for grouping business logic, and the atomic check item layer defines the specific execution units. Each layer is associated with a unique identifier and does not affect each other. This architecture not only facilitates configuration management and maintenance, but also enables zero-code development of new audit scenarios, which significantly improves the system's response speed to business iterations.
[0012] Furthermore, S3 specifically includes: S31. According to the execution plan, and based on the vectorized structured data, each atomic check item executor is called sequentially. Each atomic check item executor inherits from a unified executor base class. The executor base class uniformly declares the external application programming interface call interface, vector knowledge base retrieval interface, large language model inference interface, and multimodal large language model interface through dependency injection; S32. Each atomic check item executor follows the following standardized execution process: parsing the input data, calling the corresponding interface to determine the result according to the capability combination mode, and encapsulating the result into a standard output format; S33. The atomic check item executor supports multiple capability combination modes, including but not limited to single capability type, two capability hybrid type, and three capability fusion type; S34. After all atomic check items are executed, the execution results of each atomic check item are summarized to generate a complete audit report. The audit report includes the pass status of each check item, the extracted key information points, detailed risk descriptions, and the source of evidence used as the basis for the audit.
[0013] The beneficial effects of adopting the above-mentioned further solution are as follows: By declaring all available technical capability interfaces through dependency injection, the decoupling and flexible combination of capabilities are achieved, significantly improving code reusability and reducing maintenance costs. Each atomic check item executor inherits from this base class and follows a unified standardized execution process, which significantly improves the maintainability and scalability of the system. At the same time, it supports multiple capability combination modes and can select the optimal combination of technical capabilities according to different audit task requirements, maximizing execution efficiency while ensuring audit accuracy. In addition, the audit report generated by the system contains detailed inspection results, key information points, risk descriptions, and evidence sources, providing auditors with comprehensive and accurate decision-making basis and reducing the workload of manual review.
[0014] Furthermore, during the execution of the atomic check item executor in S32, if it needs to retrieve information from the vector database, it performs the following steps: S301, according to the query conditions configured in the atomic check item, it performs a similarity retrieval in the vector database and returns a text fragment related to the query conditions and an image reference identifier embedded in the text fragment; S302, if the text fragment contains an image reference identifier, it automatically parses the image reference identifier, extracts the corresponding image identifier and obtains the image data, and then inputs the text fragment and the image into a multimodal large language model for analysis, and outputs an analysis result that integrates semantic and visual information.
[0015] The beneficial effects of adopting the above-mentioned further solution are: it realizes the automatic linkage between semantic retrieval and multimodal large language model, can automatically identify the image reference markers embedded in text fragments, and input the text and the corresponding image into the multimodal large language model for analysis. This approach can make full use of the complementary information of text and images, significantly improve the ability to understand documents containing non-text content and the accuracy of review, and greatly reduce the workload of manual review.
[0016] Furthermore, S301 and S302 are linked through a linkage mechanism, which specifically includes: S311, after obtaining the text fragment, automatically parsing the image reference identifiers existing in a preset format in the text fragment and extracting a list of unique identifiers for the images; S312, using the retrieved text content and corresponding image data as joint input to call the multimodal large language model interface; S313, employing a reliability guarantee mechanism during the multimodal large language model call process, which includes: receiving results using a streaming output method; setting a heartbeat detection mechanism, considering it a timeout if no new token is received for a consecutive preset time threshold; automatically retrying in case of timeout or interface abnormality, with a maximum of a preset number of retries; and if all retries fail, downgrading to using only plain text for inference.
[0017] The beneficial effects of adopting the above-mentioned further solutions are as follows: A comprehensive reliability assurance mechanism for multimodal large language model calls is designed, including streaming output, heartbeat detection, automatic retry, and degradation strategies. This can effectively cope with various abnormal situations, significantly improve the success rate of multimodal calls, and ensure the smooth completion of review tasks. When a multimodal large language model call fails, the system can automatically degrade to plain text mode to ensure that the review process is not interrupted, significantly improving system availability. At the same time, the streaming output method allows users to see the generation process of the review results in real time, significantly improving the user experience.
[0018] Furthermore, the condition types include, but are not limited to, numerical comparison, string matching, regular expressions, and existence checks; the condition values are used to provide specific comparison thresholds or matching templates for the condition types.
[0019] The advantages of adopting the above-mentioned further solution are: storing the condition type and condition value as configuration parameters in the database supports a variety of commonly used condition types, which can meet the needs of most review scenarios. When a new condition type needs to be added, only the corresponding configuration needs to be added to the database without modifying the code, which significantly improves the flexibility and scalability of the system and can quickly respond to the ever-changing review needs of operators' businesses.
[0020] Furthermore, this application also provides an intelligent review system based on semantic-level atomic detection, comprising: a document preprocessing module, used to preprocess the document to be reviewed, convert the document to be reviewed into a vector representation and store it in a vector database, and establish a vector index to obtain vectorized structured data; a configuration and plan generation module, used to read pre-configured scenarios, rules and atomic check item associations from the configuration database, and generate an execution plan containing the calling order and dependencies of each atomic check item; and an execution and summary module, connected to the document preprocessing module and the configuration and plan generation module respectively, used to sequentially call each atomic check item executor according to the execution plan and based on the vectorized structured data, wherein each atomic check item executor completes a single check by integrating at least one of the following capabilities: external application programming interface calls, vector knowledge base retrieval and large language model reasoning, and summarizes all check results to generate a review report.
[0021] Furthermore, the document preprocessing module includes: a source type detection unit, used to perform adaptive source type detection on the input PDF document and determine that the PDF document belongs to one of a preset variety of document source types; a format conversion unit, connected to the output of the source type detection unit, used to adaptively select a processing strategy based on the detection result, convert the PDF document into a preset lightweight markup format, and retain the table structure and heading level information in the original document during the conversion process; and a vectorized storage unit, connected to the output of the format conversion unit, used to perform semantic segmentation on the lightweight markup format content, use a text embedding model to convert each segment into a vector representation, store the vector representation in the vector database, and establish the vector index.
[0022] Furthermore, the source type detection unit includes: a feature extraction subunit, used to extract metadata of the PDF document, calculate a first score by matching preset keywords; analyze the aspect ratio of each page of the PDF document to calculate a second score; and calculate a third score by statistically analyzing the text density in the PDF document; a weighted calculation subunit, connected to the output of the feature extraction subunit, used to assign a first weight, a second weight, and a third weight to the first score, the second score, and the third score respectively, perform weighted summation, and obtain a comprehensive score; a threshold determination subunit, connected to the output of the weighted calculation subunit, used to set a first threshold and a second threshold, compare the comprehensive score with the first threshold and the second threshold, and determine whether the PDF document belongs to a first type, a second type, or a third type; and a strategy selection subunit, connected to the output of the threshold determination subunit, used to adaptively select a subsequent processing strategy based on the determination result: for the first type of document, directly extract text according to a preset processing flow; for the second type of document, directly extract text and skip the optical character recognition step; and for the third type of document, enable a high-precision optical character recognition module for text extraction.
[0023] Furthermore, the configuration and plan generation module includes: a configuration reading unit, used to read scenario configuration information from the configuration database, and parse the completely decoupled table structure of the scenario layer, rule layer, and atomic check item layer, wherein the scenario layer is used to store business domain boundaries and applicable scope, the rule layer is used to group check items according to business logic and define the execution order, and the atomic check item layer is used to store the smallest execution unit and its corresponding execution parameters; a rule filtering unit, connected to the output of the configuration reading unit, used to filter all rules that need to be executed under the scenario from the configuration database according to the applicable scope of the current audit, and further parse the list of atomic check items attached to each rule; and a plan generation unit, connected to the output of the rule filtering unit, used to read the check item type, capability combination mode, condition type, and condition value configured for each atomic check item; generate an execution plan according to the condition type and the condition value, and clarify the calling order and possible dependencies between the atomic check items.
[0024] Furthermore, the execution and aggregation module includes: an atomic executor invocation unit, used to sequentially invoke each atomic check item executor according to the execution plan and based on the vectorized structured data. Each atomic check item executor inherits from a unified executor base class, which uniformly declares external application programming interface invocation interface, vector knowledge base retrieval interface, large language model inference interface, and multimodal large language model interface through dependency injection; and a standardized process control unit, connected to the atomic executor invocation unit, used to ensure that each atomic check item executor follows the following standardized execution process: parsing input data, invoking according to the capability combination mode. The corresponding interface is used to determine the result, and the result is encapsulated into a standard output format; the capability mode configuration unit is connected to the standardized process control unit and is used to configure the atomic check item executor to support multiple capability combination modes, including but not limited to single capability type, two capability hybrid type, and three capability fusion type; the result summary unit is connected to the atomic executor calling unit and is used to summarize the execution results of each atomic check item after all atomic check items have been executed, and generate a complete audit report; the audit report includes the pass status of each check item, the extracted key information points, a detailed risk description, and the source of evidence used as the basis for the audit.
[0025] Furthermore, the atomic executor calling unit is also equipped with a semantic retrieval and multimodal linkage subunit. The semantic retrieval and multimodal linkage subunit is used to perform the following operations when the atomic check item executor needs to retrieve information from the vector database: according to the query conditions configured in the atomic check item, perform similarity retrieval in the vector database, and return text fragments related to the query conditions and image reference identifiers embedded in the text fragments; if the text fragments contain image reference identifiers, automatically parse the image reference identifiers, extract the corresponding image identifiers and obtain image data, and then jointly input the text fragments and the images into the multimodal large language model for analysis, and output the analysis results that integrate semantic and visual information.
[0026] Furthermore, the semantic retrieval and multimodal linkage subunit also includes: an image parsing component, used to automatically parse image reference identifiers in a preset format within the obtained text fragments and extract a list of unique image identifiers; a joint invocation component, connected to the image parsing component, used to use the retrieved text content and corresponding image data as joint inputs to invoke the multimodal large language model interface; and a reliability assurance component, connected to the joint invocation component, used to employ a reliability assurance mechanism during the multimodal large language model invocation process. This reliability assurance mechanism includes: receiving results using a streaming output method; setting a heartbeat detection mechanism, where failure to receive a new token for a consecutive preset time threshold is considered a timeout; automatically retrying in case of timeout or interface abnormality, with a maximum of a preset number of retries; and if all retries fail, downgrading to using only plain text for inference.
[0027] Furthermore, this application also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the intelligent auditing method based on semantic-level atomic detection.
[0028] Furthermore, this application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to enable a computer to implement the intelligent auditing method based on semantic-level atomic detection. Attached Figure Description
[0029] Figure 1 This is a flowchart illustrating an intelligent auditing method based on semantic-level atomic detection according to the present invention. Figure 2 This is a schematic diagram of the structure of an intelligent auditing system based on semantic-level atomic detection according to the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device according to the present invention. Detailed Implementation
[0030] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0031] Example 1: Reference Figure 1This embodiment provides an intelligent auditing method based on semantic-level atomic detection, including the following steps: S1, preprocessing the document to be audited by converting it into a vector representation and storing it in a vector database, and establishing a vector index to obtain vectorized structured data; S2, reading the pre-configured scenarios, rules, and atomic check item relationships from the configuration database to generate an execution plan containing the calling order and dependencies of each atomic check item; S3, according to the execution plan, and based on the vectorized structured data, sequentially calling each atomic check item executor, each atomic check item executor completing a single check by integrating at least one of the following capabilities: external application programming interface calls, vector knowledge base retrieval, and large language model reasoning, and summarizing all check results to generate an audit report.
[0032] In another possible embodiment, the document to be reviewed is first preprocessed, converting the unstructured business document into a computer-understandable vector representation and storing it in a vector database specifically designed for storing and retrieving high-dimensional vector data and supporting cosine similarity retrieval. In this embodiment, the Milvus vector database is used, and a vector index is established to accelerate the vector retrieval process and ensure millisecond-level response speed even with massive amounts of data. This results in vectorized structured data. Next, pre-configured scenarios, rules, and atomic check item relationships are read from a configuration database (using a MySQL relational database) that stores all review-related configuration information. The configuration database stores all review configuration information, including scenario definitions, rule groupings, and atomic check item parameters. The system generates an execution plan based on these relationships, containing the call order and dependencies of each atomic check item. The execution plan is a concrete execution blueprint for the review task, clearly defining the execution order, dependencies, and required resources for each atomic check item, ensuring that the review process is successful. The process proceeds in an orderly and efficient manner. Finally, according to the generated execution plan, and based on the preprocessed vectorized structured data, the executors of each atomic check item are called sequentially. Each atomic check item is the smallest indivisible audit execution unit, responsible for completing a specific audit task, such as a consistency check of amount or a legality check of contract subject. Each atomic check item executor completes a single check by integrating at least one of the following capabilities: external application programming interface (API) calls, vector knowledge base retrieval, and large language model reasoning. The API is used to call the capabilities of external systems, such as enterprise business information query interfaces and exchange rate query interfaces. The vector knowledge base is used to store knowledge such as industry standards, laws and regulations, and historical audit cases. The large language model is used to understand natural language semantics, perform logical reasoning, and generate audit results described in natural language. After all atomic check items have been executed, the system will summarize all check results and generate a complete audit report containing the pass status, key information points, detailed descriptions, and audit basis for each check item.
[0033] By dividing the intelligent review process into three core stages—document preprocessing, execution plan generation, and atomic check execution—end-to-end automated processing from document input to review report output is achieved, significantly improving review efficiency. By breaking down review tasks into indivisible atomic check items and supporting flexible combinations of various heterogeneous capabilities, the optimal technical solution can be selected according to the characteristics of different review tasks, greatly improving review accuracy. By managing review logic in a configurable manner, zero-code development for new review scenarios is achieved, significantly improving the system's response speed to business iterations. By storing document information through a unified vector database, a high-quality data foundation is provided for semantic-level review, solving the problem that traditional keyword matching technology cannot understand semantics.
[0034] Preferably, in this embodiment, S1 specifically includes: S11, performing source type adaptive detection on the input PDF document to determine that the PDF document belongs to one of a preset variety of document source types; S12, adaptively selecting a processing strategy based on the detection result to convert the PDF document into a preset lightweight markup format, while retaining the table structure and heading hierarchy information in the original document during the conversion process; S13, performing semantic segmentation on the lightweight markup format content, using a text embedding model to convert each segment into a vector representation, storing the vector representation in the vector database, and establishing the vector index.
[0035] In another possible embodiment, the input PDF document is first subjected to adaptive source type detection to determine if it belongs to one of a set of preset document source types. These preset source types include, but are not limited to, Word documents, PPT documents, scanned documents, and native PDFs. PDF documents from different sources exhibit significant differences in metadata, page layout, and text density. The system analyzes these features to accurately determine the document source type. Then, based on the detection results, an adaptive processing strategy is selected to convert the PDF document into a preset lightweight markup format. In this embodiment, Markdown format is preferred because it has simple syntax, high readability, and is easy to parse. It can effectively preserve the document's heading hierarchy, tables, lists, and other structural information. During the conversion process, the system completely preserves the table structure and heading hierarchy information of the original document. This structural information is crucial for accurate understanding. Document semantics are crucial. For example, heading hierarchy reflects the document's logical structure, and table structure clearly shows the relationships between data. Finally, the converted lightweight markup format content is semantically segmented. Semantic segmentation refers to dividing a long document into multiple shorter text fragments according to semantic integrity. Each fragment contains a complete semantic unit. The fragment length is usually set to around 512 characters to balance semantic integrity and vectorization effect. Then, a text embedding model is used to convert each fragment into a vector representation. A text embedding model is a neural network model that converts natural language text into high-dimensional vectors. It can map semantically similar text to similar positions in the vector space. In this invention, the BERT-based Chinese pre-trained model is used as the text embedding model, outputting a 768-dimensional vector representation. The generated vector representation is stored in a vector database, and a vector index is established for subsequent fast similarity retrieval.
[0036] By using source type adaptive detection technology, the source type of PDF documents can be automatically identified and the optimal processing strategy can be selected. While ensuring processing accuracy, the average document preprocessing time is significantly shortened and the consumption of computing resources is reduced. At the same time, a lightweight markup format is used to preserve the structural information of the document, providing richer context for subsequent semantic understanding and significantly improving the accuracy of semantic retrieval.
[0037] Preferably, in this embodiment, S11 specifically includes: S101, extracting the metadata of the PDF document, calculating a first score by matching preset keywords; analyzing the aspect ratio of each page of the PDF document, calculating a second score; calculating the text density in the PDF document, and calculating a third score; S102, assigning a first weight, a second weight, and a third weight to the first score, the second score, and the third score respectively, performing a weighted summation, and obtaining a comprehensive score; S103, setting a first threshold and a second threshold, comparing the comprehensive score with the first threshold and the second threshold, and determining whether the PDF document belongs to a first type, a second type, or a third type; S104, adaptively selecting a subsequent processing strategy based on the determination result: for the first type of document, directly extracting text according to a preset processing flow; for the second type of document, directly extracting text and skipping the optical character recognition step; for the third type of document, enabling a high-precision optical character recognition module for text extraction.
[0038] In another possible embodiment, the metadata of the PDF document is first extracted. Metadata consists of the PDF document's attribute information, including fields such as Creator, Producer, and CreationDate. A first score is calculated by matching preset keywords in these fields, such as "Microsoft Word," "PowerPoint," and "Scanner." The score ranges from 0 to 1; the more accurate the matched keywords, the higher the score. Next, the aspect ratio of each page in the PDF document is analyzed, and the average aspect ratio of all pages is calculated as a second score. (Word to...) The aspect ratio of converted PDF documents is typically around 1.414, the standard A4 paper ratio. PPT conversions usually have an aspect ratio of 4:3 (approximately 1.333) or 16:9 (approximately 1.778). Scanned documents have more varied aspect ratios. A second score is calculated based on how closely the actual aspect ratio resembles the standard ratio; the closer the resemblance, the higher the score. Then, the text density (number of characters per unit area) in the PDF document is calculated, and the average text density across all pages is used as the third score. Scanned PDFs typically have lower text density, while Word and PPT conversions usually have higher text density. The third score is calculated based on the text density. The higher the score, the higher the overall score. The calculated first, second, and third scores are assigned first, second, and third weights, respectively, and then weighted and summed to obtain a comprehensive score. In this embodiment, the preferred first weight is 0.5, the second weight is 0.3, and the third weight is 0.2. A first threshold and a second threshold are then set. In this embodiment, the preferred first threshold is 0.65, and the preferred second threshold is 0.35, with a threshold interval of ±0.15. The comprehensive score is compared with the first and second thresholds. When the comprehensive score is greater than 0.65, it is determined to be of the first type, i.e., a Word conversion file; when the comprehensive score is less than 0.35, it is determined to be of the second type, i.e., a P file. When the overall score of the PT converted document is between 0.35 and 0.65, it is classified as a third type, namely scanned document / unknown type. Finally, the subsequent processing strategy is adaptively selected based on the judgment result. For first type documents, the text is directly extracted according to the preset processing flow. For second type documents, the text is directly extracted and the optical character recognition step is skipped. Optical character recognition is a technology that converts text in an image into an editable text format. For third type documents, the high-precision optical character recognition module is used for text extraction. The high-precision OCR module uses a deep learning-based CRNN algorithm, which can effectively recognize text, tables and handwritten signatures in scanned documents.
[0039] By employing a three-dimensional feature-weighted detection algorithm, which comprehensively considers the features of metadata, page aspect ratio, and text density, the accuracy of PDF source type detection is significantly improved. By assigning different weights to different features, the algorithm can more accurately reflect the contribution of each feature to the source type determination. At the same time, the dual-threshold determination mechanism effectively avoids the misjudgment problem caused by a single threshold, ensuring that different types of documents can be processed correctly.
[0040] Preferably, in this embodiment, S2 specifically includes: S21, reading scenario configuration information from the configuration database, parsing the completely decoupled table structure of the scenario layer, rule layer, and atomic check item layer, wherein the scenario layer is used to store business domain boundaries and applicable scope, the rule layer is used to group check items according to business logic and define the execution order, and the atomic check item layer is used to store the smallest execution unit and the corresponding execution parameters; S22, according to the applicable scope of the scenario corresponding to the current audit, filtering out all rules that need to be executed under the scenario from the configuration database, and further parsing the list of atomic check items attached to each rule; S23, for each atomic check item, reading the check item type, capability combination mode, condition type, and condition value configured for the atomic check item; generating an execution plan according to the condition type and the condition value, and clarifying the calling order and possible dependencies between each atomic check item.
[0041] In another possible embodiment, scenario configuration information is first read from the configuration database. The completely decoupled table structure of the scenario layer, rule layer, and atomic check item layer is parsed. The scenario layer table structure mainly includes fields such as scenario ID, scenario name, business code, province code, effective time, and expiration time, used to define the applicable business domain and geographical scope of the audit scenario. The rule layer table structure mainly includes fields such as rule ID, rule name, scenario ID, execution order, and rule description, used to group related atomic check items according to business logic and define the execution order within each group. The atomic check item layer table structure mainly includes fields such as atomic item ID, atomic item name, rule ID, check item type, capability combination mode, condition type, condition value, and execution parameters, used to define the specific execution logic of each atomic check item. Then, based on the applicable scope of the scenario corresponding to the current audit, all rules that need to be executed under this scenario are filtered from the configuration database. The system will match the corresponding scenario based on the business code and province code of the current audit task, and then, according to scenario I... D queries all effective rules in this scenario, then further parses the list of atomic checks attached to each rule. Based on the ID of each rule, it queries all atomic checks attached to that rule, forming a complete list of atomic checks. Finally, for each atomic check, it reads the check type, capability combination mode, condition type, and condition value configured for that atomic check. Check types include, but are not limited to, amount checks, date checks, subject checks, and clause checks. Capability combination modes specify the combination of technical capabilities required for that atomic check. Condition types include, but are not limited to, numerical comparison, string matching, regular expressions, and existence checks. Condition values provide specific comparison thresholds or matching templates for the condition types. An execution plan is generated based on the condition types and condition values, clarifying the calling order and possible dependencies between the atomic checks. The execution plan generator automatically adjusts the execution order based on the dependencies between atomic checks, such as the output of one atomic check being the input of another, to ensure the correctness of the review process.
[0042] By adopting a three-layer, fully decoupled configuration architecture consisting of a scenario layer, a rule layer, and an atomic check item layer, the audit logic is clearly layered and managed independently, significantly improving configuration management efficiency. The scenario layer defines business boundaries, the rule layer is responsible for grouping business logic, and the atomic check item layer defines specific execution units. Each layer is associated with a unique identifier and does not affect the others. This architecture not only facilitates configuration management and maintenance but also enables zero-code development of new audit scenarios, significantly improving the system's response speed to business iterations.
[0043] Preferably, in this embodiment, S3 specifically includes: S31. According to the execution plan, and based on the vectorized structured data, each atomic check item executor is called sequentially. Each atomic check item executor inherits from a unified executor base class. The executor base class uniformly declares the external application programming interface call interface, vector knowledge base retrieval interface, large language model inference interface, and multimodal large language model interface through dependency injection; S32. Each atomic check item executor follows the following standardized execution process: parsing the input data, calling the corresponding interface to determine the result according to the capability combination mode, and encapsulating the result into a standard output format; S33. The atomic check item executor supports multiple capability combination modes, including but not limited to single capability type, two capability hybrid type, and three capability fusion type; S34. After all atomic check items are executed, the execution results of each atomic check item are summarized to generate a complete audit report. The audit report includes the pass status of each check item, the extracted key information points, detailed risk descriptions, and the source of evidence used as the basis for audit.
[0044] In another possible implementation, the generated execution plan is followed first, and each atomic check item executor is called sequentially based on vectorized structured data. Each atomic check item executor inherits from a unified executor base class. This base class declares external application programming interface (API) calls, vector knowledge base retrieval interfaces, large language model inference interfaces, and multimodal large language model interfaces through dependency injection. Dependency injection is a software design pattern used to decouple objects. Through dependency injection, the executor base class does not need to create instances of these interfaces itself; instead, an external container injects instances into the executor. This decouples the executor from specific interfaces, facilitating unit testing and feature expansion. Each atomic check item executor follows a unified standardized execution process: first, it parses the input data, extracts information related to the current check item from the vectorized structured data, and then calls the corresponding interface to determine the result according to the capability combination pattern. Capability combination patterns include pure API, pure LLM, pure knowledge retrieval, API+LLM hybrid, knowledge retrieval+LLM hybrid, and API+knowledge retrieval... There are eight types of audit reports: API-based, ternary fusion-based, and custom-based. The pure API type only calls external application programming interfaces (APIs); the pure LLM type only calls the large language model; the pure knowledge retrieval type only retrieves information from the vector knowledge base; the API+LLM type calls both external APIs and the large language model; the knowledge retrieval+LLM type performs both vector knowledge base retrieval and large language model inference; the API+knowledge retrieval type calls both external APIs and performs vector knowledge base retrieval; the ternary fusion type uses API calls, knowledge retrieval, and LLM inference simultaneously; and the custom-based type allows users to customize the combination logic of capabilities according to specific needs. Finally, the results are encapsulated in a standard JSON format for subsequent aggregation and processing. After all atomic checks are executed, the execution results of each atomic check are summarized to generate a complete audit report. The audit report includes the pass status of each check, the extracted key information points, a detailed risk description, and the source of evidence used as the basis for the audit. The audit report generator iterates through the execution results of all atomic checks, groups them according to rules, and presents them in a structured manner for easy viewing and understanding by auditors.
[0045] By declaring all available technical capability interfaces through dependency injection, the system achieves decoupling and flexible combination of capabilities, significantly improving code reusability and reducing maintenance costs. Each atomic check item executor inherits from this base class and follows a unified standardized execution process, significantly improving the system's maintainability and scalability. It also supports multiple capability combination modes, enabling the selection of the optimal combination of technical capabilities based on different audit task requirements, maximizing execution efficiency while ensuring audit accuracy. Furthermore, the system-generated audit reports contain detailed inspection results, key information points, risk descriptions, and evidence sources, providing auditors with comprehensive and accurate decision-making support and reducing the workload of manual review.
[0046] Preferably, in this embodiment, if the atomic check item executor in S32 needs to retrieve information from the vector database during execution, it performs the following steps: S301, according to the query conditions configured in the atomic check item, it performs a similarity retrieval in the vector database and returns a text fragment related to the query conditions and an image reference identifier embedded in the text fragment; S302, if the text fragment contains an image reference identifier, it automatically parses the image reference identifier, extracts the corresponding image identifier and obtains the image data, and then inputs the text fragment and the image into a multimodal large language model for analysis, and outputs an analysis result that integrates semantic and visual information.
[0047] In another possible embodiment, when the atomic check item executor needs to retrieve information from the vector database during execution, it first performs a similarity retrieval in the vector database according to the query conditions configured in the atomic check item. The vector database calculates the cosine similarity between the query vector and the stored vector, and returns the Top-K text fragments most relevant to the query conditions, along with the image reference identifiers embedded in these text fragments. During the document preprocessing stage, the system stores the image reference identifiers, such as Markdown format image references, together with the corresponding text fragments in the vector database. Therefore, when a relevant text fragment is retrieved, the image reference identifiers embedded in that fragment are also obtained. If the returned text fragment contains image references... Using identifiers, the system automatically parses these image reference identifiers, extracts the corresponding unique image identifiers, and retrieves the corresponding image data from the file server or object storage based on the unique image identifiers. The file server stores all uploaded document and image files and supports fast access via unique identifiers. Then, the text fragments and corresponding image data are jointly input into a multimodal large language model for analysis. The multimodal large language model can process text and image inputs simultaneously, understand the visual information in the image, such as table structure, graphic content, and text position, and fuse it with the text information to generate more accurate and comprehensive analysis results. The output is an analysis result that integrates semantic and visual information, which will serve as an important basis for the determination result of the atomic check item executor.
[0048] By automatically linking semantic retrieval with a multimodal large language model, embedded image references in text fragments can be automatically identified. The text and corresponding images are then jointly input into the multimodal large language model for analysis. This approach can fully utilize the complementary information of text and images, significantly improving the ability to understand documents containing non-textual content and the accuracy of review, while greatly reducing the workload of manual review.
[0049] Preferably, in this embodiment, S301 and S302 are connected by a linkage mechanism, which specifically includes: S311, after obtaining a text fragment, automatically parsing the image reference identifiers existing in a preset format in the text fragment and extracting a list of unique identifiers for the images; S312, using the retrieved text content and corresponding image data as joint input, and calling the multimodal large language model interface; S313, adopting a reliability guarantee mechanism during the multimodal large language model call process, which includes: receiving results in a streaming output mode; setting a heartbeat detection, and considering it a timeout if no new token is received for a consecutive preset time threshold; automatically retrying when there is a timeout or interface abnormality, with a maximum of a preset number of retries; if all retries fail, downgrading to using only plain text for inference.
[0050] In another possible embodiment, after obtaining the text fragment, the system automatically parses the image reference identifiers in the text fragment that exist in a preset format, typically Markdown image format, where the image-id is a unique identifier for the image. The system uses regular expressions to match all image reference identifiers in the text fragment and extracts the corresponding image-ids to form a list of unique image identifiers. Then, the retrieved text content and corresponding image data are used as joint input to call the multimodal large language model interface. The system retrieves the corresponding image data in batches from the file server based on the list of unique image identifiers, encapsulates the text content and image data according to the format required by the multimodal large language model, and then calls the model interface for analysis. The large language model employs a robust reliability guarantee mechanism during invocation. First, it receives results via streaming output, returning them to the client in batches. Users can view the generation process of the review results in real time without waiting for the entire inference process to complete. Then, a heartbeat detection system is implemented, periodically sending heartbeat packets to the model interface. If no new token is received for a preset time threshold (ideally 15 seconds), it is considered a timeout. Automatic retrying occurs upon timeout or interface anomaly, with a maximum preset number of retries, preferably two, with a 5-second interval between each retry. If all retries fail, the system downgrades to using only plain text for inference, ignoring image information and inputting only text content into the plain text large language model for analysis, ensuring the review process can continue.
[0051] By designing a robust reliability assurance mechanism for multimodal large language model calls, including streaming output, heartbeat detection, automatic retry, and degradation strategies, the system can effectively handle various abnormal situations, significantly improve the success rate of multimodal calls, and ensure the smooth completion of review tasks. When a multimodal large language model call fails, the system can automatically degrade to plain text mode to ensure that the review process is not interrupted, significantly improving system availability. At the same time, the streaming output method allows users to see the generation process of review results in real time, significantly improving the user experience.
[0052] Preferably, in this embodiment, the condition types include, but are not limited to, numerical comparison, string matching, regular expressions, and existence checks; the condition value is used to provide a specific comparison threshold or matching template for the condition type.
[0053] In another possible embodiment, the atomic check item executor supports multiple condition types, which are stored as configuration parameters in the atomic check item layer table of the configuration database. These include, but are not limited to, numerical comparison, string matching, regular expressions, and existence checks. Numerical comparison is used to compare the size relationship between two values, such as whether the contract amount is greater than a certain threshold or whether the payment ratio does not exceed a certain percentage. It supports comparison operators such as equal to, greater than, less than, greater than or equal to, less than or equal to, and not equal to. String matching is used to determine whether one string contains another string, such as whether the contract terms contain a specific word or whether the name of the second party is consistent with the business license. It supports both exact matching and fuzzy matching modes. Regular expressions are used to match strings that conform to a specific pattern, such as whether an ID card number conforms to a specified format. The system can handle complex string matching needs, such as checking whether the format and phone number conform to the mobile phone number format. Existence checks are used to determine whether a field or element exists, such as whether a contract contains the signatures of both parties or whether an attachment contains qualification certificates. Condition values provide specific comparison thresholds or matching templates for the condition type, which vary depending on the condition type. For example, for numerical comparison types, the condition value is the comparison threshold; for string matching types, the condition value is the string to be matched; for regular expression types, the condition value is the regular expression pattern; and for existence checks, the condition value is the name of the field or element to be checked. During execution, the atomic check executor judges the parsed input data according to the configured condition type and condition value to determine whether the check passes or fails.
[0054] By storing condition types and condition values as configuration parameters in the database, the system supports a variety of commonly used condition types, which can meet the needs of most review scenarios. When a new condition type needs to be added, the corresponding configuration can be added to the database without modifying the code, which significantly improves the system's flexibility and scalability and enables it to quickly respond to the ever-changing review needs of operators' businesses.
[0055] Example 2: Reference Figure 2This embodiment also provides an intelligent review system based on semantic-level atomic detection, including: a document preprocessing module, used to preprocess the document to be reviewed, convert the document to be reviewed into a vector representation and store it in a vector database, and establish a vector index to obtain vectorized structured data; a configuration and plan generation module, used to read the pre-configured scenarios, rules and atomic check item associations from the configuration database, and generate an execution plan containing the calling order and dependencies of each atomic check item; and an execution and summary module, connected to the document preprocessing module and the configuration and plan generation module respectively, used to call each atomic check item executor sequentially according to the execution plan and based on the vectorized structured data, wherein each atomic check item executor completes a single check by integrating at least one of the following capabilities: external application programming interface calls, vector knowledge base retrieval and large language model inference, and summarizes all check results to generate a review report.
[0056] In another possible embodiment, the document preprocessing module is responsible for preprocessing the documents to be reviewed, such as source type detection, format conversion, and vectorized storage. It receives the documents uploaded by users and outputs vectorized structured data to provide a high-quality data foundation for subsequent review processing. The configuration and plan generation module is responsible for reading the review configuration information from the configuration database, parsing the three-layer configuration architecture, and generating an execution plan containing the atomic check item call order and dependencies based on the current review task scenario, providing clear guidance for the execution of the review task. The execution and summary module is responsible for calling the atomic check item executors to complete various review tasks according to the execution plan. It receives the vectorized structured data output by the document preprocessing module and the execution plan output by the configuration and plan generation module, calls the corresponding atomic check item executors to perform checks, and summarizes all check results to generate a complete review report, which is then fed back to the reviewers. The three modules communicate with each other through a RESTful API. The interface is clearly defined and standardized, facilitating independent development, testing, and upgrades of the modules.
[0057] Preferably, in this embodiment, the document preprocessing module includes: a source type detection unit, used to perform adaptive source type detection on the input PDF document and determine that the PDF document belongs to one of a preset variety of document source types; a format conversion unit, connected to the output of the source type detection unit, used to adaptively select a processing strategy based on the detection result, convert the PDF document into a preset lightweight markup format, and retain the table structure and heading hierarchy information in the original document during the conversion process; and a vectorized storage unit, connected to the output of the format conversion unit, used to perform semantic segmentation on the lightweight markup format content, use a text embedding model to convert each segment into a vector representation, store the vector representation in the vector database, and establish the vector index.
[0058] In another possible embodiment, the document preprocessing module includes a source type detection unit, a format conversion unit, and a vectorized storage unit. These three units are connected sequentially to form a complete document preprocessing pipeline. The source type detection unit receives the PDF document uploaded by the user and is responsible for adaptively detecting the source type of the input PDF document. It determines the document's source type using a three-dimensional feature weighted detection algorithm and outputs the document source type information to the format conversion unit. The input of the format conversion unit is connected to the output of the source type detection unit. Based on the document source type information output by the source type detection unit, it adaptively selects the appropriate processing strategy to convert the PDF document to Markdown format. The process fully preserves the table structure and heading hierarchy information of the original document, outputs the converted Markdown format document to the vectorized storage unit, and connects the input end of the vectorized storage unit to the output end of the format conversion unit. Semantic segmentation is performed on the converted Markdown content, dividing the long document into multiple text fragments containing complete semantic units. Then, the BERT-based text embedding model is used to convert each text fragment into a 768-dimensional vector representation, which is stored in the Milvus vector database and an IVF_FLAT vector index is established for subsequent fast similarity retrieval. Finally, the vectorized structured data is output to the execution and summarization module.
[0059] Preferably, in this embodiment, the source type detection unit includes: a feature extraction subunit, used to extract metadata of the PDF document, calculate a first score by matching preset keywords; analyze the aspect ratio of each page of the PDF document, calculate a second score; and calculate a third score by statistically analyzing the text density in the PDF document; a weighted calculation subunit, connected to the output of the feature extraction subunit, used to assign a first weight, a second weight, and a third weight to the first score, the second score, and the third score respectively, perform weighted summation, and obtain a comprehensive score; a threshold determination subunit, connected to the output of the weighted calculation subunit, used to set a first threshold and a second threshold, compare the comprehensive score with the first threshold and the second threshold, and determine whether the PDF document belongs to a first type, a second type, or a third type; and a strategy selection subunit, connected to the output of the threshold determination subunit, used to adaptively select a subsequent processing strategy based on the determination result: for the first type of document, directly extract text according to a preset processing flow; for the second type of document, directly extract text and skip the optical character recognition step; for the third type of document, enable a high-precision optical character recognition module for text extraction.
[0060] In another possible embodiment, the source type detection unit includes a feature extraction subunit, a weighted calculation subunit, a threshold determination subunit, and a strategy selection subunit. These four subunits are connected sequentially to form a complete source type detection process. The input of the feature extraction subunit receives the PDF document uploaded by the user and is responsible for extracting features from the PDF document's metadata, page aspect ratio, and text density. It then calculates a first score, a second score, and a third score, respectively, and outputs these three scores to the weighted calculation subunit. The input of the weighted calculation subunit is connected to the output of the feature extraction subunit. It assigns weights of 0.5, 0.3, and 0.2 to the received first, second, and third scores, respectively, and performs a weighted summation to obtain a comprehensive score, which is then output. The overall score is fed to the threshold determination subunit. The input of the threshold determination subunit is connected to the output of the weighted calculation subunit. The received overall score is compared with the preset first threshold of 0.65 and the second threshold of 0.35. Based on the comparison result, the document source type is determined, and the document source type information is output to the strategy selection subunit. The input of the strategy selection subunit is connected to the output of the threshold determination subunit. Based on the received document source type information, the corresponding subsequent processing strategy is adaptively selected. For Word conversion documents, the strategy of directly extracting text is selected; for PPT conversion documents, the strategy of directly extracting text and skipping OCR is selected; for scanned documents, the strategy of enabling the high-precision OCR module is selected. The processing strategy information is output to the format conversion unit.
[0061] Preferably, in this embodiment, the configuration and plan generation module includes: a configuration reading unit, used to read scenario configuration information from the configuration database, and parse a table structure that is completely decoupled between the scenario layer, rule layer, and atomic check item layer, wherein the scenario layer is used to store business domain boundaries and applicable scope, the rule layer is used to group check items according to business logic and define the execution order, and the atomic check item layer is used to store the smallest execution unit and its corresponding execution parameters; a rule filtering unit, connected to the output of the configuration reading unit, used to filter all rules that need to be executed under the scenario from the configuration database according to the applicable scope of the scenario corresponding to the current audit, and further parse the list of atomic check items attached to each rule; and a plan generation unit, connected to the output of the rule filtering unit, used to read the check item type, capability combination mode, condition type, and condition value configured for each atomic check item; generate an execution plan according to the condition type and the condition value, and clarify the calling order and possible dependencies between the atomic check items.
[0062] In another possible embodiment, the configuration and plan generation module includes a configuration reading unit, a rule filtering unit, and a plan generation unit. These three units are connected sequentially to form a complete execution plan generation process. The input of the configuration reading unit is connected to the configuration database, responsible for reading the configuration information of scenarios, rules, and atomic check items from the database. It parses the completely decoupled table structure of the "scenario layer-rule layer-atomic check item layer" and outputs the parsed configuration information to the rule filtering unit. The input of the rule filtering unit is connected to the output of the configuration reading unit. Based on the business code and province code of the current audit task, it matches the corresponding audit scenario and then selects the appropriate scenario from the parsed configuration information. The system filters out all effective rules in the given scenario and further parses the list of atomic check items attached to each rule. It then outputs the filtered rules and atomic check item list to the plan generation unit. The input of the plan generation unit is connected to the output of the rule filtering unit. For each atomic check item, it reads the configured check item type, capability combination mode, condition type, and condition value, analyzes the dependencies between atomic check items (e.g., the output of one atomic check item is the input of another), and automatically adjusts the execution order of the atomic check items according to the dependencies. This generates a complete execution plan containing the call order and dependencies of each atomic check item, and outputs the execution plan to the execution and summary module.
[0063] Preferably, in this embodiment, the execution and aggregation module includes: an atomic executor invocation unit, used to sequentially invoke each atomic check item executor according to the execution plan and based on the vectorized structured data. Each atomic check item executor inherits from a unified executor base class, which uniformly declares external application programming interface invocation interface, vector knowledge base retrieval interface, large language model inference interface, and multimodal large language model interface through dependency injection; and a standardized process control unit, connected to the atomic executor invocation unit, used to ensure that each atomic check item executor follows the following standardized execution process: parsing input data, and combining capabilities. The mode calls the corresponding interface to determine the result and encapsulates the result into a standard output format; the capability mode configuration unit, connected to the standardized process control unit, is used to configure the atomic check item executor to support multiple capability combination modes, including but not limited to single capability type, two capability hybrid type, and three capability fusion type; the result summary unit, connected to the atomic executor calling unit, is used to summarize the execution results of each atomic check item after all atomic check items have been executed and generate a complete audit report; the audit report includes the pass status of each check item, the extracted key information points, a detailed risk description, and the source of evidence used as the basis for the audit.
[0064] In another possible embodiment, the execution and aggregation module includes an atomic executor invocation unit, a standardized process control unit, a capability mode configuration unit, and a result aggregation unit. The atomic executor invocation unit is connected to the standardized process control unit and the capability mode configuration unit, respectively. The result aggregation unit is connected to the output of the atomic executor invocation unit. The atomic executor invocation unit is responsible for invoking each atomic check item executor sequentially according to the execution plan output by the configuration and plan generation module. Each atomic check item executor inherits from a unified executor base class. The executor base class uniformly declares the external API call interface, vector knowledge base retrieval interface, large language model inference interface, and multimodal large language model interface through dependency injection. The standardized process control unit is responsible for controlling each The atomic check item executor follows a unified standardized execution process, namely parsing input data, calling the corresponding interface to determine the result according to the capability combination mode, and encapsulating the result into a standard output format to ensure that the execution process of all atomic check items is consistent and standardized. The capability mode configuration unit is responsible for configuring the corresponding capability combination mode for each atomic check item executor. According to the configuration information of the atomic check item, it dynamically loads the required technical capability interfaces to realize flexible combination of capabilities. The result aggregation unit is responsible for receiving the output results of all atomic check item executors, traversing all results and grouping and aggregating them according to rules, generating a complete audit report containing the pass status of each check item, the extracted key information points, a detailed risk description, and the source of evidence as the basis for auditing, and outputting it to the auditors.
[0065] Preferably, in this embodiment, the atomic executor calling unit is further provided with a semantic retrieval and multimodal linkage subunit. The semantic retrieval and multimodal linkage subunit is used to perform the following operations when the atomic check item executor needs to retrieve information from the vector database: according to the query conditions configured in the atomic check item, perform similarity retrieval in the vector database, and return text fragments related to the query conditions and image reference identifiers embedded in the text fragments; if the text fragments contain image reference identifiers, automatically parse the image reference identifiers, extract the corresponding image identifiers and obtain image data, and then jointly input the text fragments and the images into a multimodal large language model for analysis, and output analysis results that integrate semantic and visual information.
[0066] In another possible embodiment, the atomic executor calling unit also includes a semantic retrieval and multimodal linkage subunit. This subunit is connected to the vector database and the multimodal large language model interface. It is used to perform image-text joint analysis when the atomic check item executor needs to retrieve information from the vector database. When the atomic check item executor needs to retrieve information, the semantic retrieval and multimodal linkage subunit first performs a similarity retrieval in the vector database according to the query conditions configured in the atomic check item. The vector database returns the Top-K text fragments most relevant to the query conditions and the image reference identifiers embedded in these text fragments. If the returned text fragments contain image reference identifiers, the semantic retrieval and multimodal linkage subunit automatically parses these image reference identifiers, extracts the corresponding unique image identifiers, and retrieves the corresponding image data from the file server based on the unique image identifiers. Then, the text fragments and the corresponding image data are jointly input into the multimodal large language model for analysis. The multimodal large language model can simultaneously understand the semantic information of the text and the visual information of the image, fuse the two, and output a more accurate and comprehensive analysis result. This result is returned to the atomic check item executor as an important basis for its judgment.
[0067] Preferably, the semantic retrieval and multimodal linkage subunit in this embodiment further includes: an image parsing component, used to automatically parse image reference identifiers in a preset format within the obtained text fragments and extract a list of unique image identifiers; a joint invocation component, connected to the image parsing component, used to use the retrieved text content and corresponding image data as joint inputs to invoke the multimodal large language model interface; and a reliability assurance component, connected to the joint invocation component, used to employ a reliability assurance mechanism during the multimodal large language model invocation process. The reliability assurance mechanism includes: receiving results using a streaming output method; setting a heartbeat detection mechanism, whereby a timeout is considered if no new token is received for a consecutive preset time threshold; automatically retrying in case of timeout or interface abnormality, with a maximum of a preset number of retries; and if all retries fail, downgrading to using only plain text for inference.
[0068] In another possible embodiment, the semantic retrieval and multimodal linkage subunit also includes an image parsing component, a joint invocation component, and a reliability assurance component. The image parsing component is connected to the input of the joint invocation component and is responsible for parsing image reference identifiers in Markdown format from the text fragments returned by the vector database. It uses regular expressions to match all image reference identifiers and extracts the corresponding unique image identifier list, which is then output to the joint invocation component. The input of the joint invocation component is connected to the output of the image parsing component. Based on the unique image identifier list, it retrieves the corresponding image data in batches from the file server and then encapsulates the retrieved text content and corresponding image data according to the format required by the multimodal large language model. The system calls the multimodal large language model interface for analysis, receives the analysis results returned by the model, and outputs them to the atomic check item executor. The reliability assurance component connects with the joint call component and is responsible for providing comprehensive reliability assurance during the multimodal large language model call process. This includes receiving the model's returned results in a streaming output manner, allowing users to see the generation process of the review results in real time, setting a 15-second heartbeat check, and considering it a timeout if no new token is received for 15 consecutive seconds. It automatically retryes in case of timeout or interface abnormality, with a maximum of 2 retries and a 5-second interval between each retrieval. If all retries fail, it automatically degrades to using only plain text for reasoning, ignoring image information, and only inputting the text content into the plain text large language model for analysis to ensure that the review process can continue.
[0069] In some embodiments, the intelligent auditing system based on semantic-level atomic detection of the present invention can be implemented in a combination of hardware and software. As an example, the intelligent auditing system based on semantic-level atomic detection of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the intelligent auditing method based on semantic-level atomic detection of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0070] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.
[0071] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned intelligent auditing methods based on semantic-level atomic detection. That is, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the intelligent auditing method based on semantic-level atomic detection shown in any embodiment of the present invention by calling the computer program.
[0072] In one alternative embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0073] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0074] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
[0075] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0076] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.
[0077] Among them, electronic devices can also be terminal devices, which can be any device that can install applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.
[0078] It should be noted that, Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.
[0079] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned intelligent auditing methods based on semantic-level atomic detection.
[0080] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0081] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the aforementioned intelligent auditing method based on semantic-level atomic detection.
[0082] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0083] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0084] The computer-readable storage medium provided in this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EEPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0085] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.
[0086] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
[0087] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and do not imply a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.
[0088] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0089] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. An intelligent auditing method based on semantic-level atomic detection, characterized in that, Includes the following steps: S1. Preprocess the document to be reviewed by converting it into a vector representation and storing it in a vector database, and establishing a vector index to obtain vectorized structured data. S2. Read the pre-configured scenarios, rules, and atomic check item relationships from the configuration database, and generate an execution plan containing the call order and dependencies of each atomic check item; S3. According to the execution plan, and based on the vectorized structured data, each atomic check item executor is called sequentially. Each atomic check item executor completes a single check by integrating at least one of the following capabilities: external application programming interface call, vector knowledge base retrieval, and large language model reasoning. All check results are then summarized and an audit report is generated.
2. The intelligent auditing method based on semantic-level atomic detection according to claim 1, characterized in that, S1 specifically includes: S11. Perform source type adaptive detection on the input PDF document to determine that the PDF document belongs to one of the preset multiple document source types; S12. Based on the detection results, an adaptive processing strategy is selected to convert the PDF document into a preset lightweight markup format, while preserving the table structure and heading hierarchy information in the original document during the conversion process. S13. Semantically segment the lightweight markup format content, use a text embedding model to convert each segment into a vector representation, store the vector representation in the vector database, and establish the vector index.
3. The intelligent auditing method based on semantic-level atomic detection according to claim 2, characterized in that, S11 specifically includes: S101. Extract the metadata of the PDF document, calculate the first score by matching preset keywords; analyze the aspect ratio of each page of the PDF document, calculate the second score; calculate the text density in the PDF document, and calculate the third score. S102. Assign a first weight, a second weight, and a third weight to the first score, the second score, and the third score respectively, perform a weighted summation, and obtain a comprehensive score. S103. Set a first threshold and a second threshold, compare the comprehensive score with the first threshold and the second threshold, and determine whether the PDF document belongs to a first type, a second type or a third type. S104. Adaptively select subsequent processing strategies based on the judgment results: For the first type of document, extract the text directly according to the preset processing flow; for the second type of document, extract the text directly and skip the optical character recognition step; for the third type of document, enable the high-precision optical character recognition module to extract the text.
4. The intelligent auditing method based on semantic-level atomic detection according to claim 1, characterized in that, S2 specifically includes: S21. Read scenario configuration information from the configuration database, and parse the table structure of the scenario layer, rule layer, and atomic check item layer that are completely decoupled. The scenario layer is used to store the business domain boundary and applicable scope, the rule layer is used to group check items according to business logic and define the execution order, and the atomic check item layer is used to store the smallest execution unit and the corresponding execution parameters. S22. Based on the applicable scope of the scenario corresponding to the current audit, select all rules that need to be executed under the scenario from the configuration database, and then further parse the list of atomic check items attached to each rule; S23. For each atomic check item, read the check item type, capability combination mode, condition type, and condition value configured for the atomic check item; generate an execution plan based on the condition type and the condition value, and clarify the calling order and possible dependencies between the atomic check items.
5. The intelligent auditing method based on semantic-level atomic detection according to claim 1, characterized in that, S3 specifically includes: S31. According to the execution plan, and based on the vectorized structured data, each atomic check item executor is called sequentially. Each atomic check item executor inherits from a unified executor base class. The executor base class declares the external application programming interface call interface, vector knowledge base retrieval interface, large language model reasoning interface, and multimodal large language model interface in a unified manner through dependency injection. S32. Each atomic check item executor follows the following standardized execution process: parse the input data, call the corresponding interface to determine the result according to the capability combination mode, and encapsulate the result into a standard output format. S33. The atomic check item executor supports multiple capability combination modes, including but not limited to single capability type, two capability hybrid type and three capability fusion type; S34. After all atomic check items have been executed, summarize the execution results of each atomic check item and generate a complete audit report. The audit report includes the pass status of each check item, the key information points extracted, a detailed risk description, and the source of evidence used as the basis for the audit.
6. The intelligent auditing method based on semantic-level atomic detection according to claim 5, characterized in that, If the atomic check item executor in S32 needs to retrieve information from the vector database during execution, it performs the following steps: S301. Based on the query conditions configured in the atomic check item, perform similarity retrieval in the vector database and return text fragments related to the query conditions and image reference identifiers embedded in the text fragments; S302. If the text fragment contains an image reference identifier, the image reference identifier is automatically parsed, the corresponding image identifier is extracted and the image data is obtained, and then the text fragment and the image are jointly input into a multimodal large language model for analysis, and the analysis result that integrates semantic and visual information is output.
7. The intelligent auditing method based on semantic-level atomic detection according to claim 6, characterized in that, S301 and S302 are connected by a linkage mechanism, which specifically includes: S311. After obtaining the text fragment, automatically parse the image reference identifiers that exist in the text fragment in a preset format and extract the unique identifier list of the images; S312. Use the retrieved text content and corresponding image data as joint input to call the multimodal large language model interface; S313. A reliability guarantee mechanism is adopted in the process of calling the multimodal large language model. The reliability guarantee mechanism includes: receiving results in a streaming output mode; setting a heartbeat detection, and if no new token is received for a consecutive preset time threshold, it is considered a timeout; automatically retrying when timeout or interface abnormality occurs, with a maximum of a preset number of retries; if all retries fail, it is downgraded to using only plain text for inference.
8. The intelligent auditing method based on semantic-level atomic detection according to claim 5, characterized in that, The condition types include, but are not limited to, numerical comparison, string matching, regular expressions, and existence checks; the condition values are used to provide specific comparison thresholds or matching templates for the condition types.
9. An intelligent auditing system based on semantic-level atomic detection, characterized in that, An intelligent auditing method based on semantic-level atomic detection as described in any one of claims 1-8 includes: The document preprocessing module is used to preprocess the documents to be reviewed, convert the documents to be reviewed into vector representations and store them in a vector database, and establish a vector index to obtain vectorized structured data. The configuration and plan generation module is used to read the pre-configured scenarios, rules and atomic check item relationships from the configuration database, and generate an execution plan that includes the call order and dependencies of each atomic check item; The execution and summary module is connected to the document preprocessing module and the configuration and plan generation module, respectively. It is used to sequentially call each atomic check item executor according to the execution plan and based on the vectorized structured data. Each atomic check item executor completes a single check by integrating at least one of the following capabilities: external application programming interface calls, vector knowledge base retrieval, and large language model reasoning. It also summarizes all check results and generates an audit report.
10. The intelligent auditing system based on semantic-level atomic detection according to claim 9, characterized in that, The document preprocessing module includes: The source type detection unit is used to perform adaptive source type detection on the input PDF document and determine that the PDF document belongs to one of a number of preset document source types. The format conversion unit is connected to the output of the source type detection unit and is used to adaptively select a processing strategy based on the detection results to convert the PDF document into a preset lightweight markup format, while preserving the table structure and heading level information in the original document during the conversion process. A vectorized storage unit, connected to the output of the format conversion unit, is used to perform semantic segmentation on the lightweight markup format content, convert each segment into a vector representation using a text embedding model, store the vector representation in the vector database, and establish the vector index.
11. The intelligent auditing system based on semantic-level atomic detection according to claim 10, characterized in that, The source type detection unit includes: The feature extraction subunit is used to extract the metadata of the PDF document, calculate a first score by matching preset keywords, analyze the aspect ratio of each page of the PDF document, calculate a second score, and calculate the text density in the PDF document to calculate a third score. The weighted calculation subunit is connected to the output of the feature extraction subunit and is used to assign a first weight, a second weight, and a third weight to the first score, the second score, and the third score respectively, perform a weighted summation, and obtain a comprehensive score. A threshold determination subunit is connected to the output of the weighted calculation subunit. It is used to set a first threshold and a second threshold, compare the comprehensive score with the first threshold and the second threshold, and determine whether the PDF document belongs to a first type, a second type, or a third type. The strategy selection subunit is connected to the output of the threshold determination subunit and is used to adaptively select the subsequent processing strategy according to the determination result: for the first type of document, the text is directly extracted according to the preset processing flow; for the second type of document, the text is directly extracted and the optical character recognition step is skipped; for the third type of document, the high-precision optical character recognition module is enabled to extract the text.
12. The intelligent auditing system based on semantic-level atomic detection according to claim 9, characterized in that, The configuration and plan generation module includes: The configuration reading unit is used to read scenario configuration information from the configuration database and parse the table structure of the scenario layer, rule layer, and atomic check item layer, which are completely decoupled. The scenario layer is used to store the business domain boundary and applicable scope, the rule layer is used to group check items according to business logic and define the execution order, and the atomic check item layer is used to store the smallest execution unit and the corresponding execution parameters. The rule filtering unit, connected to the output of the configuration reading unit, is used to filter out all rules that need to be executed in the scenario from the configuration database according to the applicable scope of the current audit scenario, and then further parse the list of atomic check items attached to each rule; The plan generation unit, connected to the output of the rule filtering unit, is used to read the check item type, capability combination mode, condition type, and condition value configured for each atomic check item; generate an execution plan based on the condition type and condition value, and clarify the calling order and possible dependencies between the atomic check items.
13. The intelligent auditing system based on semantic-level atomic detection according to claim 9, characterized in that, The execution and aggregation module includes: The atomic executor invocation unit is used to sequentially invoke each atomic check item executor according to the execution plan and based on the vectorized structured data. Each atomic check item executor inherits from a unified executor base class. The executor base class declares the external application programming interface invocation interface, vector knowledge base retrieval interface, large language model inference interface, and multimodal large language model interface in a unified manner through dependency injection. A standardized process control unit, connected to the atomic executor calling unit, is used to enable each atomic check item executor to follow the following standardized execution process: parse input data, call the corresponding interface to determine the result according to the capability combination mode, and encapsulate the result into a standard output format; A capability mode configuration unit, connected to the standardized process control unit, is used to configure the atomic check item executor to support multiple capability combination modes, including but not limited to single capability type, two capability hybrid type and three capability fusion type; The result summarization unit, connected to the atomic executor calling unit, is used to summarize the execution results of each atomic check item after all atomic check items have been executed, and generate a complete audit report. The audit report includes the pass status of each check item, the key information points extracted, a detailed risk description, and the source of evidence used as the basis for the audit.
14. The intelligent auditing system based on semantic-level atomic detection according to claim 13, characterized in that, The atomic executor invocation unit also includes a semantic retrieval and multimodal linkage subunit, which is used to perform the following operations when the atomic check item executor needs to retrieve information from the vector database: Based on the query conditions configured in the atomic check items, a similarity retrieval is performed in the vector database, returning text fragments related to the query conditions and image reference identifiers embedded in the text fragments; If the text fragment contains an image reference identifier, the image reference identifier is automatically parsed, the corresponding image identifier is extracted, and the image data is obtained. Then, the text fragment and the image are jointly input into a multimodal large language model for analysis, and the analysis result that integrates semantic and visual information is output.
15. The intelligent auditing system based on semantic-level atomic detection according to claim 14, characterized in that, The semantic retrieval and multimodal linkage subunit is also equipped with: The image parsing component is used to automatically parse the image reference identifiers that exist in a preset format in the text fragment after obtaining the text fragment, and extract the unique identifier list of the image; The joint invocation component, connected to the image parsing component, is used to take the retrieved text content and corresponding image data as joint inputs to invoke the multimodal large language model interface; A reliability assurance component, connected to the joint invocation component, is used to employ a reliability assurance mechanism during the invocation of a multimodal large language model. The reliability assurance mechanism includes: receiving results in a streaming output manner; setting a heartbeat detection mechanism, which considers a timeout if no new token is received for a consecutive preset time threshold; automatically retrying in case of timeout or interface abnormality, with a maximum of a preset number of retries; and degrading to using only plain text for inference if all retries fail.
16. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the intelligent auditing method based on semantic-level atomic detection as described in any one of claims 1-8.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer to implement the intelligent auditing method based on semantic-level atomic detection as described in any one of claims 1-8.
