Text intelligent checking method based on hybrid model knowledge graph
By employing a hybrid model knowledge graph approach, which integrates cross-modal semantic understanding with knowledge graph logical reasoning, the problem of insufficient semantic association between images and text in existing technologies is solved. This enables deep intelligent verification of heterogeneous digital content, ensuring the consistency of the content's form, semantics, and logic.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2026-01-16
- Publication Date
- 2026-04-28
AI Technical Summary
Existing text verification technologies cannot effectively establish semantic connections between images and text, making it difficult to identify deep-seated spatiotemporal logical conflicts and factual causal relationships, resulting in a lack of logical consistency verification.
By employing a hybrid model-based knowledge graph approach, cross-modal semantic understanding and knowledge graph logical reasoning are integrated. A bidirectional encoder representation model and a visual content index model are used to generate semantic index vectors, construct an adaptive template matrix, perform formal standardization verification, detect logical fallacies in the domain knowledge graph, and generate a structured verification report.
It enables deep intelligent verification of heterogeneous digital content, accurately identifies semantic homology and logical fallacies in text and image content, improves adaptability to different business scenarios, and ensures consistency in the form, semantics, and logic of the content.
Smart Images

Figure CN121542443B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text verification technology, specifically to a text intelligent verification method based on a hybrid model knowledge graph. Background Technology
[0002] As internet content production shifts from centralized expert editing and review to decentralized large-scale collaborative creation, the data scale of digital knowledge bases and online publications is growing exponentially. Existing text verification technologies mainly rely on rule-based regular expression matching or statistical N-gram probability models. While these methods can handle superficial format compliance and spelling errors, they cannot effectively establish semantic connections between images and text when faced with multimodal heterogeneous data, nor can they identify deep spatiotemporal logical conflicts and factual causal relationships based on deep semantic understanding.
[0003] Existing technologies cannot solve the technical problem of missing logical consistency verification in heterogeneous digital content due to the lack of cross-modal semantic understanding and dynamic ontology constraints.
[0004] To address this, the present invention proposes a text intelligent verification method based on a hybrid model knowledge graph. Summary of the Invention
[0005] The purpose of this invention is to provide a text intelligent verification method based on a hybrid model knowledge graph, which achieves deep intelligent verification of the form, semantics and logical consistency of heterogeneous digital content by integrating cross-modal semantic understanding and knowledge graph logical reasoning.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] Intelligent text verification methods based on hybrid model knowledge graphs include:
[0008] It receives and parses unstructured digital documents, separating text content objects and visual resource objects; based on a bidirectional encoder representation model and a visual content index model, it processes text content objects and visual resource objects, generating semantic index vectors and visual content index vectors containing document classification metadata.
[0009] Based on document classification metadata, an adaptive template matrix is constructed; target slotting entities are extracted from text content objects and filled into the corresponding slots of the adaptive template matrix; the difference between the set of filled slots and the preset set of required items is calculated, and a formal standardization verification result is generated.
[0010] The visual content index vector and the semantic index vector are input into the cross-modal gated arbitrator, and vector similarity retrieval is performed based on the Sigmoid activation function to generate semantic homology determination results.
[0011] The text content object is transformed into semantic fact triples and mapped to a unified spatiotemporal coordinate system; the semantic fact triples are used as query subgraphs to detect conflicts based on ontology logic constraints in the domain knowledge graph and generate logical fallacy detection results.
[0012] The results of formal standardization verification, semantic homology determination, and logical fallacy detection are summarized to generate a structured verification report.
[0013] Preferably, the process of receiving and parsing the unstructured digital document and separating the text content object and the visual resource object specifically includes:
[0014] The unstructured digital document is an electronic document that contains text layer data and embedded visual resource objects in a single file and does not have a predefined data model. A file format parsing engine is used to identify the document type of the unstructured digital document, and the document type is written into the document classification metadata. An unstructured text parsing interface is used to extract the text layer data from the unstructured digital document, and the text layer data is encapsulated with the document classification metadata to form the text content object. The binary storage structure of the unstructured digital document is parsed to extract the embedded image data entities to form the visual resource object. The local data dispersion distribution of the visual resource object is calculated to determine the effective feature region and background noise region. Based on the region determination result, the filter kernel coefficients are dynamically adjusted to generate an enhanced visual resource object.
[0015] Preferably, the process of processing text content objects and visual resource objects based on the bidirectional encoder representation model and visual content index model to generate semantic index vectors and visual content index vectors containing document classification metadata specifically includes:
[0016] The text content object and the document classification metadata are jointly input into a transformer-based bidirectional encoder representation model for vectorization encoding to generate a semantic index vector that integrates metadata features. The visual resource object is input into the visual content index model. The visual content index model adopts a hybrid feature extraction architecture that combines convolutional neural networks and visual transformers. The convolutional neural network branch in the hybrid feature extraction architecture is used to extract the local high-frequency texture features of the visual resource object. At the same time, the visual transformer branch is used to capture the global spatial layout semantics of the visual resource object through a multi-head self-attention mechanism. Feature concatenation operation is performed on the local high-frequency texture features and the global spatial layout semantics to generate the visual content index vector.
[0017] Preferably, the process of constructing an adaptive template matrix based on document classification metadata specifically includes:
[0018] The document classification metadata in the semantic index vector is parsed to determine the document's category; Extensible Markup Language (XML) configuration data matching the document's category is retrieved from the dynamic rule base, and the field dependency rules defined in the XML configuration data are parsed; when a preset trigger entity is detected in the text content object, the set of required field slots is dynamically expanded according to the field dependency rules associated with the entity, and an adaptive template matrix containing the set of required field slots and format assertion rules is constructed.
[0019] Preferably, the process of extracting the target slotting entity from the text content object and filling it into the corresponding slot of the adaptive template matrix, calculating the difference between the set of filled slots and the preset set of required items, and generating the formal standardization verification result specifically includes:
[0020] The system utilizes a conditional random field sequence labeling layer connected to the end of the bidirectional text encoder representation model to perform sequence decoding on the text content object, calculate the global label sequence probability, locate the target slotting entity, and map the target slotting entity to the corresponding slot in the adaptive template matrix. It then uses predefined regular expression assertion logic to verify the compliance of the target slotting entity's filling format. Finally, it performs set difference operations to calculate the difference between the set of filled slots in the adaptive template matrix and the preset set of required items. When the difference is not empty and the filling format violates the regular expression assertion logic, it generates a formal compliance verification result.
[0021] Preferably, the process of inputting the visual content index vector and the semantic index vector into a cross-modal gated arbitrator, performing vector similarity retrieval based on the Sigmoid activation function, and generating a semantic homology determination result specifically includes:
[0022] The cross-modal gating arbitrator is configured with dynamic retrieval weight allocation logic based on data quality scores; it uses a Sigmoid activation function to process the quality scores of the visual resource objects to calculate normalized visual retrieval weight coefficients; it constructs a vector weighted concatenation formula based on the visual retrieval weight coefficients to perform weighted fusion of the visual content index vector and the semantic index vector to generate a multimodal joint query vector, wherein the visual retrieval weight coefficients are positively correlated with the contribution of the visual content index vector in the fusion process; it uses the multimodal joint query vector to perform K-nearest neighbor retrieval in the vector space of the verified archive index; it calculates the cosine similarity value between the multimodal joint query vector and the first nearest neighbor sample index returned by the retrieval, and confirms the cosine similarity value as the target similarity score for homology determination; when the target similarity score is higher than a preset homology determination threshold, it generates a semantic homology determination result indicating content association.
[0023] Preferably, the process of converting text content objects into semantic fact triples and mapping them to a unified spatiotemporal coordinate system; using the semantic fact triples as query subgraphs, detecting conflicts based on ontology logical constraints in the domain knowledge graph, and generating logical fallacy detection results specifically includes:
[0024] The unstructured temporal description in the text content object is transformed into a mathematically closed interval mapped to a unified spatiotemporal coordinate system using a semantic quantization model, and a start and end timestamp are assigned to define the boundary of the mathematically closed interval. A causal dependency tree containing logical dependencies is established in the domain knowledge graph. Based on the pre-dependency rules in the ontology logical constraints, a logical consistency query is performed in the domain knowledge graph to detect whether the absolute timestamp of the successor event entity node in the query subgraph is earlier than the absolute timestamp of the predecessor event entity node. When the successor event entity node is detected to be earlier than the predecessor event entity node, a logical fallacy detection result indicating a temporal logical conflict is generated; otherwise, a judgment result indicating that the content is not related is generated.
[0025] Preferably, after generating a structured verification report from the summarized formal standardization verification results, semantic homology determination results, and logical fallacy detection results, the report further includes:
[0026] When the structured verification report indicates that the verification has passed, a state machine change instruction is triggered to mark the document publication status of the unstructured digital document as published. After the document publication status is marked as published, an incremental index building mechanism is initiated to parse the unstructured digital document into structured index data and load it into a public retrieval database. The public retrieval database contains an inverted index table for keyword retrieval and a high-dimensional vector index table for vector retrieval.
[0027] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0028] 1. This invention constructs a hybrid feature extraction architecture based on parallel convolutional neural networks and visual transformers, which can simultaneously capture local texture details and global spatial layout of images, generating high-precision visual content index vectors. Furthermore, through a unique cross-modal gating arbitrator, this visual vector is weighted and fused with the semantic index vector of the text content for similarity retrieval. This design establishes a direct link from visual features to text semantics, accurately determining the semantic homology of image and text content, fundamentally solving the problem of missing verification of content relevance in heterogeneous data.
[0029] 2. This invention transforms text content into semantic fact triples mapped to a unified spatiotemporal coordinate system, and uses these triples as query subgraphs for detection within a domain knowledge graph. Utilizing pre-defined ontology logic constraints (such as causal dependency trees), it can accurately identify and mark content that violates common sense, temporal order, or causal relationships in the real world. This allows text verification to go beyond simply "whether it's written correctly" and delve into "whether it's said correctly," achieving a deep guarantee of content authenticity and logical rigor.
[0030] 3. This invention parses the document's own classification metadata, retrieves matching configurations from a dynamic rule base, and automatically constructs an adaptive template matrix containing field dependencies and format assertions. This mechanism enables validation rules to be dynamically generated based on document type, greatly improving adaptability to different business scenarios. Attached Figure Description
[0031] Figure 1 This is a flowchart of the intelligent text verification method based on a hybrid model knowledge graph according to the present invention;
[0032] Figure 2 This is a flowchart illustrating the adaptive template matrix construction process according to an embodiment of the present invention.
[0033] Figure 3 This is a flowchart illustrating the generation of semantic homology determination results in an embodiment of the present invention. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Other embodiments obtained by those skilled in the art based on the ideas in this specification without creative effort all fall within the protection scope of this invention.
[0035] This embodiment provides a text intelligent verification method based on a hybrid model knowledge graph for quality verification of non-confidential electronic documents circulating within an organization. Specifically, taking a case report concerning property loss as an example, this report, as a typical unstructured digital document (e.g., a document named "Report on Case A.docx"), needs to ensure that its content is formatted correctly, consistent with its visuals, and logically sound. This method aims to improve the quality and efficiency of internal archival data governance through an automated verification process. All document content, images, and entity information involved in this embodiment are illustrative examples, de-identified or virtualized, and do not refer to any real cases or personal information.
[0036] Reference Figures 1 to 3This invention provides a text intelligent verification method based on a hybrid model knowledge graph, the specific technical solution of which is as follows:
[0037] Example 1:
[0038] A text intelligent verification method based on a hybrid model knowledge graph, referring to... Figure 1 ,include:
[0039] It receives and parses unstructured digital documents, separating text content objects and visual resource objects; based on a bidirectional encoder representation model and a visual content index model, it processes text content objects and visual resource objects, generating semantic index vectors and visual content index vectors containing document classification metadata.
[0040] Based on document classification metadata, an adaptive template matrix is constructed; target slotting entities are extracted from text content objects and filled into the corresponding slots of the adaptive template matrix; the difference between the set of filled slots and the preset set of required items is calculated, and a formal standardization verification result is generated.
[0041] The visual content index vector and the semantic index vector are input into the cross-modal gated arbitrator, and vector similarity retrieval is performed based on the Sigmoid activation function to generate semantic homology determination results.
[0042] The text content object is transformed into semantic fact triples and mapped to a unified spatiotemporal coordinate system; the semantic fact triples are used as query subgraphs to detect conflicts based on ontology logic constraints in the domain knowledge graph and generate logical fallacy detection results.
[0043] The results of formal standardization verification, semantic homology determination, and logical fallacy detection are summarized to generate a structured verification report.
[0044] Furthermore, the process of receiving and parsing unstructured digital documents to separate text content objects and visual resource objects specifically includes: the unstructured digital document is an electronic document that contains text layer data and embedded visual resource objects in a single file and does not have a predefined data model; the document type of the unstructured digital document is identified using a file format parsing engine, and the document type is written into the document classification metadata; the text layer data in the unstructured digital document is extracted using an unstructured text parsing interface, and the text layer data is encapsulated with the document classification metadata to form the text content object; the binary storage structure of the unstructured digital document is parsed, and the embedded image data entities are extracted to form the visual resource object; the local data dispersion distribution of the visual resource object is calculated to determine the effective feature region and the background noise region, and the filter kernel coefficients are dynamically adjusted based on the region determination results to generate an enhanced visual resource object.
[0045] Specifically, taking an unstructured digital document named "Situation Report on Case A.docx" as an example, the specific process for receiving and parsing it using this method is as follows:
[0046] The document type of the unstructured digital document is identified using a file format parsing engine, and the document type is written into the document classification metadata. The file format parsing engine is a programmatic component with a built-in file signature database. Its operation does not rely on unstable file extensions, but rather reads the first few bytes of the binary data stream of any input document and compares them with known signatures in the database. For example, the engine's database pre-stores key-value pairs such as {"504B0304":"docx", "25504446":"pdf"}. When processing "Situation Report.docx", the engine reads the 50 4B 03 04 byte sequence from its file header, successfully matches it in the database, and thus accurately identifies the document type as docx. Simultaneously, this method queries a pre-defined internal document classification rule base in JSON format to generate a JSON-formatted document classification metadata. The document classification metadata is a type of structured data defined in this invention, used to carry the contextual core attributes of an unstructured document, as shown in the following example: {“doc_id”:“GSWJ-2025-001”,“file_type”:“docx”,“doc_category”:“Report on Property Loss”}.
[0047] The text layer data from the unstructured digital document is extracted using an unstructured text parsing interface. This text layer data is then encapsulated with the document classification metadata to form the text content object. The unstructured text parsing interface is a unified function call interface that internally encapsulates specific parsing logic for different document types (e.g., docx, pdf, txt). This interface receives the document's data stream and the identified file_type as input, and selects the appropriate underlying library to call based on the file_type (e.g., calling the python-docx library for docx and the PyPDF2 library for pdf). This design abstracts the complex and diverse parsing process, providing a stable and unified text extraction method for upper-layer applications. The extracted plain text string and the document classification metadata generated in the previous step are jointly encapsulated to form the text content object. The text content object is a standardized memory data structure designed by this invention to carry text information. Its specific form is a Python dictionary, for example: {"metadata": {"doc_id": "GSWJ-2025-001"...}, "content": "The person who reported the case stated that his vehicle..."}.
[0048] The binary storage structure of the unstructured digital document is parsed to extract the embedded image data entities to form the visual resource object. This process is also implemented through the internal logic of the aforementioned interface. For compressed file formats like docx, image files are extracted by programmatically accessing the internal word / media / directory. Each image file is decoded into a standard three-dimensional numerical array to form the visual resource object. The visual resource object is a standardized in-memory data structure designed by this invention to carry visual information, also in dictionary form, for example: {"image_id": "IMG-001-A", "format": "jpeg", "data":}<NumPy_array_shape_[1080,1920,3]>}
[0049] The local data dispersion distribution of the visual resource object is calculated to determine effective feature regions and background noise regions. Based on the region determination results, the filter kernel coefficients are dynamically adjusted to generate an enhanced visual resource object. This step aims to preprocess the image. First, the image array is divided into 32x32 pixel grid blocks, and the standard deviation of the pixel grayscale values within each block is calculated. This standard deviation is defined as the local data dispersion. This method compares this value with a preset threshold (e.g., 15.0). Regions with high dispersion are marked as effective feature regions (containing key information), while those with low dispersion are background noise regions (with uniform and smooth content). Subsequently, a Gaussian filter is applied, with the filter intensity inversely proportional to the local data dispersion. This differentiated image data is encapsulated into an enhanced visual resource object. Its data structure is consistent with that of a visual resource object, but the value corresponding to its data key is a numerical array after noise reduction and detail enhancement processing.
[0050] By standardizing the parsing and separation of unstructured documents and performing content-feature-based adaptive image enhancement on visual resources, high-quality, structured data input is provided for subsequent high-precision cross-modal semantic analysis and feature extraction, and the robustness of the visual model is significantly improved.
[0051] Furthermore, the process of processing text content objects and visual resource objects based on the bidirectional encoder representation model and visual content index model to generate semantic index vectors and visual content index vectors containing document classification metadata specifically includes: jointly inputting the text content object and the document classification metadata into the transformer-based bidirectional encoder representation model for vectorization encoding to generate a semantic index vector that integrates metadata features; inputting the visual resource object into the visual content index model; the visual content index model adopts a hybrid feature extraction architecture that combines convolutional neural networks and visual transformers; using the convolutional neural network branch in the hybrid feature extraction architecture to extract local high-frequency texture features of the visual resource object; simultaneously using the visual transformer branch to capture the global spatial layout semantics of the visual resource object through a multi-head self-attention mechanism, performing feature concatenation operations on the local high-frequency texture features and the global spatial layout semantics to generate the visual content index vector.
[0052] Specifically, this method continues to extract deep features from the generated text content objects and enhanced visual resource objects:
[0053] The text content object and the document classification metadata are jointly input into a transformer-based bidirectional encoder representation model for vectorization encoding, generating a semantic index vector that integrates metadata features. In this embodiment, the transformer-based bidirectional encoder representation model is a domain-adapted deep language model. Its basic architecture is a transformer network containing 12 encoder layers, with 12 multi-head self-attention units deployed in each encoder layer, and all intermediate representations are uniformly set to 768 dimensions. The model is first pre-trained on a large-scale general Chinese corpus, and then fine-tuned using 500,000 anonymized internal document data sets to make its semantic understanding capabilities more relevant to this application scenario. When processing the "text content object," the model's input sequence is first constructed: the document category in the metadata (e.g., "report of property loss cases") is placed as a special text tag before the original text content and separated by a special delimiter [SEP]. The entire sequence is fed into a lexical analyzer, which converts it into a sequence of integer IDs with a fixed length of 512 (padding if insufficient, truncating if excessive). The ID sequence is then input into the model, undergoing layer-by-layer nonlinear transformation and contextual information fusion through a 12-layer encoder, ultimately generating a tensor of dimensions [512, 768] at the output layer. This method extracts the 768-dimensional vector corresponding to the sequence start position [CLS] marker from this tensor; this vector is defined as the semantic index vector. The semantic index vector is a high-dimensional floating-point vector that not only encodes the complex semantics of the text content through a deep network structure but also incorporates the document's category attributes into the vector representation through a special construction at the input end.
[0054] The visual resource object is input into the visual content indexing model. The visual content indexing model is a parallel, two-branch deep neural network designed by this invention to achieve comprehensive feature extraction from images. This model receives an image array from the "enhanced visual resource object" as input. Before input, the image array undergoes preprocessing, including normalizing pixel values from the [0, 255] interval to the [0, 1] interval and uniformly adjusting the size to [224, 224, 3] to meet the input requirements of the subsequent two parallel branches.
[0055] The convolutional neural network branch in the hybrid feature extraction architecture is used to extract local high-frequency texture features of the visual resource object. This branch is a deep residual network, which focuses on capturing detailed information of the image.
[0056] When the preprocessed image tensor is input into this branch, it flows through a series of convolutional layers, pooling layers, and activation functions. Deep convolutional kernels act like magnifying glasses, automatically learning and responding to local, high-frequency visual patterns in the image, such as edges, corners, and scratches. In this embodiment, the branch ultimately outputs a feature map of [7, 7, 2048] dimensions. This three-dimensional tensor can be understood as a 7x7 "feature map" containing 2048 different channels, with each map corresponding to a detected local texture feature.
[0057] Simultaneously, the visual transformer branch is utilized to capture the global spatial layout semantics of the visual resource objects through a multi-head self-attention mechanism. This branch is a visual transformer network designed to understand the overall structure of the image and the spatial relationships between objects from a macroscopic perspective.
[0058] The input 224x224 image is first segmented into 196 non-overlapping 16x16 pixel patches. Each patch is flattened and linearly mapped to a 768-dimensional vector. To allow the model to know the original location of each patch, this method adds a learnable "location encoding" vector to each vector. These vector sequences carrying location information are fed into a network consisting of 12 transformer encoder layers. At each layer, a multi-head self-attention mechanism calculates the association strength between any two patches, enabling the model to understand the spatial proximity of "door" and "scratches," or the layout relationship between "vehicle" and "background." This branch ultimately outputs a [196, 768]-dimensional sequence, where each 768-dimensional vector represents the semantic representation of the corresponding patch in the global context.
[0059] A feature concatenation operation is performed on the local high-frequency texture features and the global spatial layout semantics to generate the visual content index vector. This feature concatenation operation is a technique for fusing heterogeneous features from different model branches to form a more comprehensive and information-rich unified representation.
[0060] Specifically, firstly, the feature map [7, 7, 2048] output from the convolutional neural network branch is compressed in space using a global average pooling operation to obtain a 2048-dimensional vector, which represents the overall texture information of the image. Then, the sequence [196, 768] output from the visual transformer branch is also compressed using a global average pooling operation to obtain a 768-dimensional vector, which represents the overall structural information of the image. Finally, these two vectors (2048-dimensional and 768-dimensional) representing local texture and global layout, respectively, are directly concatenated in dimension to form a fused vector of 2048 + 768 = 2816 dimensions. This fused vector is then passed through a linear layer for dimensionality reduction (e.g., to 768 dimensions) and normalization, resulting in the visual content index vector. The visual content index vector is a 768-dimensional floating-point vector that, through a sophisticated dual-branch architecture and feature fusion mechanism, simultaneously encodes the microscopic details and macroscopic structure of the image, providing a high-quality visual representation for subsequent cross-modal comparisons.
[0061] By performing deep vectorization on text and visual objects respectively, this step generates high-quality, information-dense semantic index vectors and visual content index vectors, which transform the unstructured information of text and images into standardized numerical representations that can be compared and reasoned in the same mathematical space.
[0062] Furthermore, referring to Figure 2 The process of constructing an adaptive template matrix based on document classification metadata specifically includes: parsing the document classification metadata in the semantic index vector to determine the document's category; retrieving Extensible Markup Language (XML) configuration data that matches the document's category from the dynamic rule base, and parsing the field dependency rules defined in the XML configuration data; when a preset trigger entity is detected in the text content object, dynamically expanding the set of required slots according to the field dependency rules associated with the entity, and constructing an adaptive template matrix containing the set of required slots and format assertion rules.
[0063] Specifically, this process aims to dynamically generate a unique, content-adaptive verification "checklist" for each document to be verified. The specific process is as follows:
[0064] The document classification metadata in the semantic index vector is parsed to determine the document's category. In this step, the method directly reads the value of the `doc_category` key from the `metadata` field of the "text content object," which is "Property Loss Case Report." This category is the starting point for triggering all subsequent adaptive rules.
[0065] This method retrieves Extensible Markup Language (XML) configuration data matching the document's category from a dynamic rule base and parses the field dependency rules defined in the XML configuration data. The dynamic rule base is a file system directory or database that stores validation rule configuration files. Its core mechanism is mapping document categories to specific rule files. Based on the category name obtained in the previous step, this method locates and reads a corresponding XML configuration data file from this library.
[0066] To support highly flexible rule configuration, this file does not use flat text but instead employs a hierarchical, nested tree-like storage structure. Its internal root node contains three core branch nodes: The first branch is the basic required field node, storing fields that must exist regardless of the report content, such as "reporter's name," "incident location," and "description of lost items." The second branch is the dependent rule node, which has multiple logical child nodes attached. Each child node encapsulates a set of mapping relationships: trigger condition tags defining semantic trigger anchors, and additional required field tags defining response actions; for example, a rule can define that when semantics related to "personal injury" are detected in the report, the fields "injury report number" and "hospital name" must be additionally required. The third branch is the format assertion node, used to store key-value pairs of field IDs and regular expressions, such as binding the "reporter's ID number" field to a standard 18-digit ID number regular expression. This method will completely parse the three parts of this configuration file to prepare for building the validation template.
[0067] When a preset trigger entity is detected in the text content object, the set of required field slots is dynamically expanded according to the field dependency rules associated with the entity. This method then performs a rapid semantic scan of the "content" field (i.e., the report body) of the "text content object," comparing the scanned text features with the keywords in the trigger condition tags. Based on the rule example described above, if the report body contains descriptions such as "the complainant suffered minor abrasions," this method determines that the trigger condition of "personnel injury" is met. Once the condition is met, the data in the corresponding additional required field tag is immediately read, dynamically adding the two new items, "injury report number" and "hospital name," to the required field list being built in memory.
[0068] An adaptive template matrix is constructed, containing a set of required field slots and format assertion rules. After completing all the above steps, this method combines the final list of required fields (in this example, it already includes basic and dynamically extended fields) with all format assertion rules parsed from the configuration file, ultimately constructing a complete adaptive template matrix in memory. It should be noted that the adaptive template matrix is a logical conceptual name, not specifically a two-dimensional numerical array in a mathematical sense. In actual physical storage and program implementation, this matrix is instantiated as a multi-layered nested structured configuration object (such as a hash table or JSON object structure) to construct a multi-dimensional mapping relationship between fields and rules.
[0069] The data structure specifically includes two core key-value pair dimensions: The first dimension is the set of required field slots (Key-List structure): its value is a list object. In the case report scenario in this example, the list dynamically includes five items: "reporter's name", "location of the incident", "description of lost items", "injury report number", and "name of the hospital treated". The system uses this to verify the completeness of the content. The second dimension is the format assertion rules (Key-Value structure): its value is a dictionary object that stores a series of "field ID-regular expression" correspondences. For example, one rule specifies that the content of the "reporter's ID number" field must match the standard 18-digit ID number format (such as ^\d{17}[\dX]$). The system uses this to verify the compliance of the content.
[0070] By constructing a content-driven adaptive template matrix, this method breaks away from the limitations of traditional "one-size-fits-all" fixed templates. It can dynamically adjust the required fields for validation based on the actual content of the document, greatly improving the accuracy of formal compliance validation and its adaptability to complex business scenarios.
[0071] Furthermore, the process of extracting target slotting entities from text content objects and filling them into corresponding slots in the adaptive template matrix, calculating the difference between the set of filled slots and the preset set of required items, and generating a formal compliance verification result specifically includes: using a conditional random field sequence labeling layer connected to the end of the text bidirectional encoder representation model to perform sequence decoding on the text content objects, calculating the global label sequence probability, locating the target slotting entities, and mapping the target slotting entities to the corresponding slots in the adaptive template matrix; using predefined regular expression assertion logic to verify the compliance of the filling format of the target slotting entities; performing set difference operations to calculate the difference between the set of filled slots and the preset set of required items in the adaptive template matrix; and generating a formal compliance verification result when the difference is not empty and the filling format violates the regular expression assertion logic.
[0072] Specifically, this process aims to use the adaptive template matrix constructed in the previous step as a "benchmark" to actually verify the text content. The specific process is as follows:
[0073] The text content objects are sequentially decoded using a Conditional Random Field (CRF) sequence labeling layer connected to the end of the bidirectional encoder representation model. Global label sequence probabilities are calculated to locate target slotting entities and map them to the corresponding slots in an adaptive template matrix. The core of this step is performing a named entity recognition task. The CRF sequence labeling layer is a probabilistic graphical model layer attached to the output of the bidirectional encoder representation model. Its role is to optimize the sequentiality of label prediction. The bidirectional encoder model generates a 768-dimensional feature vector rich in contextual information for each word in the text, but it is relatively independent in predicting the label of each word (e.g., "B-reporter's name", "I-reporter's name", "O"). The CRF layer, however, learns the transition probabilities between labels (e.g., the label "I-reporter's name" is highly likely to appear after "B-reporter's name", but almost impossible to appear after "O") to globally optimize the label sequence of the entire sentence. When the text content object is input into this composite model of "encoder + CRF", the CRF layer calculates the "globally optimal" label sequence with the highest probability for the entire sentence based on the Viterbi algorithm. For example, for the sentence "The complainant Zhang Mou said...", the optimal label sequence might be [O, O, O, B - complainant's name, I - complainant's name, O...]. Based on this, this method locates "Zhang Mou" as the target slot-filling entity for the slot "complainant's name" and stores it in a temporarily constructed set of filled slots in the form {"complainant's name": "Zhang Mou"}.
[0074] This method uses predefined regular expression assertion logic to verify the compliance of the filling format of the target slot entity. It iterates through the set of filled slots generated in the previous step. For each slot in the set, it checks if its slot name exists in the "Format Assertion Rules" section of the adaptive template matrix. If it does, it retrieves the corresponding regular expression. For example, if the text contains "reporter's ID number" as "123456789", this method will find the format rule for that slot in the template matrix and use that rule (a standard 18-digit ID number regular expression) to match the string "123456789". If the match fails, this method will record a format error message.
[0075] Perform a set difference operation to calculate the difference between the set of filled slots in the adaptive template matrix and the preset set of required fields. This step is used to check the completeness of the content. This method obtains the "set of required field slots" (i.e., all slots that should be there) in the adaptive template matrix and the "set of filled slots" (i.e., all slots that are actually there) found in the text. Then, perform a set difference operation, that is, remove all items that also exist in the "set of filled slots" from the "set of required field slots". The set obtained after the operation is the difference set, which represents all missing required fields that should have been filled but were not. For example, if the required field requires "location of the incident", but the entity cannot be extracted from the text, then "location of the incident" will appear in the final difference set.
[0076] A formal compliance check result is generated when the difference set is not empty and the input format violates the regular expression assertion logic. Finally, the results of the first two steps are summarized. If the difference set is not empty (indicating missing content), or if any error message is recorded in the format validation (indicating content format mismatch), this method will generate a structured formal compliance check result. This result is a data structure containing specific error descriptions, rather than a simple "pass / fail" statement. An example of its logical structure is shown below:
[0077] Verification status: Failed
[0078] Missing items list: Location of incident, injury report number
[0079] List of formatting errors:
[0080] Error entry:
[0081] Associated slot: Complainant's ID number
[0082] Extracted content: "123456789"
[0083] Error description: "Content does not conform to the predefined 18-digit ID number format"
[0084] By combining deep semantic models with CRF for accurate entity extraction and performing a systematic dual comparison of completeness and format with dynamically generated verification templates, this method can achieve high-precision and automated verification of document format standardization. Its detection capability far exceeds that of traditional methods that rely solely on keywords or fixed rules.
[0085] In a preferred embodiment, the process of extracting target slotting entities further includes outputting the extraction confidence score of each target slotting entity; the process of generating formal normalization verification results further includes: when the extraction confidence score of the target slotting entity is lower than a preset confidence threshold, generating a verification result indicating low-confidence filling; when a required slot in the adaptive template matrix is not filled in the initial extraction, retrieving the heuristic query rule associated with the missing slot from the dynamic rule base, performing a secondary targeted retrieval on the text content object, in order to attempt to locate and fill the missing slot.
[0086] Specifically, in order to improve the precision and detection rate of the verification results during the formal standardization verification process, the following enhanced process was adopted.
[0087] When the extraction confidence score of the target entity in the slot is lower than the preset confidence threshold, a verification result indicating low-confidence filling is generated. When using the encoder-CRF model for entity extraction, the Viterbi decoding algorithm of the CRF layer not only finds the optimal label sequence but also calculates the normalized conditional probability of that sequence. This probability value is used as the extraction confidence score. For example, for the text "...according to Wang Moumou at the scene...", the model might label "Wang Moumou" as "the complainant's name," but the calculated confidence score is only 0.65. When summarizing the verification results, since 0.65 is lower than the preset confidence threshold (e.g., 0.80), even if the slot is "filled," the system will still generate a warning verification result: "The confidence score of the content 'Wang Moumou' in the 'complainant's name' slot is low (0.65), and manual verification of his / her identity is recommended."
[0088] When a required slot in the adaptive template matrix is not filled in the initial extraction, a heuristic query rule associated with the missing slot is retrieved from the dynamic rule base, and a secondary targeted retrieval is performed on the text content object. If, after the first round of global extraction based on the deep learning model, the required field "location of the incident" is still found to be empty, the validation process will not immediately determine it as missing. It will query the dynamic rule base to find a heuristic query rule associated with the "location of the incident" slot label. For example, it might find a rule that reads, "Use regular expressions to find noun phrases in the text that end with 'road,' 'street,' 'neighborhood,' etc., near geographical indicators such as 'located in,' 'at,' 'address is,' etc."
[0089] Using this heuristic rule, a secondary target-oriented retrieval is performed on the text content object. This retrieval no longer relies on complex deep learning models, but instead uses efficient, rule-driven pattern matching to specifically search for text fragments in the entire text that conform to the above rules. If the text contains the sentence "...the accident occurred at the intersection of Zhongshan Road and Jiefang Road...", this targeted retrieval can successfully locate and extract "the intersection of Zhongshan Road and Jiefang Road" as the "location of the incident," thus filling in the slot missed in the initial extraction.
[0090] This solution upgrades entity filling verification from a binary judgment to a three-state (sure, uncertain, missing) evaluation that includes uncertainty handling, and improves recall through an active secondary probing mechanism, making the verification results more refined and robust.
[0091] Furthermore, referring to Figure 3 The process of inputting the visual content index vector and semantic index vector into a cross-modal gated arbitrator, performing vector similarity retrieval based on the Sigmoid activation function, and generating a semantic homology determination result specifically includes: the cross-modal gated arbitrator is configured with dynamic retrieval weight allocation logic based on data quality scores; the quality scores of the visual resource objects are processed using the Sigmoid activation function to calculate normalized visual retrieval weight coefficients; a vector weighted concatenation formula is constructed based on the visual retrieval weight coefficients to perform weighted fusion of the visual content index vector and the semantic index vector to generate a multimodal joint query vector, wherein the visual retrieval weight coefficients are positively correlated with the contribution of the visual content index vector in the fusion process; a K-nearest neighbor retrieval is performed in the vector space of the verified archive index using the multimodal joint query vector; the cosine similarity value between the multimodal joint query vector and the first nearest neighbor sample index returned by the retrieval is calculated, and the cosine similarity value is confirmed as the target similarity score for homology determination; when the target similarity score is higher than a preset homology determination threshold, a semantic homology determination result indicating content association is generated.
[0092] Specifically, this process aims to determine whether images and text in a document refer to the same semantic core, and its specific steps are as follows:
[0093] The cross-modal gated arbitrator described herein is a core computational process, not a standalone hardware unit. It incorporates a dynamic weight allocation logic based on data quality to intelligently determine whether textual or image information should be given more weight during semantic comparison. The first step of this process is to calculate a data quality score for the enhanced visual resource object. This score is derived by quantifying the image's sharpness, specifically by calculating the variance of the Laplacian operator of the image's grayscale. A higher variance value indicates that the image contains rich edges and details, resulting in high sharpness. Based on this physical characteristic, high variance represents a larger number of extractable effective semantic feature points and less interference from blurry noise. Therefore, the feature information extracted by the visual branch has higher confidence, resulting in a higher quality score (e.g., a score of 5.8). Conversely, a blurry or out-of-focus image has a lower variance value, indicating a corresponding decrease in the reliability of visual features and a lower quality score (e.g., a score of 1.2).
[0094] The quality score of the visual resource object is processed using the Sigmoid activation function to calculate the normalized visual retrieval weight coefficients. The original quality score obtained in the previous step (e.g., 5.8) has an indefinite range and is not convenient to use directly as weights. Therefore, this method inputs it into a standard Sigmoid activation function. This function maps any real number to the interval between 0 and 1. This mapping relationship makes the output of high-quality scores (larger positive values) approach 1, while the output of low-quality scores (negative values or close to zero) approaches 0. For example, a score of 5.8 may yield an output value of 0.99 after processing with the Sigmoid function. This value is the normalized visual retrieval weight coefficient, enabling the arbitrator to adaptively tilt the weights towards modalities with higher confidence and richer information during semantic comparison.
[0095] Based on the visual retrieval weight coefficients, a vector weighting concatenation formula is constructed to weight and fuse the visual content index vector and the semantic index vector to generate a multimodal joint query vector. Before this step, in order to eliminate the distribution differences in the heterogeneous modal feature space, the visual content index vector is first input into a linear mapping layer. This linear mapping layer contains a learnable parameter matrix, whose parameters are obtained through joint training. The specific training process is as follows: a training dataset containing positive and negative sample pairs is constructed. Positive sample pairs are selected from the same archived case report, i.e., the text description of the report and the scene photo embedded in the report. Negative sample pairs are generated using a "cross-document random combination" strategy, which pairs the text description of the current case report with visual resource objects randomly selected from other unrelated case reports (e.g., a text of a "theft case" and a scene photo of a "traffic accident case"). During joint training, the optimization objective is set to minimize the distance between positive sample pairs in the feature space and maximize the distance between negative sample pairs. Through this comparison of positive and negative samples, the parameters of the linear mapping layer are updated, forcing the model to learn that the vectors only have high similarity when the text and images describe the same case facts, thereby achieving accurate projection of visual features into the semantic space.
[0096] This fusion step is not a simple vector concatenation, but a dynamic weighted summation process based on aligned features. The specific calculation logic of the formula is as follows: First, multiply the value of each feature dimension in the visual content index vector after alignment by the linear mapping layer by the visual retrieval weight coefficient to obtain a weighted visual vector; simultaneously, calculate the difference between the value 1 and the visual retrieval weight coefficient, and multiply the value of each feature dimension in the semantic index vector by this difference to obtain a weighted semantic vector; finally, perform a bitwise accumulation operation on the corresponding dimensions of the weighted visual vector and the weighted semantic vector to generate a multimodal joint query vector with the same dimensions as the original vector (e.g., 768 dimensions).
[0097] The design intention of this dynamic weighting mechanism is to suppress noise: when the visual resource object is blurry or has a low quality score, the feature vector often contains a lot of non-semantic visual noise (such as noise and artifacts); by mathematically reducing its weight in the joint vector, it can effectively prevent low-quality visual information from misleading the retrieval results, thereby ensuring that when the image quality is poor, the system can automatically and smoothly transition to the homology judgment logic based on text semantics, thus ensuring the robustness of the algorithm.
[0098] The method utilizes the multimodal joint query vector to perform a K-nearest neighbor search in the vector space of a verified archival index. This verified archival index is a pre-built vector database storing a large number of historically verified "gold standard" documents with consistent text and image content and no logical errors. Each record in the database is a multimodal joint vector formed by fusing text and images. This method uses the multimodal joint query vector generated in the previous step as a query request to perform a K-nearest neighbor search in this vector database, setting the K value to 1, meaning it only searches for the most similar historical sample.
[0099] The method calculates the cosine similarity between the multimodal joint query vector and the index of the first nearest neighbor sample returned by the retrieval, and uses this cosine similarity value as the target similarity score for source identification. The retrieval operation returns the most similar historical sample vector in the database. The method then calculates the cosine similarity between the query vector and this returned vector. This similarity value is a floating-point number between -1 and 1; the closer the value is to 1, the more consistent the two vectors are in direction, i.e., the more semantically similar they are. This calculated cosine similarity value is directly adopted as the target similarity score.
[0100] When the target similarity score is higher than a preset homology threshold, a semantic homology determination result indicating content association is generated. This method compares the target similarity score obtained in the previous step with a preset homology threshold (e.g., 0.85). This threshold is an empirical value determined by those skilled in the art through testing on a validation set containing thousands of known "same" and "different" image-text samples, with the goal of maximizing the F1 score. If the score is higher than this threshold (e.g., a calculated score of 0.92), this method generates a semantic homology determination result stating "semantically homologous, high correlation"; otherwise, it generates a determination result stating "semantically mismatched, manual review recommended."
[0101] By introducing an image quality-based gating arbitration mechanism, this method can dynamically and intelligently integrate multimodal information, making the determination process of semantic homology between text and images consider not only the content itself, but also the credibility of the content. This enables a more robust and accurate judgment when faced with poor-quality visual evidence.
[0102] As a preferred embodiment, the process of generating semantic homology determination results further includes: extracting key entities and their descriptive terms related to physical objects from the text content object using a named entity recognition model; identifying all physical object regions in the visual resource object using an object detection model and generating corresponding region bounding boxes; establishing entity-region pairs by matching the category labels of the key entities and the physical-object regions; vectorizing the descriptive terms of the key entities for each entity-region pair and extracting local visual feature vectors from the region bounding boxes; calculating the local similarity score between the vector of the descriptive terms and the local visual feature vectors; and generating a semantic homology determination result indicating local semantic conflict when the local similarity score is lower than a preset local matching threshold.
[0103] Specifically, after the global semantic homology determination of "Report on the Situation of Case A.docx" is passed, this localized deep verification process will be initiated to further ensure the consistency of details.
[0104] By using a named entity recognition model to extract key entities related to physical objects and their descriptive modifiers from the text content object, a named entity recognition model finely tuned to the document corpus (e.g., based on a BERT+BiLSTM+CRF architecture) can process the text content "The complainant stated that a scratch was found on the right rear door of his black sedan." This model not only identifies the core entity "door," but also uses dependency parsing to bind it with the modifiers "black," "right rear," and "sedan," forming a structured entity description object.
[0105] The object detection model identifies all physical object regions within the visual resource object and generates corresponding region bounding boxes. An object detection model (e.g., YOLOv7), pre-trained on the COCO dataset and fine-tuned on a vehicle damage dataset, processes the scene photos in the report. The model outputs a set of detection results on the image, each containing a rectangular region bounding box (defined by the coordinates of the top-left and bottom-right corners), a class label, and a confidence score. For example, the output might be [bbox_1, label: "Front Bumper", score: 0.98], [bbox_2, label: "Right Rear Door", score: 0.95].
[0106] Based on the matching of the key entity with the category labels of the physical object region, entity-region pairs are established. The entity "car door" extracted from the text in the previous step is semantically matched with the category labels of all regions detected in the image. In this example, the text entity "car door" is highly matched with the label "right rear car door" of the image region bbox_2, thus establishing an entity-region pair ("car door", bbox_2).
[0107] For each entity-region pair, the descriptive terms of the key entity are vectorized, and local visual feature vectors are extracted from the region's bounding box. For the established pair ("door", bbox_2), the descriptive terms "black" and "right rear side" in the text are first converted into a 300-dimensional terminology feature vector using a pre-trained word vector model (such as Word2Vec). Then, local visual feature vectors are extracted only for the pixel region bounded by bbox_2 in the image. This local feature can be a multi-dimensional descriptor; for example, "black" can be represented by calculating the region's color histogram, and the region's shape and texture can be represented by feature point descriptors such as SIFT or ORB.
[0108] Calculate the local similarity score between the vector of the descriptive modifier and the local visual feature vector, and calculate the cosine similarity between the modifier feature vector generated in the previous step and the local visual feature vector to obtain a local similarity score. For example, if the color in the bbox_2 region is indeed mainly black and the shape conforms to the characteristics of a car door, then this score may be very high (e.g., 0.91).
[0109] When the local similarity score is lower than a preset local matching threshold, a semantic homology determination result indicating a local semantic conflict is generated. The calculated local similarity score (0.91) is compared with a preset local matching threshold (e.g., 0.75). If the score is higher than the threshold, the local detail verification passes. Conversely, if the text describes scratches on the "right rear door," but the photo only shows scratches on the "front bumper" (bbox_1) area, then after establishing the incorrect entity-region pair ("door," bbox_1) (this pair would not normally be established due to label mismatch; however, assuming the text only describes "vehicle scratches"), the extracted local visual features of bbox_1 will calculate a very low similarity with the semantic description vector of "right rear door," thereby accurately capturing this local factual conflict and generating a corresponding warning message.
[0110] This scheme reduces the granularity of cross-modal verification from the document level to the entity level, enabling it to accurately identify local core factual conflicts within a context of global semantic similarity, thus greatly improving the rigor and accuracy of semantic homology determination.
[0111] Furthermore, the process of converting text content objects into semantic fact triples and mapping them to a unified spatiotemporal coordinate system, and using these semantic fact triples as query subgraphs to detect conflicts and generate logical fallacy detection results based on ontology logical constraints in the domain knowledge graph, specifically includes: using a semantic quantization model to convert the unstructured time descriptions in the text content objects into mathematical closed intervals mapped to a unified spatiotemporal coordinate system, and assigning start and end timestamps to define the boundaries of the mathematical closed intervals; establishing a causal dependency tree containing logical dependencies in the domain knowledge graph; performing a logical consistency query in the domain knowledge graph based on the pre-dependency rules in the ontology logical constraints, and detecting whether the absolute timestamp of the successor event entity node in the query subgraph is earlier than the absolute timestamp of the pre-event event entity node; when the successor event entity node is detected to be earlier than the pre-event event entity node, generating a logical fallacy detection result indicating a temporal logical conflict; otherwise, generating a judgment result indicating that the content is not related.
[0112] Specifically, this process aims to verify whether the text content contains fallacies that contradict common sense in the domain, both factually and logically. The specific process is as follows:
[0113] A semantic quantization model is used to transform the unstructured time descriptions in the text content object into mathematically closed intervals mapped to a unified spatiotemporal coordinate system, and to assign start and end timestamps that define the boundaries of the mathematically closed intervals. First, all event descriptions and their associated time descriptions are extracted from the text content object. The semantic quantization model is a neural network model based on a sequence-to-sequence architecture. Specifically, the model adopts an encoder-decoder structure and integrates an attention mechanism. The encoder (e.g., based on Transformer or BiLSTM layers) is responsible for mapping the input unstructured natural language text into hidden state vectors containing contextual semantics. The attention mechanism is used to focus on the most relevant terms during decoding. The decoder, based on the hidden state vectors, progressively generates a string sequence conforming to a standard time format (e.g., "2023-03-20 00:00:00|2023-03-20 23:59:59").
[0114] This model, after supervised fine-tuning with a massive corpus of text containing unstructured time representations, is tasked with receiving a piece of natural language text (e.g., "The case was filed last Friday") and outputting a standardized time interval that fully covers the semantic range of that time. For example, if the current document was created on March 20th (Wednesday) of a certain year, the model would output a mathematically closed interval defined by the start and end timestamps for the input "last Friday". The unified spatiotemporal coordinate system is a linear time axis based on internationally standardized Unix timestamps (seconds since January 1, 1970). This model performs spatiotemporal mapping processing on core events identified in the text (such as "case filed" and "scene investigation"). Vague time descriptions related to these events in the text (such as "that evening" and "the next morning") are all converted into explicit numerical ranges in this coordinate system. For general logical statements without temporal attributes, no range mapping is performed to ensure the rigor of the verification logic. Finally, the core events and their quantified time ranges are combined into semantic fact triples, such as (event: case filed, time of occurrence, [1678982400, 1679068799]), thus mathematically defining the time boundaries of the events precisely. Here, the former is the number of seconds at 00:00:00 on the same day, and the latter is the number of seconds at 23:59:59 on the same day, thus mathematically defining the time boundary of the vague concept of "last Friday".
[0115] A causal dependency tree containing logical dependencies is established within the domain knowledge graph. This step describes the verification of the internal structure of the background knowledge base upon which it is relied. The domain knowledge graph is a pre-built, large-scale structured database used to store entities, concepts, and their interrelationships within the business domain. In the ontology layer of this knowledge graph, logical relationships that must be followed between events are predefined; these relationships constitute the so-called causal dependency tree or logical chain. For example, a core ontology logical constraint is defined: the "case filing" event must occur before the "case closing" event. This constraint is formalized in the graph as an edge with a "preceding" relationship, pointing from the "case filing" entity node to the "case closing" entity node. This rule is a precedence dependency rule.
[0116] Based on the prerequisite dependency rules in the ontology logical constraints, it is detected whether the absolute timestamp of the successor event entity node in the query subgraph is earlier than the absolute timestamp of the predecessor event entity node. The set of all semantic fact triples extracted from the current document in the first step is considered a query subgraph. Each event entity (e.g., "filing a case" and "closing a case") in this query subgraph is traversed. A query is performed in the domain knowledge graph to check if a prerequisite dependency rule exists between these entities. When the entities "filing a case" and "closing a case" are found, the knowledge graph returns a constraint that "(filing a case) precedes (closing a case)". According to this constraint, "filing a case" is identified as the predecessor event entity node, and "closing a case" is identified as the successor event entity node. Subsequently, the absolute timestamp intervals bound to these two event nodes are extracted from the query subgraph and compared. The verification logic is: the starting value of the timestamp interval of the successor event entity node must be greater than or equal to the ending value of the timestamp interval of the predecessor event entity node.
[0117] When a subsequent event entity node is detected to be earlier than the preceding event entity node, a logical fallacy detection result indicating a temporal logical conflict is generated; otherwise, a judgment result indicating that the content is not related is generated. If, in the comparison of the previous step, the timestamp of the "case closed" event is found to be earlier than the timestamp of the "case filed" event, a temporal logical conflict is determined to have occurred. At this time, a structured logical fallacy detection result is generated. This result is a data structure that records the nature of the error in detail. Its logical structure includes: an "error type" field with the value "temporal logical conflict"; a "conflict description" field with the value "the occurrence time of the subsequent event 'case closed' is earlier than its preceding event 'case filed'"; and a "related evidence" field, which lists the original time descriptions of "case closed" and "case filed" extracted from the text and their quantified timestamps, respectively. Conversely, if the timestamp of the "case closed" event is equal to or later than the timestamp of the "case filed" event, then this temporal logical check passes, and the temporal logical consistency is determined. In this situation, the system will not generate a logical error report for the event pair and will continue to detect other subsequent event pairs.
[0118] By quantifying unstructured textual temporal information and placing it in a unified coordinate system, and then using a pre-built domain knowledge graph for logical constraint verification, it becomes possible to automatically detect deep-seated, non-explicit temporal and causal fallacies, greatly improving the depth and accuracy of content verification.
[0119] In a preferred embodiment, the entity nodes in the domain knowledge graph also store probability distribution parameters of their associated numerical attributes; the process of detecting conflicts based on ontology logical constraints further includes: extracting combinations containing entities, attributes, and attribute values from the semantic fact triples; locating entity nodes in the domain knowledge graph and obtaining the probability distribution of the corresponding attributes; calculating the cumulative distribution function value or probability density function value of the attribute values in the semantic fact triples under the probability distribution of the entity attributes; and generating a logical fallacy detection result indicating a conflict between the attribute value and the entity common sense model when the calculated function value is lower than a preset common sense credibility threshold.
[0120] Specifically, after the temporal logic verification based on deterministic rules is completed, in order to further uncover any hidden contradictions in the text that may not conform to common sense, this probability-based deep logic verification process will be initiated.
[0121] Extract combinations containing entities, attributes, and attribute values from the semantic fact triples. The relation extraction model parses structured triples from the text "According to witnesses, a suspect weighing approximately 200 kilograms scaled over a 3-meter-high wall at the scene with his bare hands." These triples include (Suspect A, instance belongs to, adult male), (Suspect A, weight, 200 kilograms), and (Suspect A, completed the action, scaled over the wall), (wall, height, 3 meters).
[0122] The entity node is located in the domain knowledge graph, and the probability distribution of its corresponding attribute is obtained. The verification process handles the triple (Suspect A, weight, 200 kg). It first locates the entity "adult male" (the category to which Suspect A belongs) in the domain knowledge graph and queries the "weight" attribute of this entity node. Unlike traditional knowledge graphs, the "weight" attribute of this node is not only a label, but also stores a set of probability distribution parameters, for example, indicating that the attribute follows a normal distribution with a mean of 75 kg and a standard deviation of 10 kg. These parameters are generated by an offline data mining module. Specifically, this module periodically extracts entity attribute samples from public statistical yearbooks and historical case databases with high confidence, fits the normal distribution curve of each attribute value using the maximum likelihood estimation method, calculates the mean and standard deviation, and updates the attribute nodes in the knowledge graph.
[0123] Calculate the probability density function value of the attribute value in the semantic fact triplet, under the probability distribution of the entity attribute. The specific calculation process follows the probability density definition of the Gaussian distribution: First, calculate the difference between the attribute value in the triplet and the mean of the attribute in the knowledge graph, and then square the difference; then divide the squared value by twice the attribute variance, and take the negative exponentiation of the result; finally, multiply the result by a normalization coefficient based on the standard deviation to obtain the final probability density value. Taking the "weight" attribute as an example, the attribute value "200 kg" is substituted into the normal distribution probability density function of "adult male weight" obtained from the knowledge graph for calculation. Since the value of 200 kg deviates from the mean (75 kg) by more than 12 standard deviations, its calculation result (i.e., the function value) will be an extremely small floating-point number close to zero.
[0124] When the calculated function value is lower than a preset common sense credibility threshold, a statistical anomaly warning is generated indicating that the attribute value is questionable. Specifically, the probability density function value calculated in the previous step is compared with a preset common sense credibility threshold (e.g., a minimum value 1e-5 representing a probability of less than one in ten thousand). Since the calculated value is much lower than this threshold, although the system does not completely rule out the possibility that this extreme value exists in reality (i.e., an abnormal case in the long-tail distribution), according to Bayesian inference logic, the probability that the value belongs to "data entry error" (e.g., entering an extra zero) is much higher than the probability of "actual occurrence". Therefore, a soft verification result of "entity attribute statistical anomaly" is generated, with a detailed explanation: "The 'weight' attribute value (200 kg) of entity 'Suspect A' deviates extremely from the common sense distribution model of 'adult male', and there is a high risk of data entry error. It is recommended to manually review the accuracy of this value."
[0125] This scheme, by introducing probabilistic statistical constraints, extends the logical verification capability from detecting "absolutely impossible" hard conflicts to identifying "extremely unlikely" soft conflicts, significantly enhancing the ability to conduct in-depth reviews of the authenticity and rationality of content.
[0126] Furthermore, after generating a structured verification report from the summarized formal standardization verification results, semantic homology determination results, and logical fallacy detection results, the process further includes: when the structured verification report indicates that the verification has passed, triggering a state machine change instruction to mark the document publication status of the unstructured digital document as published; after the document publication status is marked as published, initiating an incremental index building mechanism to parse the unstructured digital document into structured index data and load it into a public retrieval database; the public retrieval database contains an inverted index table for keyword retrieval and a high-dimensional vector index table for vector retrieval.
[0127] Specifically, this process defines the automated downstream processing flow after verification, ensuring the effective application of the verification results. The specific flow is as follows:
[0128] First, the "formal standardization verification results," "semantic homology determination results," and "logical fallacy detection results" (including timing conflicts and information coverage deviations) generated from all the preceding steps are summarized. These scattered results are integrated into a unified, standardized data structure to form the final structured verification report. This report includes an overall verification status field (e.g., "verification passed" or "verification failed"), as well as a detailed list of results for each verification dimension.
[0129] When the structured validation report indicates that validation has passed, a state machine change instruction is triggered to mark the document publication status of the unstructured digital document as published. This step is a conditionally triggered process. The overall validation status field in the aforementioned structured validation report is checked. Subsequent operations are only performed if the value of this field is "Validation Passed," meaning that no errors were found in any validation items. At this time, a state machine change instruction is issued. The state machine change instruction is a programmatic call in the document management workflow, and its function is to update the status identifier in the metadata associated with the unstructured digital document. For example, it updates the document publication status from "Pending Validation" to "Published." The "Published" status indicates that the document has passed all quality reviews and can be considered a qualified, searchable official document.
[0130] After a document's publication status is marked as "published," an incremental index building mechanism is initiated to parse the unstructured digital document into structured index data and load it into a public retrieval database. Once the document status changes to "published," the incremental index building mechanism is automatically triggered. This mechanism is a data pipeline that processes only recently changed or added documents, rather than rebuilding the entire database, thus achieving efficient real-time updates. This mechanism will: 1) segment the document's text content and extract keywords; 2) directly obtain the 768-dimensional semantic index vector calculated in the previous step. These two parts of data together constitute the document's structured index data. Subsequently, this index data is loaded into the public retrieval database. The public retrieval database is a database system optimized for rapid information retrieval, centrally storing the indexes of all "published" documents.
[0131] The public retrieval database comprises an inverted index table for keyword retrieval and a high-dimensional vector index table for vector retrieval. Internally, this database consists of two core data structures: the first is the inverted index table, which maps keywords to a list of document IDs containing those keywords. This allows users to instantly locate all relevant published documents by inputting keywords such as "vehicle scratches." The second is the high-dimensional vector index table, a near-nearest neighbor search structure specifically designed for efficiently processing high-dimensional vectors (such as the 768-dimensional semantic index vector of this invention), for example, a graph-based index (such as HNSW) or quantized index (such as IVF-PQ). It allows users to use a natural language description as a query, which is then converted into a query vector, and the most semantically similar published documents are quickly found in this high-dimensional space, achieving intelligent "text-to-text" retrieval.
[0132] By automatically triggering incremental, multimodal index building after verification, this method not only ensures the quality of data entering the retrieval system, but also forms a complete closed loop from in-depth content verification to efficient knowledge retrieval, ensuring the accuracy, reliability, and availability of the public archive database.
[0133] In summary, the text intelligent verification method based on a hybrid model knowledge graph disclosed in this embodiment comprehensively constructs a three-in-one deep intelligent verification system integrating "form, semantics, and logic." By constructing a content-driven adaptive template matrix, it overcomes the limitations of traditional fixed rules in formal verification, achieving accurate and flexible verification of diverse documents. More importantly, by introducing a cross-modal gating arbitrator to dynamically weight and compare text and visual vectors, it effectively establishes a deep semantic relationship between images and text, solving the industry-wide challenge of verifying the consistency of heterogeneous data content. Furthermore, by mapping text content to a unified spatiotemporal coordinate system and placing it in a domain knowledge graph for ontology logic constraint detection, the verification dimension is unprecedentedly elevated from surface compliance to deep factual and causal authenticity. This method achieves comprehensive, automated, and high-precision verification of digital content from shallow to deep levels and from single-modality to cross-modality, and seamlessly connects to the incremental index construction process after successful verification, greatly ensuring the data quality and internal logic reliability of large-scale digital knowledge bases.
[0134] Example 2:
[0135] This invention provides a specific application of a text intelligent verification method based on a hybrid model knowledge graph. This embodiment aims to demonstrate, through a complete end-to-end process, the specific operational steps and technical details of this invention when processing a "preliminary traffic accident investigation report."
[0136] The method receives an unstructured digital document titled "Preliminary Report on a Vehicle Collision at an Intersection.pdf" for verification. This report contains a textual description of the accident and embeds photographs taken at the scene.
[0137] In the initial processing stage, the .pdf document is parsed and vectorized. The file format parsing engine identifies the document type as pdf by recognizing its "%PDF-" header and determines its document category as "traffic accident report" based on the filename keywords. Subsequently, the unstructured text parsing interface extracts the entire text (e.g., "...Car A was driving normally along the main road. When it reached the intersection, Car B exited from the side road, and the two vehicles collided, resulting in minor injuries to the driver of Car B...") and an embedded scene photo. After adaptive filtering enhancement, the photo and the text content are fed into a deep model. The text content, which includes metadata, is encoded into a 768-dimensional semantic index vector. The scene photo is then transformed into a 768-dimensional visual content index vector containing both local details and global layout information through a parallel convolution and transformer network.
[0138] Based on this, formal compliance verification was carried out. According to the category of "traffic accident reports," a specific verification rule was retrieved from the dynamic rule base. This rule defined "time of incident," "road segment of incident," and "license plate number of the vehicle involved" as mandatory basic fields, and set a dependency rule: if the text mentions "injured persons," then "name of the injured person" and "hospital taken to the hospital" must be added as mandatory fields. Because the report contained the description "driver of vehicle B suffered minor injuries," this dependency rule was successfully triggered, and the adaptive template matrix (logically, a configuration object containing dynamic slot constraints) ultimately required five mandatory fields. Subsequently, entity extraction was performed on the report text using an encoder-conditional random field model, successfully locating the content of the first four mandatory fields, but no information related to "hospital taken to the hospital" was found throughout the entire text. The system calculated the difference between the filled slots and the mandatory field slots, ultimately generating a formal compliance verification result, clearly indicating that there was a missing content, specifically "hospital taken to the hospital."
[0139] After confirming the basic compliance of the text and image content, the method further delves into cross-modal semantic verification. First, a semantic homology determination is performed to determine whether the text and photo describe the same event. The on-site photo, due to its high clarity, received a visual retrieval weight coefficient close to 1. Based on this, a multimodal joint query vector dominated by visual information is generated and searched in the verified archive index, finding a similar historical case with a cosine similarity as high as 0.92. This score is higher than the preset threshold, therefore the semantic homology determination result is "text and image content are semantically homologous."
[0140] Next, a temporal logic conflict detection was performed. Key events such as "Car A passed the stop line at the intersection at 15:02:05" and "Car B collided with Car A at 15:02:03" were extracted from the report. After mapping these time descriptions to a unified spatiotemporal coordinate system, constraint verification was performed using a domain knowledge graph. The pre-defined "vehicle collision" event in the knowledge graph cannot precede the ontology logic constraint of "the involved vehicle passed through the intersection," which was violated by the current text content (collision time...03 seconds is earlier than passage time...05 seconds). Therefore, a logic conflict detection result was generated, with the error type being "temporal logic conflict," accompanied by a detailed conflict description.
[0141] Finally, the results of all validation dimensions are summarized into a structured validation report. The overall status of the report is marked as "Validation Failed," and the reasons for the failure are clearly listed:
[0142] Regarding formal standardization: The required field "hospital for sending patients" is missing;
[0143] Regarding logical consistency: there is a timing logic conflict (the collision occurs before the pass).
[0144] Since the verification failed, the document status of this report will remain "pending verification" and will not enter the subsequent publishing and indexing process. Instead, it will be marked by the system and automatically returned to the relevant personnel for correction along with a detailed report.
[0145] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the scope of protection defined in the claims.
Claims
1. A text intelligent verification method based on a hybrid model knowledge graph, characterized in that, include: Receive and parse unstructured digital documents, separating text content objects and visual resource objects; Based on the bidirectional encoder representation model and the visual content index model, text content objects and visual resource objects are processed to generate semantic index vectors and visual content index vectors containing document classification metadata. Construct an adaptive template matrix based on document classification metadata; Specifically, this includes: parsing document classification metadata in semantic index vectors to determine the document's category; retrieving Extensible Markup Language (XML) configuration data matching the document's category from the dynamic rule base, and parsing the field dependency rules defined in the XML configuration data; when a preset trigger entity is detected in the text content object, dynamically expanding the set of required slots based on the field dependency rules associated with the entity, and constructing an adaptive template matrix containing the set of required slots and format assertion rules; extracting the target slot-filling entity from the text content object and filling it into the corresponding slot of the adaptive template matrix, calculating the difference between the filled slot set and the preset required slot set, and generating a formal standardization verification result. The visual content index vector and semantic index vector are input into a cross-modal gating arbitrator. Based on the Sigmoid activation function, vector similarity retrieval is performed to generate semantic homology determination results. The cross-modal gating arbitrator is configured with dynamic retrieval weight allocation logic based on data quality scores. The text content object is transformed into semantic fact triples and mapped to a unified spatiotemporal coordinate system; the semantic fact triples are used as query subgraphs to detect conflicts based on ontology logic constraints in the domain knowledge graph and generate logical fallacy detection results. The results of formal standardization verification, semantic homology determination, and logical fallacy detection are summarized to generate a structured verification report.
2. The text intelligent verification method based on hybrid model knowledge graph as described in claim 1, characterized in that, The process of receiving and parsing unstructured digital documents to separate text content objects and visual resource objects specifically includes: The unstructured digital document is an electronic document that contains text layer data and embedded visual resource objects in a single file and does not have a predefined data model. A file format parsing engine is used to identify the document type of the unstructured digital document, and the document type is written into the document classification metadata. An unstructured text parsing interface is used to extract the text layer data from the unstructured digital document, and the text layer data is encapsulated with the document classification metadata to form the text content object. The binary storage structure of the unstructured digital document is parsed to extract the embedded image data entities to form the visual resource object. The local data dispersion distribution of the visual resource object is calculated to determine the effective feature region and background noise region. Based on the region determination result, the filter kernel coefficients are dynamically adjusted to generate an enhanced visual resource object.
3. The text intelligent verification method based on a hybrid model knowledge graph according to claim 1, characterized in that, The process of processing text content objects and visual resource objects based on the bidirectional encoder representation model and visual content index model to generate semantic index vectors and visual content index vectors containing document classification metadata specifically includes: The text content object and the document classification metadata are jointly input into a transformer-based bidirectional encoder representation model for vectorization encoding to generate a semantic index vector that integrates metadata features. The visual resource object is input into the visual content index model. The visual content index model adopts a hybrid feature extraction architecture that combines convolutional neural networks and visual transformers. The convolutional neural network branch in the hybrid feature extraction architecture is used to extract the local high-frequency texture features of the visual resource object. At the same time, the visual transformer branch is used to capture the global spatial layout semantics of the visual resource object through a multi-head self-attention mechanism. Feature concatenation operation is performed on the local high-frequency texture features and the global spatial layout semantics to generate the visual content index vector.
4. The text intelligent verification method based on hybrid model knowledge graph as described in claim 1, characterized in that, The process of extracting target slot entities from text content objects and filling them into corresponding slots of the adaptive template matrix, calculating the difference between the set of filled slots and the preset set of required items, and generating formal standardization verification results specifically includes: The system utilizes a conditional random field sequence labeling layer connected to the end of the bidirectional text encoder representation model to perform sequence decoding on the text content object, calculate the global label sequence probability, locate the target slotting entity, and map the target slotting entity to the corresponding slot in the adaptive template matrix. It then uses predefined regular expression assertion logic to verify the compliance of the target slotting entity's filling format. Finally, it performs set difference operations to calculate the difference between the set of filled slots in the adaptive template matrix and the preset set of required items. When the difference is not empty and the filling format violates the regular expression assertion logic, it generates a formal compliance verification result.
5. The text intelligent verification method based on hybrid model knowledge graph as described in claim 1, characterized in that, The process of inputting the visual content index vector and the semantic index vector into the cross-modal gated arbitrator, performing vector similarity retrieval based on the Sigmoid activation function, and generating semantic homology determination results specifically includes: The quality score of the visual resource object is processed using the Sigmoid activation function to calculate a normalized visual retrieval weight coefficient. Based on the visual retrieval weight coefficient, a vector weighted concatenation formula is constructed to weight and fuse the visual content index vector and the semantic index vector to generate a multimodal joint query vector. The visual retrieval weight coefficient is positively correlated with the contribution of the visual content index vector in the fusion process. The multimodal joint query vector is used to perform a K-nearest neighbor search in the vector space of a verified archive index. The cosine similarity value between the multimodal joint query vector and the first nearest neighbor sample index returned by the search is calculated, and this cosine similarity value is used as the target similarity score for homology determination. When the target similarity score is higher than a preset homology determination threshold, a semantic homology determination result indicating content association is generated.
6. The text intelligent verification method based on hybrid model knowledge graph as described in claim 1, characterized in that, The text content object is transformed into a semantic fact triple and mapped to a unified spatiotemporal coordinate system; The process of using semantic fact triples as query subgraphs to detect conflicts and generate logical fallacy detection results based on ontology logical constraints in a domain knowledge graph specifically includes: The unstructured temporal description in the text content object is transformed into a mathematically closed interval mapped to a unified spatiotemporal coordinate system using a semantic quantization model, and a start and end timestamp are assigned to define the boundary of the mathematically closed interval. A causal dependency tree containing logical dependencies is established in the domain knowledge graph. Based on the pre-dependency rules in the ontology logical constraints, a logical consistency query is performed in the domain knowledge graph to detect whether the absolute timestamp of the successor event entity node in the query subgraph is earlier than the absolute timestamp of the predecessor event entity node. When the successor event entity node is detected to be earlier than the predecessor event entity node, a logical fallacy detection result indicating a temporal logical conflict is generated; otherwise, a judgment result indicating that the content is not related is generated.
7. The text intelligent verification method based on hybrid model knowledge graph as described in claim 1, characterized in that, After the summary of the normative verification results, semantic homology determination results, and logical fallacy detection results is used to generate a structured verification report, it also includes: When the structured verification report indicates that the verification has passed, a state machine change instruction is triggered to mark the document publication status of the unstructured digital document as published. After the document publication status is marked as published, an incremental index building mechanism is initiated to parse the unstructured digital document into structured index data and load it into a public retrieval database. The public retrieval database contains an inverted index table for keyword retrieval and a high-dimensional vector index table for vector retrieval.
Citation Information
Patent Citations
Multi-modal content generation method and system based on large model and knowledge graph driving
CN121233787A
Heterogeneous document set-oriented cross-modal semantic alignment and logic consistency verification system
CN121278157A