Knowledge retrieval data processing methods, devices, electronic equipment and storage media
By constructing local ontology slices for evidence verification at the document slice level and synthesizing reasoning on demand during queries, the high threshold for global ontology construction and error propagation in existing technologies are solved, achieving highly reliable and interpretable knowledge base retrieval and reasoning.
Patent Information
- Application Number
- CN202611005358.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-11-10
AI Technical Summary
Existing knowledge base question answering systems struggle to perform rigorous formal reasoning when dealing with complex unstructured documents, and the high barrier to entry for global ontology construction leads to low reliability of the reasoning process and a tendency for local errors to spread.
By employing micro-ontology slicing technology, local ontology slices for evidence verification are constructed at the document slice level and synthesized and reasoned on demand during queries. The retrieval and tracing data is output by combining evidence identifiers and source document slices, thus avoiding global merging.
It effectively suppresses the generation of illusory axioms without clear basis, controls the spread of errors, and improves the reliability and interpretability of knowledge base retrieval and structured reasoning.
Smart Images

Figure CN123068587A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to knowledge retrieval data processing methods, apparatus, electronic devices and storage media. Background Technology
[0002] Existing knowledge base question-answering systems typically employ vector retrieval, knowledge graph retrieval, or retrieval-enhanced generation to achieve question-answering and retrieval of document content. Among these technical solutions, vector retrieval primarily relies on semantic similarity to recall text fragments, while common attribute graph models are mainly used to represent entity and relational facts at the instance level. For scenarios requiring deeper logical expression, traditional ontology engineering typically employs a process of first pre-designing a stable and unified global ontology architecture, then populating instances and performing global inference.
[0003] However, in related technologies, simple vector retrieval struggles to handle rigorous formal reasoning problems such as transitive relations, type hierarchy, and mutual exclusion constraints. Furthermore, when automatically extracting knowledge using large language models, strong evidentiary constraints are often lacking, easily generating illusory axioms in documents without clear evidence. Moreover, the construction of a global ontology has a high threshold; if all extracted axioms are directly merged into a global ontology, local errors in the extraction of individual document fragments can easily lead to confusion in the global reasoning results of the entire knowledge base. Therefore, the reasoning processing scheme in related technologies that first designs a unified global ontology architecture and then populates examples suffers from low reliability in the reasoning process when dealing with complex and continuously growing unstructured documents. Summary of the Invention
[0004] This application provides a knowledge retrieval data processing method, apparatus, electronic device, and storage medium that can solve the above-mentioned technical problems.
[0005] To achieve the above objectives, a first aspect of this application proposes a knowledge retrieval data processing method, the method comprising: In response to a user query request, obtain a partial target document slice related to the user query request; Read the micro ontology slices and instance layer fact data corresponding to the partial target document slices, wherein the micro ontology slices are associated and stored as derived attributes of the corresponding document slices, and the micro ontology slices contain local schema layer ontology axioms that have passed the original text evidence verification, and each schema layer ontology axiom is bound to an evidence identifier used to indicate the source of the original text evidence in the corresponding document slice. Based on the preset standard identifier mapping relationship, the class identifier and attribute identifier in the micro ontology slice are normalized, aligned and synthesized to obtain a local ontology slice. Local closed-loop reasoning is performed within the scope of the local ontology slices corresponding to the partial target document slices and the instance layer fact data to obtain structured reasoning results; Based on the structured reasoning results, the associated source document slices, and the corresponding evidence identifiers, the retrieval and tracing data is obtained and output.
[0006] In some embodiments, before retrieving a partial target document slice related to the user query request in response to the user query request, the method further includes: Obtain the original document and parse and segment it into multiple document slices; Entity relations are extracted from each document slice to obtain the instance layer fact data; Based on the text content of each document slice, the corresponding instance layer fact data, and the preset restricted vocabulary, an initial micro-ontology slice containing multiple pattern layer ontology axioms is obtained. For each schema-layer ontology axiom in the initial micro-ontology slice, perform original text evidence verification, and add the schema-layer ontology axiom that passes the original text evidence verification to the micro-ontology slice of the corresponding document slice. Then, generate the association storage relationship of the derived attributes based on the micro-ontology slice and the corresponding document slice.
[0007] In some embodiments, performing original evidence verification on each schema-layer ontology axiom in the initial micro-ontology slice includes: For each of the aforementioned schema layer ontology axioms, obtain the candidate evidence text associated with the schema layer ontology axiom; The candidate evidence text is compared with the content of the corresponding document slice to obtain the content location test result. The semantic relevance is obtained by calculating the correlation between the candidate evidence text and the pattern layer ontology axiom. When the content location test result indicates that the content location test is passed, and the semantic relevance reaches a preset relevance threshold, the evidence identifier is generated based on the candidate evidence text. When the content positioning test result indicates that the content positioning test has failed, or when the semantic relevance has not reached the preset relevance threshold, the pattern layer ontology axiom will be discarded or marked as pending review.
[0008] In some embodiments, the step of performing local closed-loop reasoning within the scope of the local ontology slice corresponding to the partial target document slice and the instance layer fact data to obtain a structured reasoning result includes: Determine the axiom type of each of the schema-layer ontology axioms in the local ontology slice; Based on the axiom type, the axiom distribution in the local ontology slice is transformed into a calculation form to obtain a target calculation form, wherein the target calculation form is at least one of forward inference rules, hierarchical inference data, and constraint verification data. When the target calculation form includes at least one of the forward reasoning rule or the hierarchical reasoning data, topological expansion is performed based on the corresponding calculation form to obtain derived fact data. When the target calculation form includes the constraint verification data, a consistency check is performed on the instance layer fact data based on the constraint verification data to obtain the constraint conflict result. The structured reasoning result is obtained based on the derived factual data and / or the constraint conflict results corresponding to all the ontology axioms of the pattern layer.
[0009] In some embodiments, during the normalization, alignment, and synthesis processing of class identifiers and attribute identifiers in the micro-ontology slice, the method further includes: During the synthesis process, when a conflict of schema-level ontology axioms is detected between micro-ontology slices belonging to different document slices, the axiom content corresponding to the conflicting schema-level ontology axiom, as well as the associated source document slice and evidence identifier, are stored. Obtain the extraction confidence level and / or expert review status parameters corresponding to the conflicting schema layer ontology axioms; Based on the extraction confidence level and / or the expert review status parameter, the target main path axiom is determined from the conflicting schema layer ontology axioms, and the target main path axiom is used as the execution basis for the local closed-loop reasoning.
[0010] In some embodiments, when the received user query request is in natural language form, before performing local closed-loop reasoning within the scope of the local ontology slice corresponding to the partial target document slice and the instance layer fact data, the method further includes: The user query request is converted into candidate structured query statements using a large language model; Based on the class identifiers and attribute identifiers in the local ontology slices, a matching test is performed on the class identifiers and attribute identifiers referenced in the candidate structured query statements to obtain the identifier test results; When the identifier verification result fails, the query clauses containing unidentified identifiers in the candidate structured query statements are filtered to obtain filtered structured query statements, which are used for data retrieval and inference. The identifier verification results in the candidate structured query statement, representing the identifier data that failed the verification and the list of standardized identifiers, are fed back to the large language model to generate the target structured query statement.
[0011] In some embodiments, the method further includes: Obtain historical statistical data of the local pattern layer ontology axioms; The promotion score of the local pattern layer ontology axiom is obtained by calculating based on the historical statistical data. When the promotion score reaches the preset promotion condition, the corresponding local schema layer ontology axiom is marked as a global schema layer ontology axiom. The global schema layer ontology axiom is used to introduce the normalization alignment and synthesis process of class identifiers and attribute identifiers in the micro ontology slice, and the priority of the global schema layer ontology axiom is higher than that of the local schema layer ontology axiom in the micro ontology slice.
[0012] To achieve the above objectives, a second aspect of this application provides a knowledge retrieval data processing apparatus, the apparatus comprising: The response acquisition module is used to acquire a partial target document slice related to the user's query request in response to the user's query request; The reading module is used to read the micro ontology slices and instance-level fact data corresponding to the partial target document slices. The micro ontology slices are stored as derived attributes of the corresponding document slices. The micro ontology slices contain local schema-level ontology axioms that have been verified by the original text evidence. Each schema-level ontology axiom is bound to an evidence identifier that indicates the source of the original text evidence in the corresponding document slice. The local ontology slice determination module is used to perform normalization alignment and synthesis processing on the class identifiers and attribute identifiers in the micro ontology slice based on a preset standard identifier mapping relationship to obtain a local ontology slice. The local reasoning module is used to perform local closed-loop reasoning within the scope of the local ontology slice corresponding to the partial target document slice and the instance layer fact data to obtain structured reasoning results; The data retrieval generation module is used to obtain and output retrieval and tracing data based on the structured reasoning results, the source document slices associated with the structured reasoning results, and the corresponding evidence identifiers.
[0013] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the knowledge retrieval data processing method as described in the first aspect.
[0014] To achieve the above objectives, a fourth aspect of the present application provides a storage medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, implements the knowledge retrieval data processing method as described in the first aspect.
[0015] The knowledge retrieval data processing method, apparatus, electronic device, and storage medium proposed in this application include: First, in response to a user query request, obtaining a partial target document slice related to the user query request; then, reading the micro-ontology slice and instance-level fact data corresponding to the partial target document slice, wherein the micro-ontology slice is stored as a derived attribute of the corresponding document slice, and the micro-ontology slice contains local schema-level ontology axioms verified by the original text evidence, and each schema-level ontology axiom is bound to an evidence identifier indicating the source of the original text evidence in the corresponding document slice; next, based on a preset normative identifier mapping relationship, normalizing, aligning, and synthesizing the class identifiers and attribute identifiers in the micro-ontology slice to obtain a local ontology slice; then, performing local closed-loop reasoning within the scope of the local ontology slice and instance-level fact data corresponding to the partial target document slice to obtain a structured reasoning result; finally, based on the structured reasoning result, the source document slice associated with the structured reasoning result, and the corresponding evidence identifier, obtaining and outputting retrieval source data. This application's embodiments obtain micro-ontology slices and instance-level fact data corresponding to some target document slices when responding to queries. Furthermore, it sets that all schema-level ontology axioms in the micro-ontology slices must be verified through original text evidence and bound to corresponding evidence identifiers. This allows the system to acquire local semantic knowledge with strong evidence constraints without pre-constructing a unified global ontology architecture, effectively suppressing the generation of illusory axioms without clear basis during knowledge extraction. Further, by dynamically synthesizing local ontology slices based on standardized identifier mapping relationships during the query phase and performing closed-loop reasoning only within the local scope corresponding to the target slice, local extraction errors in a single document fragment do not propagate to the global reasoning space of the entire knowledge base, effectively controlling the error propagation boundary. Combined with evidence identifiers and source document slice output retrieval traceability data, the system can achieve formal reasoning with clear textual evidence without global merging when processing continuously growing unstructured documents, thereby improving the reliability and interpretability of the knowledge base retrieval and structured reasoning process.
[0016] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description
[0017] Figure 1 This is a flowchart of a knowledge retrieval data processing method provided in an embodiment of this application.
[0018] Figure 2 This is a flowchart of a micro-body slice update provided in another embodiment of this application.
[0019] Figure 3 yes Figure 2 The flowchart for step 204.
[0020] Figure 4 This is a schematic diagram of a process for miniature body slice extraction and evidence verification provided in another embodiment of this application.
[0021] Figure 5 This is a flowchart of a large language model feedback provided in another embodiment of this application.
[0022] Figure 6 This is a flowchart of conflict handling during the synthesis process provided in another embodiment of this application.
[0023] Figure 7 This is a schematic diagram of a closed-loop process for expert review and feedback of a micro-body slice provided in another embodiment of this application.
[0024] Figure 8 This is a schematic diagram of a cross-slice naming alignment process provided in another embodiment of this application.
[0025] Figure 9 yes Figure 1 The flowchart for step 104.
[0026] Figure 10 This is a schematic diagram of the process of local ontology slice synthesis and reasoning during querying, provided in another embodiment of this application.
[0027] Figure 11 This is a flowchart of the promotion process of ontology axioms provided in another embodiment of this application.
[0028] Figure 12 This is a schematic diagram illustrating the process of promoting a local ontology element to a knowledge base-level global ontology, provided in another embodiment of this application.
[0029] Figure 13 This is a schematic diagram of the overall process of a reasonable knowledge retrieval method based on document slice ontology provided in another embodiment of this application.
[0030] Figure 14 This is a schematic diagram of the structure of a knowledge retrieval data processing device provided in another embodiment of this application.
[0031] Figure 15This is a schematic diagram of the hardware structure of an electronic device provided in another embodiment of this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0033] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0035] Existing knowledge base question-answering systems typically employ vector retrieval, knowledge graph retrieval, or retrieval-enhanced generation to achieve question-answering and retrieval of document content. Among these technical solutions, vector retrieval primarily relies on semantic similarity to recall text fragments, while common attribute graph models are mainly used to represent entity and relational facts at the instance level. For scenarios requiring deeper logical expression, traditional ontology engineering typically employs a process of first pre-designing a stable and unified global ontology architecture, then populating instances and performing global inference.
[0036] However, in related technologies, simple vector retrieval struggles to handle rigorous formal reasoning problems such as transitive relations, type hierarchy, and mutual exclusion constraints. Furthermore, when automatically extracting knowledge using large language models, strong evidentiary constraints are often lacking, easily generating illusory axioms in documents without clear evidence. Moreover, the construction of a global ontology has a high threshold; if all extracted axioms are directly merged into a global ontology, local errors in the extraction of individual document fragments can easily lead to confusion in the global reasoning results of the entire knowledge base. Therefore, the reasoning processing scheme in related technologies that first designs a unified global ontology architecture and then populates examples suffers from low reliability in the reasoning process when dealing with complex and continuously growing unstructured documents.
[0037] Based on this, this application embodiment obtains micro-ontology slices and instance-level fact data corresponding to some target document slices when responding to queries. Furthermore, it sets that all schema-level ontology axioms in the micro-ontology slices must be verified through original text evidence and bound to corresponding evidence identifiers. This allows the system to obtain local semantic knowledge with strong evidence constraints without pre-constructing a unified global ontology architecture, effectively suppressing the generation of illusory axioms without clear basis during knowledge extraction. Further, by dynamically synthesizing local ontology slices based on normative identifier mapping relationships during the query phase and performing closed-loop reasoning only within the local scope corresponding to the target slice, local extraction errors in a single document fragment do not propagate to the global reasoning space of the entire knowledge base, effectively controlling the error propagation boundary. Combined with evidence identifiers and source document slices to output retrieval traceability data, the system can achieve formal reasoning with clear textual basis without global merging when processing continuously growing unstructured documents, thereby improving the reliability and interpretability of the knowledge base retrieval and structured reasoning process. The knowledge retrieval data processing method, apparatus, electronic device, and storage medium provided by this application embodiment will be further described below.
[0038] This application proposes a "sliced ontology" scheme. The system divides a document into multiple chunks, using each chunk as both a retrieval unit and a reasoning unit. After entity and relation extraction from each chunk, a corresponding micro-ontology fragment, called a micro-TBox, is further extracted. This micro-TBox contains class declarations, class hierarchies, attribute declarations, attribute features, constraint rules, alias information, and optional free-form axioms within the scope of that chunk. Each axiom is associated with evidence text or evidence location identifiers in the original text of that chunk.
[0039] Instead of being immediately merged into the global ontology during the storage phase, the micro-TBox is stored as a derived attribute of the chunk along with the chunk. Preferably, the system performs evidence verification on each ontology axiom before writing, retaining only ontology axioms whose evidence is locatable, verifiable, and associated with the main content of the axiom. Axioms that fail the evidence verification do not enter the subsequent local synthesis and reasoning process.
[0040] When a user asks a question, the system first retrieves relevant chunks through vector retrieval, keyword retrieval, or a hybrid retrieval method. It then loads only the micro-TBoxes and instance-level fact sets corresponding to these chunks. Subsequently, based on aliases, normalized mappings, and optional expert review results, multiple micro-TBoxes are normalized and named, synthesized into a local ontology slice specific to the current query. Finally, this local ontology slice is distributed and converted into inference rules, hierarchical inference data, and constraint verification data according to axiom types. Inference or constraint verification is performed only within the local scope corresponding to the relevant chunks, and the inference results, evidence sources, and conflict information are returned to the question-answering agent or the large language model.
[0041] The core of this scheme is not to establish a long-term, unified, and a priori complete global ontology, but rather to construct evidence-constrained ontology fragments at the document slice level and synthesize, reason, and interpret them on demand during queries. Compared to traditional global ontologies or GraphRAG which only focuses on instance facts, this scheme pushes the semantics of the TBox layer down to the chunk granularity. It controls the reasoning boundary, reduces error propagation, and lowers computational overhead through mechanisms such as "evidence verification first, no global merging during database entry, and local reasoning only on the recalled slices during queries," as described in detail below.
[0042] Reference Figure 1 This is an optional flowchart of the knowledge retrieval data processing method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps 101 to 105. It is also understood that this embodiment... Figure 1 The order of steps 101 to 105 is not specifically limited; the order of steps can be adjusted or certain steps can be added or removed according to actual needs. The knowledge retrieval data processing method provided in this application can be applied to any processing system with computing resources (such as servers, smart terminals, computing processors, etc.).
[0043] Step 101: In response to the user's query request, obtain a partial target document slice related to the user's query request.
[0044] Step 101 will be described in detail below.
[0045] In step 101 of some embodiments, when the processing system responds to a user query request, it first obtains a partial target document slice related to the user query request. Here, a target document slice (Chunk) refers to a text fragment obtained after parsing and segmenting the original document, which serves as the basic unit of granularity for retrieval and reasoning in this application.
[0046] Specifically, when a user query request is received from an external source, it is not processed indiscriminately across the entire document database. Instead, a preliminary retrieval mechanism is used to recall partial slices from the massive document data that are relevant to the semantics of the current query. Assuming that the total number of slices in the full knowledge base is N, the number of target document slices obtained is k. Typically, k is much smaller than N. This recall action essentially defines a finite initial data boundary for subsequent logical calculations.
[0047] Reference Figure 2 Before obtaining a partial target document slice related to the user's query request in response to the user's query request, the process also includes the following steps 201 to 204.
[0048] Step 201: Obtain the original document and parse and segment it into multiple document slices.
[0049] Step 202: Extract entity relations for each document slice to obtain instance-level fact data.
[0050] Step 203: Based on the text content of each document slice, the corresponding instance layer fact data, and the preset restricted vocabulary, an initial micro-ontology slice containing multiple pattern layer ontology axioms is obtained.
[0051] Step 204: Perform original evidence verification on each schema-level ontology axiom in the initial micro-ontology slice, add the schema-level ontology axiom that passes the original evidence verification to the micro-ontology slice of the corresponding document slice, and generate the association storage relationship of derived attributes based on the micro-ontology slice and the corresponding document slice.
[0052] Steps 201 to 204 are described in detail below.
[0053] In step 201 of some embodiments, before responding to a user query request, the system first obtains the original document and parses and segments the original document into multiple document chunks. The original document refers to unstructured long text data from diverse sources and with inconsistent structures within an enterprise or knowledge base. A document chunk is a finer-grained text segment obtained by dividing long text according to specific parsing rules (e.g., by semantic paragraph, fixed length, heading level, etc.).
[0054] In step 202 of some embodiments, entity and relation extraction operations are then performed on each independent document slice chunk, so that each document slice carries instance-level fact data that can characterize its local objective content. Instance-level fact data refers to a data set reflecting concrete, instantiated information in the document, including specific entities identified from the text, entity types, relationship types between entities (e.g., facts presented in triplet form), and relationships between entities.
[0055] In step 203 of some embodiments, based on the text content of each document slice chunk, the corresponding instance-level fact data, and a preset restricted vocabulary, an initial micro-ontology slice containing multiple schema-level ontology axioms is obtained. Here, a schema-level ontology axiom (TBox) refers to a structured declaration (e.g., class-level declaration, attribute transitivity, mutual exclusion constraints, etc.) used to define concept levels, attribute features, or logical constraints, and its abstraction level is higher than that of instance-level fact data; an initial micro-ontology slice (micro-TBox) refers to a schema-level knowledge fragment initially extracted within the local data scope of a single document slice; and a restricted vocabulary is a preset set of specifications used to constrain the micro-ontology slice extraction process, limiting the range of legal class identifiers and attribute identifiers that are allowed to be used.
[0056] Specifically, to ensure the uniformity of knowledge extraction, a restricted vocabulary is used as a boundary constraint. The original text of the corresponding document slice and the extracted instance layer fact data are combined to incrementally mine the logical rules and hierarchical relationships contained in the slice, thereby generating an initial micro-ontology slice. The initial micro-ontology slice micro-TBox includes one or more ontology axioms, and each ontology axiom is associated with evidence text or evidence location identifier.
[0057] The micro-TBox extraction module can be implemented using rule templates, machine learning models, large language models, or a combination thereof. Preferably, the chunk text, the entity list, the relation list, and the allowed type / relation lexicon are input into the large language model. The model is required to generate ontology axioms based solely on the chunk text and the extracted entity relations, and output structured JSON. The restricted lexicon (i.e., the type / relation lexicon) is used to constrain the range of class and attribute identifiers allowed during micro-TBox extraction. Its sources include, but are not limited to, one or more of the following: the extracted entity type and relation type sets in the instance layer fact set corresponding to the current chunk; the existing canonical_id set and its alias set in the current knowledge base; expert-predefined domain lexicon or industry standard terminology; and the set of class and attribute identifiers that have been promoted to knowledge base-level global TBoxes. The restricted lexicon is dynamically constructed or read from a cache each time a micro-TBox is extracted to ensure that the extraction results maintain naming consistency with the existing knowledge system.
[0058] To reduce model improvisation, the system can adopt the following constraints: class and attribute IDs are restricted to extracted entity types or relation types, or must point to existing types via aliases; each axiom must provide evidence; evidence must be a substring of the chunk original or a verifiable fragment; uncertain axioms must not be output; outputs with confidence levels below a threshold are not written; the failure of a single chunk extraction does not affect other chunks.
[0059] The following is an example of an optional large language model for extracting a prompt template. It is understood that those skilled in the art can adjust the specific wording and format according to actual needs: Input section: chunk_text: The original text content of the current chunk; entity_list: A list of extracted entities, in the following format: [{"name": "Alice", "type": "Engineer"}, {"name": "Bob", "type": "Manager"}]; relation_list: A list of extracted relations, in the format [{"subject": "Alice", "predicate": "reportsTo", "object": "Bob"}]; allowed_types: A list of allowed types in the restricted vocabulary, such as ["Employee", "Engineer", "Manager", "Visitor"]; allowed_relations: A list of allowed relations in the restricted vocabulary, such as ["reportsTo", "belongsTo", "manages"].
[0060] Example of prompt text: Based on the following chunk text, and combining the extracted entities and relations, generate the ontology axioms corresponding to the chunk. Requirements: (1) Generate only based on the original text, and do not add knowledge not mentioned in the original text; (2) The IDs of classes and attributes must come from allowed_types or allowed_relations, or point to existing types through aliases; (3) Each axiom must contain an evidence field, the value of which is a direct quote from the original text; (4) Do not output uncertain axioms; (5) Output the confidence level; (6) The output format is JSON, conforming to micro-TBoxschema.
[0061] Output format: A structured JSON object conforming to micro-TBoxJSONschema. The above prompt template is an example; those skilled in the art can adjust the prompt content, input format, and output constraints according to the capabilities of the specific large language model and application scenario.
[0062] In step 204 of some embodiments, original text evidence verification is performed on each schema-level ontology axiom in the initial micro-ontology slice, and the schema-level ontology axiom that passes the original text evidence verification is added to the micro-ontology slice of the corresponding document slice. A relational storage relationship of derived attributes is then generated based on the micro-ontology slice and the corresponding document slice. Here, original text evidence verification refers to a determination mechanism that verifies whether the initially extracted schema-level ontology axiom has clear and authentic original text as supporting evidence; the relational storage of derived attributes means that the micro-ontology slice does not exist as an independent global knowledge base node, but rather is attached to the corresponding document slice that generated it, forming a one-to-one mapping of subordinate storage structures.
[0063] In practice, the system performs evidence verification on each ontology axiom in the initial micro-ontology slice micro-TBox to determine whether the evidence associated with the axiom originates from the original content of the corresponding document slice chunk or its verifiable text fragment. When the evidence verification passes and the confidence level meets the threshold, only the ontology axiom that passes the evidence verification is written into the initial micro-ontology slice micro-TBox associated with the document slice chunk, and the initial micro-ontology slice micro-TBox is stored as a derived attribute of the ontology axiom chunk. During the data entry phase, the initial micro-ontology slice micro-TBoxes of different ontology axiom chunks are not merged into the global ontology. When the evidence verification fails or the confidence level is lower than the threshold, the corresponding axiom is discarded, excluded from subsequent reasoning processes, marked for review, or the initial micro-ontology slice micro-TBox is not stored, as described below.
[0064] Reference Figure 3 The original evidence verification is performed on each pattern layer ontology axiom in the initial micro ontology slice, including the following steps 301 to 305.
[0065] Step 301: For each schema layer ontology axiom, obtain the candidate evidence text associated with the schema layer ontology axiom.
[0066] Step 302: Compare the content location of the candidate evidence text with the content of the corresponding document slice to obtain the content location test results.
[0067] Step 303: Calculate the semantic relevance based on the candidate evidence text and the ontology axiom of the pattern layer.
[0068] Step 304: When the content location test result indicates that the content location test has passed and the semantic relevance has reached the preset relevance threshold, generate evidence identifiers based on the candidate evidence text.
[0069] Step 305: When the content positioning test result indicates that the content positioning test has failed, or the semantic relevance has not reached the preset relevance threshold, the schema layer ontology axiom is discarded or marked as pending review.
[0070] Steps 301 to 305 are described in detail below.
[0071] In step 301 of some embodiments, for each schema-layer ontology axiom, candidate evidence text associated with the schema-layer ontology axiom is obtained. Here, candidate evidence text refers to text fragments generated along with the schema-layer ontology axiom during the initial extraction phase, which initially serve as the basis for the axiom's validity. After obtaining the initial micro-ontology slice, each logical statement (i.e., schema-layer ontology axiom) is traversed, and the preliminary evidence field content bound to that axiom is extracted to serve as the basis for subsequent fact-checking.
[0072] In step 302 of some embodiments, the candidate evidence text is compared with the content of the corresponding document slice to obtain a content location verification result, in order to verify whether the candidate evidence text truly originates from the original document at the physical level. Specifically, this can be achieved by performing original text string inclusion matching or spanoffset comparison to check whether the candidate evidence text is a literal substring or a locatable text fragment in the original text of the corresponding document slice. After the comparison is completed, a corresponding content location verification result is generated to characterize whether the candidate evidence text has accurate position coordinates or literal mapping in the original text.
[0073] In step 303 of some embodiments, a semantic relevance calculation is performed based on the candidate evidence text and the schema-layer ontology axiom to obtain the semantic relevance degree. The semantic relevance degree is used to quantitatively evaluate the semantic support relationship between the candidate evidence text and the corresponding axiom at the logical level. Specifically, after verifying the physical location, the degree of relevance between the candidate evidence text and the subject, predicate, and object contained in the schema-layer ontology axiom is further calculated. By calculating the semantic similarity between the above elements or performing implication analysis, a quantified semantic relevance degree value is obtained to measure whether the candidate evidence text truly contains substantial semantic information that can derive the schema-layer ontology axiom.
[0074] In step 304 of some embodiments, when the content location verification result indicates that the content location verification has passed and the semantic relevance reaches a preset relevance threshold, an evidence identifier is generated based on the candidate evidence text. At this time, the pattern layer ontology axiom is determined to pass the original text evidence verification only if the candidate evidence text can be accurately located in the original document slice and has sufficient logical relevance to the axiom subject content. Then, a specific evidence identifier (e.g., a specific text fragment of the original text or precise start and end coordinates) is generated based on the candidate evidence text and bound to the corresponding pattern layer ontology axiom in the database as the source basis for the interpretability of subsequent reasoning results.
[0075] In step 305 of some embodiments, when the content location verification result indicates that the content location verification has failed, or the semantic relevance has not reached a preset relevance threshold, the schema-layer ontology axiom is discarded or marked as pending review. At this time, if the candidate evidence text cannot find a location mapping in the corresponding document slice (such as unsubstantiated content generated during automatic extraction by the large language model), or although the original text can be found but its semantics are insufficient to support the schema-layer ontology axiom, then the evidence verification is deemed to have failed. To prevent erroneous axioms without sufficient evidence from entering the subsequent reasoning and calculation process, no definitive evidence identifier is generated for them. Instead, the schema-layer ontology axiom is directly removed from the processing chain, or moved to the manual review queue and marked as pending review, for subsequent expert review and arbitration.
[0076] Reference Figure 4 This is a schematic diagram illustrating a process for miniature ontological slice extraction and evidence verification provided in an embodiment of this application. For example... Figure 4 As shown, in the initial stage of micro-ontology slice generation, the system uses the original content of the document slice (S201) as the basic data, combines it with the entity list (S202) and relation list initially extracted from the slice (S203), and performs the micro-ontology slice (micro-TBox) generation operation (S205) under the naming convention constraints of the restricted vocabulary (S204). Through this generation operation, the system can extract various structured schema-level ontology elements from the local document, specifically including class declarations (S206), attribute declarations (S207), axioms and constraints (S208), and alias information (S209).
[0077] After acquiring the ontology elements at the schema layer, the system enters the evidence association and rigorous verification phase. First, evidence binding is performed on each generated ontology element (S210), which associates each extracted element with its supporting text in the original document slice. Then, the system performs a crucial evidence verifiability judgment (S211) to verify whether the bound evidence text can be accurately located in the original text and possesses logical support. When the judgment result is yes (i.e., the evidence is verifiable), the corresponding verified ontology element is formally written and associated with and stored as a derived attribute of the document slice (S213). When the judgment result is no (i.e., the evidence is not verifiable), the corresponding ontology element is intercepted, discarded, has its confidence weight reduced, or marked as pending review (S212), thereby preventing unfounded and misleading information from entering the database.
[0078] After completing the aforementioned evidence verification and triage process, the system will further record the evaluation parameters of the extraction process, specifically including the confidence level of the extracted axioms and the specific extraction time (S214). This recording step provides the necessary data auditing basis for subsequent possible version rollback, algorithm A / B testing, and expert manual review.
[0079] The following is a code example for a micro-TBox, a micro-body slice.
[0080] JSON { "chunk_id": "chunk_42", "confidence": 0.86, "classes": [ { "id": "Engineer", "label": "Engineer", "subClassOf": ["Employee"], "aliases": ["Software Engineer", "SoftwareEngineer"], "evidence": "Engineers are employees who are responsible for system design and implementation." } ], "properties": [ { "id": "reportsTo", "label": "Report to", "domain": "Employee", "range": "Manager", "characteristics": ["transitive"], "evidence": "Team members report to their superiors level by level." } ], "shapes": [ { "targetClass": "Employee", "property": "employeeId", "minCount": 1, "maxCount": 1, "datatype": "string", "evidence": "Each employee should have a unique employee number." } ], "axioms": [ { "text": "Engineers and external visitors belong to different role categories." "kind": "disjointWith", "subject": "Engineer", "object": "Visitor", "evidence": "Engineers are internal employees, visitors are external temporary visitors." } ] } Through steps 301 to 305 above, each schema-layer ontology axiom entering the final micro-ontology slice must not only have a clear physical textual source in the corresponding document slice, but also have strong logical semantic support. This effectively intercepts false axioms that lack original textual basis or have semantic biases outside the knowledge storage stage, thereby suppressing the knowledge illusion phenomenon that is prone to occur when using large language models to extract unstructured documents, and ensuring the rigor and objectivity of the logical rules retained in the micro-ontology slice.
[0081] Through steps 201 to 204 above, by introducing a restricted vocabulary mechanism and strict original text evidence verification gating during the offline knowledge storage stage, the consistency of local ontology concept naming is ensured while effectively suppressing the unfounded illusion problem that large language models are prone to in the knowledge extraction stage. In addition, by adopting a strategy of storing micro-ontology slices as derived attributes independently rather than implementing global merging during storage, the logical ontology not only has the efficient iterative capability of local reconstruction following document slice updates, but also controls the propagation boundary of potential local information extraction errors within a single slice. This lays a structured data foundation for controlled local synthesis and highly reliable reasoning in the subsequent online query stage.
[0082] Step 102: Read the micro ontology slices and instance-level fact data corresponding to the partial target document slices. The micro ontology slices are stored as derived attributes of the corresponding document slices. The micro ontology slices contain local schema-level ontology axioms that have been verified by the original text evidence. Each schema-level ontology axiom is bound to an evidence identifier that indicates the source of the original text evidence in the corresponding document slice.
[0083] Step 102 is described in detail below.
[0084] In step 102 of some embodiments, after responding to a user query request, the micro ontology slice and instance layer fact data corresponding to a portion of the target document slice are read. The micro ontology slice is stored as a derived attribute of the corresponding document slice. The micro ontology slice contains local schema layer ontology axioms that have passed the original text evidence verification, and each schema layer ontology axiom is bound to an evidence identifier that indicates the source of the original text evidence in the corresponding document slice.
[0085] Among them, micro-ontology slices (micro-TBox) refer to local ontology fragments formed by breaking the traditional global ontology architecture, sinking the semantics of the schema layer (TBox) and anchoring it to the granularity of a single document slice; instance layer fact data (ABox) refers to the set of entities and relationships between entities extracted from the corresponding slice; local schema layer ontology axioms refer to the structured logical declarations contained in micro-ontology slices used to define class hierarchy, attribute features or constraint rules; and evidence refers to the text substrings or position offset information used to locate the specific supporting source of the above ontology axioms in the original text.
[0086] In this process, only the micro-TBox and instance-level fact set corresponding to one or more target chunks are read. Priority is given to reading expert-approved micro-TBoxes; if no approved version exists, the original micro-TBox is read. This reading process is limited to the target document slice set. Micro-ontology slices are not aggregated into a large global ontology model, but rather maintained as independent associated storage states with their respective document slices in the form of derived attributes. It is assumed that each target document slice carries an average of m local schema-level ontology axioms and p instance-level fact data, thus converging the actual reading volume to k×m axioms and k×p facts. Furthermore, the read local schema-level ontology axioms are all in a state that has been gated and filtered by evidence verification; that is, the validity of each axiom is physically supported by its bound evidence identifier, thereby excluding fictitious information without clear document basis at the input source.
[0087] Step 103: Based on the preset standard identifier mapping relationship, normalize, align and synthesize the class identifiers and attribute identifiers in the micro ontology slice to obtain the local ontology slice.
[0088] Step 103 will be described in detail below.
[0089] In step 103 of some embodiments, the class identifiers and attribute identifiers in the micro-ontology slices are then normalized, aligned, and synthesized based on a preset canonical identifier mapping relationship to obtain local ontology slices. Here, the canonical identifier mapping relationship refers to a data structure used to solve the naming drift problem of synonymous concepts across document slices, which records the equivalent pointers between various heterogeneous aliases and canonical identifiers (canonical_id); a local ontology slice refers to a connected semantic network temporarily aggregated and spliced together from multiple fragmented micro-ontologies only in response to the current single user query.
[0090] After obtaining k isolated micro-ontology slices, to ensure that classes and attributes referring to the same semantic features in different slices can cooperate in subsequent logical deduction, a unified replacement of heterogeneous class and attribute identifiers in each slice's micro-TBox is performed using a canonical identifier mapping relationship (i.e., the mapping from alias to canonical_id). Subsequently, physical synthesis is performed on the multiple normalized and aligned micro-ontology slices in memory space to construct a local ontology slice specific to the current query context. During the synthesis process, the original local schema layer ontology axioms and their binding mapping relationships with their source document slice chunks, conflict relationships, reasoning links, and evidence identifiers are all fully preserved to provide structural guarantees for subsequent reverse tracing.
[0091] In one example, during the identification normalization alignment and synthesis process, the system first loads the pre-stored alias-to-canonical identifier mapping data (canonical_map) and uses it as a reference for unified semantics. For the micro-ontology slices corresponding to the multiple recalled target document slices (chunks), the system traverses the class identifiers and attribute identifiers carried within them, and transforms heterogeneous aliases referring to the same concept in different slices into globally unified canonical identifiers (canonical_id) through the above mapping relationship, thereby eliminating interoperability barriers caused by naming drift at the semantic level. Subsequently, the normalized ontology axioms, class hierarchy relationships, attribute definitions, and constraint rules are aggregated into the current query context memory space, and a physical ontology merging operation is performed to construct a local ontology slice containing a complete dependency chain. During this synthesis process, if logical conflicts are detected between ontology axioms from different sources, the system prioritizes the axiom path based on preset extraction confidence or expert review status parameters, generating a semantically connected and logically consistent local ontology slice that can be directly called by the local closed-loop inference engine.
[0092] The slice synthesis module is executed during the query phase and specifically includes: determining the chunk set based on the search results; batch reading the micro-TBoxes of the chunks; prioritizing expert-reviewed versions; loading the knowledge base-level canonical mapping and global TBox; performing normalization on each class and attribute; adding source namespaces or proofances to the IRIs of different chunks; merging axioms and recording conflicts; and outputting the synthesized local ontology slices.
[0093] The following is a code example for canonical mapping.
[0094] JSON { "tenant_id": 1, "knowledge_base_id": "kb_a", "alias": "Software Engineer", "canonical_id": "Engineer", "kind": "class", "confidence": 0.94, "source": "expert_merge } Reference Figure 5 When the received user query request is in natural language form, before performing local closed-loop reasoning within the scope of local ontology slices and instance layer fact data corresponding to some target document slices, the method further includes the following steps 501 to 504.
[0095] Step 501: Use a large language model to convert user query requests into candidate structured query statements.
[0096] Step 502: Based on the class identifiers and attribute identifiers in the local ontology slices, perform matching checks on the class identifiers and attribute identifiers referenced in the candidate structured query statements to obtain the identifier check results.
[0097] Step 503: When the identifier verification result fails, filter the query clauses containing unidentified identifiers in the candidate structured query statements to obtain filtered structured query statements. The filtered structured query statements are used for data retrieval and inference.
[0098] Step 504: Feed the list of identifiers that failed the validation and the list of standardized identifiers in the candidate structured query statement back to the large language model to generate the target structured query statement.
[0099] Steps 501 to 504 are described in detail below.
[0100] When the user inputs a natural language question, the system can use a large language model to convert the natural language into a structured query or candidate inference plan. The system should perform lexical and security checks on the generated structured query to ensure that it can only reference classes, attributes, and instances existing in the current local ontology slice. Subsequently, the symbolic inferencer executes the query or validation, and the large language model interprets the result into natural language, as described below.
[0101] In step 501 of some embodiments, a large language model is used to convert the user query request into candidate structured query statements. Here, natural language refers to the unstructured, informal text content entered by the user in daily interactions; candidate structured query statements refer to the graph or rule-based query expressions obtained by semantically parsing the unstructured text and converting it to conform to the execution specifications of the underlying logic engine. Specifically, when the received query request is in natural language form, the underlying symbolic reasoning engine often finds it difficult to process it directly. Therefore, a large language model is introduced as a semantic intent parser to convert it into a structured expression containing specific class and attribute associations.
[0102] Given that large language models have a high degree of logical freedom during the generation stage, the resulting query statements have not yet been verified against the factual boundaries of the current document knowledge base, which poses a risk of referencing fictitious concepts.
[0103] In step 502 of some embodiments, the class and attribute identifiers referenced in the candidate structured query statement are then matched and verified based on the class identifiers and attribute identifiers in the local ontology slice to obtain the identifier verification result. Since the large language model may generate ontology axioms or attribute definitions not explicitly stated in the current document, before executing actual reasoning, the identifiers of various elements referenced in the candidate structured query statement are extracted and compared with the currently dynamically synthesized set of usable class and attribute identifiers in the local ontology slice. This allows for the determination of whether the logical path relied upon by the candidate query is fully covered within the current local restricted knowledge domain through the vocabulary-level and security-level matching operation, and generates an identifier verification result indicating whether the representation verification passed or failed.
[0104] In step 503 of some embodiments, when the identifier verification result fails the characterization verification, query clauses containing unidentified identifiers in the candidate structured query statements are filtered to obtain filtered structured query statements. These filtered structured query statements are used for data retrieval and inference. Here, a query clause refers to a local logical derivation condition extracted from a structured query statement; a filtered structured query statement refers to the remaining secure query expression after downgrading and trimming. Specifically, when an unidentified identifier not covered by the current local ontology slice is identified in a candidate structured query statement, the query request is not completely rejected. Instead, query clauses containing these fictitious or abnormal identifiers are precisely located and removed. Only the valid clauses that pass the verification are retained to form filtered structured query statements. This ensures that subsequent inference operations are only executed in a controlled manner along identifiable compliant knowledge paths, thereby providing partial factual derivations while ensuring the rigor of the results.
[0105] In step 504 of some embodiments, the identifier verification results in the candidate structured query statement represent the identifier data that failed verification and the list of standardized identifiers, which are then fed back to the large language model to generate the target structured query statement. The list of standardized identifiers refers to the set of usable class and attribute identifiers that actually exist in the current local ontology slice and have been verified by evidence; the target structured query statement refers to the compliant query expression output after correction and retry. Specifically, the identified non-compliant identifier data (i.e., the elements that failed verification generated by the large language model), along with the list of standardized identifiers allowed in the current local environment, are fed back to the large language model as repair constraints. This is to guide the large language model to regenerate the structured query within the limited identifier set by imposing explicit constraints on the range of usable vocabulary, until a target structured query statement conforming to the specifications is output, ensuring that the query logic is aligned with the physical architecture of the current local ontology slice.
[0106] In one example, when a candidate structured query generated by the large language model fails the vocabulary check or security check, the system executes the fallback strategy in the following order of priority, as described below.
[0107] Identifier Repair and Retry: The system returns the failed identifiers along with a list of available identifiers in the current local ontology slice to the large language model, requiring it to regenerate candidate queries within the range of available identifiers. The number of retries shall not exceed a preset threshold (e.g., 3 times).
[0108] Degradation to partial inference: If the query still contains unrecognizable identifiers after retrying, the system will remove the query clauses containing unknown identifiers, perform inference only on the recognizable parts, and mark "partial inference" and the reason for the removed clauses in the results.
[0109] Downgrade to text retrieval: If no executable inference clauses are available after removal, the system will downgrade the original natural language query to a vector retrieval or keyword retrieval process, and display the message "The current query cannot be converted into structured inference and has been downgraded to text retrieval" in the results.
[0110] This fallback strategy ensures that the system can still return usable results when candidate queries are of insufficient quality, while avoiding inference for queries containing unverified identifiers. In this process, the large language model is only used to generate candidate queries, candidate explanations, or repair suggestions; the final factual conclusions are confirmed by the inference engine or constraint validator.
[0111] Through steps 501 to 504 above, when processing complex question-answering requests in natural language form, the candidate structured query statements generated by the large language model are placed under the identification verification of local ontology slices, effectively intercepting illusionary logical substitutions that are detached from actual document basis. At the same time, combined with the adaptive backoff strategy of abnormal clause filtering and pruning and feedback retry with available standard vocabulary, the safe convergence of the natural language to structured query process is ensured. This allows the system to stably limit the query task to an objective and verifiable local semantic space even when faced with questions that exceed the local knowledge boundary, thereby improving the overall question-answering reliability and factual accuracy when generative models and symbolic inferencers are used in combination.
[0112] During the slicing process, micro-TBoxes from different chunks may contain contradictory or inconsistent axioms. Therefore, the following typical conflict scenarios can be identified and handled according to the corresponding strategies in this application, as described in detail below.
[0113] In addition, refer to Figure 6 In the process of normalizing, aligning and synthesizing class identifiers and attribute identifiers in micro-ontology slices, the method also includes the following steps 601 to 603.
[0114] Step 601: During the synthesis process, when a conflict of schema-level ontology axioms is detected between micro-ontology slices belonging to different document slices, the axiom content corresponding to the conflicting schema-level ontology axioms, as well as the associated source document slices and evidence identifiers, are stored.
[0115] Step 602: Obtain the extraction confidence and / or expert review status parameters corresponding to the conflicting schema layer ontology axioms.
[0116] Step 603: Based on the extracted confidence level and / or expert review status parameters, determine the target main path axiom from the conflicting schema layer ontology axioms. The target main path axiom is used as the execution basis for local closed-loop reasoning.
[0117] Steps 601 to 603 are described below.
[0118] In step 601 of some embodiments, during the synthesis process, when a schema-level ontology axiom conflict is detected between micro-ontology slices belonging to different document slices, the axiom content corresponding to the conflicting schema-level ontology axiom, along with the associated source document slice and evidence identifier, is stored. A schema-level ontology axiom conflict refers to the discovery of contradictory logical declarations regarding the same entity concept or attribute when dynamically merging micro-ontology slices (micro-TBoxes) from multiple different document slices (Chunks) into a local ontology space. Examples include class-level conflicts (e.g., slice A declares a concept as a subclass, while slice B declares the concept as a subclass of another mutually exclusive class) or attribute feature conflicts (e.g., slice A declares a relation as transitive, while slice B declares it as non-transitive). Faced with such contradictions caused by inconsistencies in the underlying unstructured documents or differences in local extraction cognition, instead of a simple approach of direct overwriting or error blocking, the contents of the schema-level ontology axioms of both parties involved in the conflict are fully preserved in the memory synthesis space. At the same time, source document slices and corresponding evidence identifiers that are strictly bound to these conflict axioms are also stored to maintain the integrity of the underlying factual basis and to preserve sufficient physical traceability for subsequent conflict arbitration and the output of conflict notifications.
[0119] In step 602 of some embodiments, the extraction confidence level and / or expert review status parameter corresponding to the conflicting schema layer ontology axioms are obtained. The extraction confidence level refers to the probability assessment value generated by the model for the axiom during the initial micro-ontology extraction in the offline phase, used to quantify the reliability of the axiom's expression. The expert review status parameter refers to the independent review version identifier formed by whether the axiom has undergone intervention (such as acceptance, modification, or merging) by domain experts during the historical governance cycle. To resolve the axiom conflict problem, metadata from both dimensions is extracted and used as the arbitration basis for judging the authority and reliability of axiom knowledge.
[0120] In step 603 of some embodiments, a target main path axiom is determined from the conflicting schema-layer ontology axioms based on the extracted confidence level and / or expert review status parameters. This target main path axiom serves as the execution basis for local closed-loop reasoning. The target main path axiom refers to the authoritative logical rule that is ultimately selected from multiple conflicting axioms to enter the symbolic reasoning engine and actually participate in subsequent derivation calculations. The specific arbitration determination process follows a specific priority logic: if an axiom among the conflicting axioms has an expert review status parameter (i.e., a manually confirmed reviewed version), it is given the highest priority and selected as the target main path axiom; if neither party to the conflict has been reviewed by experts, their extracted confidence levels are compared, and the party with the higher confidence level is selected as the target main path axiom. Once the main path is determined, the axiom of the target main path is used as the rule constraint basis for subsequent execution of local closed-loop reasoning. Other conflicting axioms that are not selected are marked as bypass conflict information, which can be further incorporated into the heterogeneous pending review queue or attached to the retrieval and traceability data for output to indicate that there is a knowledge dispute in the current reasoning result.
[0121] In one example, a class hierarchy conflict occurs. Chunk_A's micro-TBox declares EngineersubClassOfEmployee, while chunk_B's micro-TBox declares EngineersubClassOfContractor. The handling strategy is to retain both axioms and their respective source chunks and evidence identifiers, marking them as a hierarchy conflict in the synthesized result. The reasoning module can make decisions based on the following priorities: (1) If a reviewed version exists, the reviewed version prevails; (2) If neither has been reviewed, the one with higher confidence is used as the main reasoning path, and the one with lower confidence is marked as pending review; (3) The conflict information is passed to the result interpretation module, indicating a contradiction in the final answer.
[0122] In another example, a conflict arises regarding attribute characteristics. Chunk_A declares `reportsTo` as a transitive attribute, while chunk_B declares `reportsTo` as a non-transitive attribute. The handling strategy is as follows: the version reviewed by experts prevails; if neither has been reviewed, the version with the higher confidence level prevails, and the conflict is marked as pending review and added to the expert review queue. Until the conflict is resolved, the inference module may choose to perform inference based on the more conservative non-transitive assumption, noting in the results that transitivity is in dispute.
[0123] In another example, a conflict arises between a mutual exclusion declaration and an instance-level conflict. Chunk_A declares `EngineerdisjointWithManager`, but an entity in the instance-level fact set is simultaneously marked as `Engineer` and `Manager`. The handling strategy is to output the conflict as a constraint violation report, along with the source chunk and evidence of the mutual exclusion declaration, and the source chunk of the violating instance. The system does not automatically delete either declaration or instance fact; instead, expert review or a question-and-answer agent determines the appropriate course of action.
[0124] Through steps 601 to 603 above, in the dynamic synthesis of local ontology slices during the query phase, since the micro-ontology slices are independently extracted from discrete unstructured document slices, differences or local contradictions in cross-slice knowledge representation are normal. This solution effectively avoids the interruption or complete breakdown of the reasoning process caused by encountering local logical conflicts by storing conflicting axioms and their underlying evidence chains in parallel in memory space, and by using objective extraction confidence or higher-priority expert review status for smooth selection of the main reasoning path. Figure 1 The robustness of the data processing architecture is enhanced so that, even in noisy and contradictory real-world business scenarios, it can still output structured reasoning results with clear derivation basis, thus improving the robustness of the entire knowledge retrieval and reasoning system.
[0125] Reference Figure 7 This is a flowchart illustrating a closed-loop process for expert review and feedback of micro-ontology slices provided in this application embodiment. During the knowledge base governance process, the system first acquires the micro-ontology slice (micro-TBox) elements to be processed (S501) and performs priority calculation on these elements (S502). Specifically, the system filters out micro-ontology slice elements that meet specific conditions such as low extraction confidence, frequent cross-slice conflicts, insufficient underlying evidence, or high frequency of user queries, and pushes them into the background review queue (S503). Subsequently, these elements with potential knowledge disputes or high value are visualized to domain experts through the expert review UI (S504), allowing experts to view the original evidence and conduct manual review and intervention.
[0126] After displaying the elements to be reviewed through a visual interface, the system receives specific review actions issued by experts for each element (S505). Based on the experts' different business decisions, the system executes corresponding branching logic: when receiving an "Accept" operation, the system marks the corresponding ontology element as approved (S506); when receiving a "Reject" operation, it marks it as rejected (S507); when receiving an expert's "Edit" modification operation, the system generates an independent reviewed version based on the modifications (S508); and when receiving a "Merge" operation for synonymous concepts between different slices, the system uses the result of the merging operation as a normalized mapping rule and writes it into the canonical mapping table (S09). All results generated by the above manual review operations are stored independently to avoid directly overwriting the original extraction results, thus ensuring the physical traceability of the underlying data.
[0127] After completing the review actions for each of the above branches, the system will uniformly generate and record the corresponding audit logs (S510) to retain the expert's operation records. These high-confidence review results, accumulated manually, will form a technical feedback loop: on the one hand, the review results will be used as contextual clues to feed back to the subsequent extraction prompts on the offline side (S511) to guide and constrain the future micro-ontology slice extraction process of the large language model and improve the standardization of incremental extraction; on the other hand, these results will directly feed back to the naming alignment and inference process on the online side (S512). This enables the system to prioritize calling the reviewed version and canonical_id mapping confirmed by the expert when responding to user queries and performing local slice synthesis, thereby ensuring the objectivity and connectivity consistency of subsequent local closed-loop inference from the source.
[0128] Reference Figure 8 This is a flowchart illustrating a cross-chunk naming alignment process provided in an embodiment of this application. When processing the incremental document knowledge base, the system first obtains class identifiers and attribute identifiers from different document chunks (S401). To address the drift problem where different chunks refer to the same ontology concept but have different names, the system performs an alias collection operation (S402) to aggregate potential synonymous expressions of each identifier. Subsequently, these collected identifiers and aliases undergo string normalization processing (S403) to eliminate surface inconsistencies caused by differences in capitalization, formatting, or special characters.
[0129] After completing the basic text dimension processing, the system further performs in-depth semantic alignment analysis. Specifically, the system uses an embedded similarity calculation module (S404) to measure the semantic similarity of different identifiers in the vector space, and combines it with a large language model to perform synonym determination (S405), thereby comprehensively evaluating whether entity categories or attributes across slices refer to the same underlying concept. Then, based on the above multi-dimensional calculation and determination results, the system executes a judgment node to confirm synonymy (S406).
[0130] Based on the specific determination of synonym confirmation, the system will execute different mapping processing branches. When the determination result is negative (i.e., synonym not confirmed), the system retains the original local identifiers of each document slice (S407) to avoid knowledge confusion caused by excessive merging. When the determination result is positive (i.e., synonym confirmed), the system uniformly maps these synonym identifiers distributed in different slices to canonical identifiers (canonical_id) (S408). After the mapping is completed, the system will update the mapping table data of "alias to canonical identifier" (alias -> canonical_map) accordingly (S409). Finally, these alignment mapping relationships will be used for reuse in subsequent retrieval queries and micro-ontology extraction processes (S410), thereby effectively supporting the connectivity of discrete ontology fragments and the dynamic synthesis of local slices during the query phase.
[0131] Step 104: Perform local closed-loop reasoning within the scope of local ontology slices and instance-level fact data corresponding to some target document slices to obtain structured reasoning results.
[0132] Step 104 will be described in detail below.
[0133] In step 104 of some embodiments, local closed-loop reasoning is performed within the scope of the local ontology slices and instance-level fact data corresponding to a portion of the target document slices to obtain a structured reasoning result. Local closed-loop reasoning refers to the hard isolation of the scope of formal logic computation, limiting it to the currently dynamically synthesized local ontology slices and the loaded instance-level fact data closure, without the computation pointer extending outwards to address other irrelevant data in the knowledge base.
[0134] The following is an example code for the inference result.
[0135] JSON { "answer_type": "inferred_relation", "result": { "subject": "Alice", "predicate": "reportsTo", "object": "Carol" }, "derived_from": [ { "triple": "Alice reportsTo Bob", "chunk_id": "chunk_12"}, { "triple": "Bob reportsTo Carol", "chunk_id": "chunk_18"}, { "rule": "reportsTo is transitive", "chunk_id": "chunk_42"} ], "evidence": [ Alice reports to Bob. "Bob reports to Carol." "Team members report to their superiors level by level." ] } In this process, the search space complexity of the reasoning computation is controlled at the document level, which is linearly related to the number of recalls, avoiding the computational power consumption caused by the large search space in traditional global ontology reasoning. Based on the specific axiomatic semantics contained in the local ontology slices, formal derivation is performed in a restricted closed-loop space. By performing operations such as transitive topology extension or constraint consistency verification, structured reasoning results such as implicit derived facts or conflict violation reports are obtained, as described below.
[0136] Reference Figure 9 Local closed-loop reasoning is performed within the scope of local ontology slices and instance layer fact data corresponding to some target document slices to obtain structured reasoning results, including the following steps 901 to 905.
[0137] Step 901: Determine the axiom type of each schema layer ontology axiom in the local ontology slice.
[0138] Step 902: Based on the axiom type, the axiom distribution in the local ontology slice is transformed into a computational form to obtain the target computational form, which is at least one of forward inference rules, hierarchical inference data, and constraint verification data.
[0139] Step 903: When the target calculation form includes at least one of forward inference rules or hierarchical inference data, perform topological expansion based on the corresponding calculation form to obtain derived fact data.
[0140] Step 904: When the target calculation form includes constraint verification data, perform consistency verification on the instance layer fact data based on the constraint verification data to obtain the constraint conflict result.
[0141] Step 905: Based on the derived fact data and / or constraint conflict results corresponding to the ontology axioms of all schema layers, obtain the structured reasoning results.
[0142] Steps 901 to 905 are described in detail below.
[0143] In step 901 of some embodiments, the axiom type of each schema layer ontology axiom in the local ontology slice is determined, so as to traverse the synthesized local ontology slice and analyze the semantic features of each axiom (such as whether it involves transitivity, mutual exclusion, subclass inclusion relationship, etc.) to clearly classify it into a specific axiom type, thereby providing an identification basis for subsequent differentiated computation and distribution.
[0144] In step 902 of some embodiments, further, based on the axiom type, the axiom distribution in the local ontology slice is transformed into a computational form to obtain a target computational form. The target computational form is at least one of forward inference rules, hierarchical inference data, and constraint verification data. The computational form transformation refers to mapping different axioms to specific machine execution logic according to their computational patterns. Forward inference rules are suitable for expressing relational logic such as transitivity and symmetry; hierarchical inference data are suitable for expressing inheritance logic such as subClassOf; and constraint verification data are suitable for expressing rules such as mutual exclusion and cardinality constraints that do not generate new facts but require consistency verification. Through this distribution logic, complex semantic axioms are transformed into efficient low-level computational instructions, avoiding computational redundancy caused by using unified heavy inference for all knowledge.
[0145] In step 903 of some embodiments, when the target computational form includes at least one of forward reasoning rules or hierarchical reasoning data, topological expansion is performed based on the corresponding computational form to obtain derived factual data. Topological expansion refers to extending the connections between nodes in the local knowledge graph by using axiom-triggered rules for breadth- or depth-first association; derived factual data refers to newly derived knowledge triples based on the original instance-level factual data. Specifically, when the distributed axiom belongs to the rule class or the hierarchical class, knowledge deduction is performed locally. By combining known instance data with logical rules, new relationships that were not explicitly present in the document but are logically necessary are calculated, thereby achieving local semantic completion of the knowledge graph.
[0146] In step 904 of some embodiments, when the target computation form includes constraint verification data, consistency checks are performed on the instance-level fact data based on the constraint verification data to obtain constraint conflict results. Constraint conflict results refer to abnormal records generated when instance data does not match preset logical constraints. For example, a consistency scan is performed for rules such as disjointWith or maxCount constraints. If the same instance is detected to violate a rule constraint (e.g., when the same attribute is assigned a value exceeding the cardinality limit), the constraint conflict result is recorded. This process is not intended to derive new facts, but rather serves as a high-precision logical security check to ensure that instance data within the current local ontology scope conforms to the established ontology schema definition.
[0147] In step 905 of some embodiments, a structured reasoning result is obtained based on the derived fact data and / or constraint conflict results corresponding to all schema-layer ontology axioms. This involves aggregating the derived fact data obtained through topology expansion with the constraint conflict results generated by consistency checks, resulting in a structured reasoning result corresponding to a unified dataset containing logical derivation conclusions and data quality warnings. This ensures that reasoning or constraint verification is performed only within the local ontology slice and instance-layer fact set corresponding to the target chunk, yielding reasoning results, constraint violation results, conflict information, and tracing information. This dataset, in a structured form, fully reflects all the evolution results after logical computation of instance-layer data based on schema-layer ontology axioms within the current local scope, preparing the final logical input for providing traceable and verifiable answers to users or question-answering agents.
[0148] Through steps 901 to 905 above, by dynamically converting the logical axioms in the micro ontology slices into three different computational forms—rules, hierarchy, and constraints—complex ontology reasoning tasks can be decomposed into lightweight execution units. This avoids the high computational cost and latency caused by unified reasoning across the entire knowledge base. At the same time, the scope of logical computation is strictly limited to the local ontology slices and their instance data related to the current user query, effectively decoupling the reasoning process from the full dataset. While ensuring formal logical capabilities such as derivation, hierarchical inheritance, and constraint conflict detection, this improves the reasoning response speed and data processing reliability under a large-scale incremental knowledge base.
[0149] Reference Figure 10This is a flowchart illustrating the synthesis and reasoning of local ontology slices during a query, as provided in an embodiment of this application. Upon receiving a user query (S301), the system first determines whether structured reasoning is required by the query routing (S302). For queries requiring reasoning, the system recalls relevant document slices (chunks) (S303) and loads the corresponding micro-ontology slices (micro-TBoxes) as needed (S304). After loading, the system performs a normalization operation (S305) to convert aliases to canonical IDs, ensuring that identifiers referring to the same semantic concept in different slices are aligned, and then synthesizes them into local ontology slices for this query (S306).
[0150] After obtaining local ontology slices, the system distributes axioms according to axiom type (S307), thereby driving different computational chains in a targeted manner: including a rule reasoning module for handling transitivity or logical rules (S308), a hierarchical reasoning module for handling class hierarchy inheritance relationships (S309), and a constraint verification module for performing mutual exclusion or cardinality constraint checks (S310). These modules perform computations in parallel or step by step, and finally converge to produce structured reasoning results (S311).
[0151] In the final stage of the reasoning process, the system integrates and outputs source information and conflict information (S312), recording the original text evidence, logical links, and possible local contradictions used in the reasoning process. Finally, the Large Language Model (LLM) combines the above reasoning results and source information to generate the final natural language answer to the user's query (S313), thereby limiting the computational search space and ensuring the reasoning response speed and reliability in incremental knowledge base scenarios.
[0152] Step 105: Based on the structured reasoning results and the source document slices associated with the structured reasoning results, as well as the corresponding evidence identifiers, obtain the retrieval and source tracing data and output it.
[0153] Step 105 is described in detail below.
[0154] In step 105 of some embodiments, retrieval and source data is obtained and output based on the structured reasoning result, the associated source document slices, and the corresponding evidence identifiers. The retrieval and source data refers to a composite data output structure that includes both the final factual conclusion in response to the query and the traceable evidence chain used to prove the legitimate origin of that conclusion. After generating the structured reasoning result, the system, based on the association mapping retained in the synthesis stage, reverse-extracts the ontology axioms of each schema layer involved in deriving the specific result, and further maps the evidence identifiers and source document slices bound to these axioms. The structured reasoning result, the derivation dependency chain, the precise original text location identifiers, the constraint violation results, and the conflict information are assembled and spliced together to form the retrieval and source data, which is then output, ensuring that the information presented to the user possesses both logical derivability and physical verifiability.
[0155] In addition, refer to Figure 11 The knowledge retrieval data processing method also includes the following steps 1101 to 1103.
[0156] Step 1101: Obtain historical statistical data of local schema layer ontology axioms.
[0157] Step 1102: Calculate the promotion score of the local pattern layer ontology axiom based on historical statistical data.
[0158] Step 1103: When the promotion score reaches the preset promotion condition, the corresponding local schema layer ontology axiom is marked as the global schema layer ontology axiom. The global schema layer ontology axiom is used to introduce the normalization alignment and synthesis process of class identifiers and attribute identifiers in the micro ontology slice, and the priority of the global schema layer ontology axiom is higher than that of the local schema layer ontology axiom in the micro ontology slice.
[0159] Steps 1101 to 1103 are described in detail below.
[0160] In step 1101 of some embodiments, in this application, in addition to responding to user query requests, historical statistical data of local schema layer ontology axioms are also obtained. Here, local schema layer ontology axioms refer to ontology elements extracted from a single document chunk and verified through evidence, used to define class hierarchies or attribute logic; historical statistical data refer to multi-dimensional operational status indicators accumulated by the ontology element throughout the entire knowledge base's operational lifecycle. These indicators specifically include: the frequency of the ontology element appearing across multiple document chunks, the consistency measure of its definition in different documents, the pass rate during expert review, and the hit rate in actual user query scenarios. Continuous tracking and recording of these indicators provides data support for quantitatively evaluating the knowledge value and stability of specific ontology elements.
[0161] In step 1102 of some embodiments, the promotion score of the local schema layer ontology axiom is then calculated based on historical statistical data. The promotion score is a quantitative assessment of whether a local schema layer ontology axiom is mature and possesses the ability to evolve into global authoritative knowledge. Specifically, the calculation method involves weighted summation of at least two of the following indicators: frequency, definition consistency, approval rate, and query hit rate. This quantitative calculation process allows for the selection of ontology elements that are stable, logically sound, and of high value to users within massive amounts of fragmented data.
[0162] In step 1103 of some embodiments, when the promotion score reaches a preset promotion condition, the corresponding local schema layer ontology axiom is marked as a global schema layer ontology axiom. The global schema layer ontology axiom is used to introduce class identifiers and attribute identifiers in the normalization alignment and synthesis process of micro-ontology slices, and the priority of the global schema layer ontology axiom is higher than that of the local schema layer ontology axiom in the micro-ontology slice. Here, the global schema layer ontology axiom refers to the schema layer constraint rule with higher authority throughout the entire knowledge base after governance promotion; the priority refers to the attribute that the global rule has the right to adjudicate when a conflict arises between the definition of a local micro-ontology and the global ontology axiom during the local ontology slice synthesis in the query phase. When the promotion score exceeds a preset threshold, the local ontology element is formally activated as a global schema layer ontology axiom. In the subsequent normalization alignment and local synthesis process, this global schema layer ontology axiom is introduced into the synthesis space as a mandatory constraint. If a definition in a micro-ontology slice conflicts with the axioms of the global schema layer, the global axioms are given a higher execution priority. By ignoring, downgrading, or marking conflicting axioms, the logical consistency at the global level is ensured.
[0163] In one example, the system statistically analyzes the frequency of occurrence, consistency, stability time, approval rate, and query hit rate of ontology elements corresponding to the same canonical_id across multiple chunks. When the statistical indicators meet the promotion criteria, the corresponding ontology element is marked as a candidate for a knowledge base-level global TBox. Then, after confirmation by experts, the candidate ontology element is activated as a knowledge base-level global TBox element. In subsequent slice synthesis, the knowledge base-level global TBox is used as an authoritative constraint with higher priority than the chunk-localmicro-TBox; when a chunk-localmicro-TBox conflicts with a global TBox, it is ignored, downgraded, or marked as conflicting.
[0164] In another embodiment, the system adds micro-TBox elements with low confidence, high-frequency concepts, conflict hits, high-frequency user query hits, or insufficient evidence to a review queue. Then, it receives acceptance, rejection, editing, or merging operations from expert processors on classes, attributes, constraints, aliases, or axioms in the review queue. Next, the expert review results are saved as independent reviewed versions, and the merging operations are written to the canonical_id mapping. Subsequently, the reviewed versions and the expert-confirmed canonical_id mapping are used preferentially in subsequent query inference. Finally, based on the expert review records, subsequent extraction hints, alignment rules, or training samples are generated to feed back into the micro-TBox extraction module.
[0165] Through steps 1101 to 1103 above, by calculating promotion scores using historical statistical data, the knowledge base can automatically identify and extract high-quality ontology elements that appear frequently, are logically stable, and have been verified by experts. These elements are then promoted to global authoritative constraints at the knowledge base level. This not only avoids the high cost of pre-designing a rigid global schema, but also ensures that the knowledge system can maintain both the local flexibility of the micro-ontology and the global consistency of the core business logic when processing large-scale unstructured documents by giving global axioms higher priority than local slices during dynamic synthesis. This allows the knowledge system to evolve smoothly with the growth of business data.
[0166] Reference Figure 12 This is a schematic diagram illustrating the process of promoting a local ontology element to a knowledge base-level global ontology, as provided in an embodiment of this application. Figure 12 As shown, during the knowledge base governance process, the system first acquires local ontology elements from multiple document chunks (S601). To assess whether these ontology elements have the potential to evolve into globally universal knowledge, the system performs multi-dimensional statistical analysis on each element, specifically including frequency statistics (S602), stability statistics (S603), consistency statistics (S604), approval rate statistics (S605), and query hit rate statistics (S606). Subsequently, the system performs comprehensive calculations based on the aforementioned historical statistical data and executes a promotion determination (S607).
[0167] The system checks whether the preset promotion conditions are met based on the promotion determination result (S608). If the determination result is negative, it means that the ontology element does not yet have global universality, and it continues to participate in the subsequent local retrieval and reasoning process as a local micro-ontology slice (chunk-local micro-TBox) at the document slice level (S609). If the determination result is positive, the system marks the local ontology element as a candidate object of the global ontology (Global TBox) (S610).
[0168] After being marked as a candidate object, the system triggers an expert confirmation process (S611). Following expert confirmation, the element is formally activated as a knowledge base-level global ontology element (S612). Subsequently, this global ontology element is introduced during the subsequent document slice synthesis process and is given a higher execution priority than document slice-level micro-ontology slices, thereby exerting authoritative constraint power across the entire system (S613). This achieves a smooth evolution and adaptive governance of the knowledge system from local fragmentation to global authority.
[0169] Through steps 101 to 105 above, the pattern layer knowledge is sinked down to the independent document slice granularity, and the micro-ontology is dynamically normalized and synthesized as needed during the online query stage. By using the original text evidence binding mechanism and the local closed-loop strategy, the complexity of the derivation calculation is decoupled from the scale of the full knowledge base, so that the logical deduction is only executed within the limited slice space awakened by the target query. This effectively reduces the computational overhead of formal reasoning, controls the risk boundary of the spread of local knowledge extraction errors to the global scope, and ensures that the final output retrieval conclusion has transparent traceability to the original text fragment, thereby improving the robustness and interpretability of the knowledge reasoning process when facing continuously increasing unstructured documents.
[0170] Furthermore, in this application, the system can distribute different types of axioms into different computational forms, as shown in the table below.
[0171]
[0172] Through the above distribution, the solution of this application can be implemented in a lightweight inference engine, rule engine, graph database query engine or constraint validator, and is not limited to a specific underlying technology.
[0173] Reference Figure 13 This is a schematic diagram illustrating the overall process of a reasonable knowledge retrieval method based on document slice ontology, provided in an embodiment of this application. Figure 13 As shown, in the offline processing stage of knowledge entry, the system first obtains the original document and performs document parsing and segmentation to generate multiple document slices (S101-S102). Subsequently, the system performs entity and relation extraction on each document slice to obtain the corresponding instance-level fact set (S103), and further extracts micro-ontology slices (micro-TBoxes) containing schema-level ontology axioms (S104). To ensure the rigor of the knowledge entered into the database, the system performs original text evidence verification and confidence screening on each ontology axiom in the micro-ontology slice (S105), and only the axioms that pass the verification are persistently stored as derived attributes of the document slice (S106).
[0174] During the online query phase, the system receives the user query (S107) and recalls relevant candidate document slices based on the query requirements (S108). The system reads and loads the micro-ontology slices and instance-level fact sets corresponding to these target document slices, performs naming alignment and local ontology slice synthesis processing (S110), and constructs a local reasoning context specific to this query. Based on this, the system performs local closed-loop reasoning or constraint verification within the synthesized local scope (S111), and finally outputs the reasoning results, source evidence, and traceable proving data containing the reasoning chain to the user (S112). This process demonstrates the complete processing logic of knowledge from original document parsing, structured incremental storage, to dynamic local reasoning during querying, reflecting the flexibility and verifiability of this solution when dealing with large-scale, continuously growing knowledge bases.
[0175] In an example of local reasoning question answering based on a single knowledge base, the enterprise knowledge base contains multiple organizational structure documents. The system segments the documents into chunks and extracts entities and relationships such as "employee," "manager," and "report to" from the chunks. For a given chunk, the system further extracts micro-TBoxes, obtaining the axiom that "reportsTo is a transitive attribute," and binding the evidence "employees report to their superiors level by level."
[0176] When a user asks "To whom does Alice ultimately report?", the system recalls a chunk containing the relationship between Alice, Bob, and Carol, as well as a chunk containing the transitivity statement for `reportsTo`. The system synthesizes a micro-TBox of these chunks, performs transitive reasoning, obtains the reasoning result of `AlicereportsTo Carol`, and returns source evidence for Alice reporting to Bob, Bob reporting to Carol, and the transitivity axiom of `reportsTo`.
[0177] In an example of data consistency checking based on constraint validation, a knowledge base contains employee information specifications, stipulating that each employee must have one and only one employee ID. The system extracts the Employee class and employeeId attribute constraints from the relevant chunks, forming micro-TBoxes. The user queries "Are there any abnormal employee IDs in the current data?" The system retrieves the employee data chunk and specification chunk, synthesizes a local ontology slice, and performs cardinality constraint validation. It finds that an employee has two different employeeIds, and returns a constraint violation report along with corresponding original text evidence.
[0178] In an example of merging synonymous concepts across slices, the same concept is represented by "Engineer," "Software Engineer," and "Research and Development Engineer" in different documents. The system generates aliases when extracting micro-TBoxes and unifies them into a single canonical_id "Engineer" during the query phase through alias mapping. Subsequently, class hierarchies and attribute constraints from different chunks can be merged for inference, avoiding recall and inference breakage caused by naming drift.
[0179] In an example where expert review feedback aided subsequent extractions, the system discovered that "software engineer" and "developer" frequently co-occurred in multiple chunks, but the automatic alignment confidence was low, so they were added to the review queue. Experts confirmed that both should be merged into the canonical_id "Engineer" within the current knowledge base context. The system saved this merging operation and added this canonical mapping to subsequent micro-TBox extraction prompts, making subsequent chunks more likely to use the unified identifier.
[0180] In an example where a local ontology is promoted to a knowledge base-level global TBox, concepts such as "Employee," "Manager," and "Engineer" consistently appear in numerous chunks, exhibiting low conflict rates, high approval rates, and frequent user queries. The system adds these to the knowledge base-level global TBox candidate list, and after expert confirmation, activates them as global TBoxes. When synthesizing local slices in subsequent queries, the system prioritizes the class hierarchy definitions within this global TBox; if a chunk-local micro-TBox conflicts with a global definition, the conflict is flagged, and the priority of that chunk-local axiom is lowered.
[0181] In a hybrid natural language to structured reasoning example, a user inputs "Which positions are indirectly attributed to the R&D manager?" The system uses a large language model to transform this question into a structured query targeting the `reportsTo` transitive relation, and verifies that the query only references classes and attributes existing in the current slice. After executing the transitive closure through a symbolic inferencer, the system obtains the indirect reporting chain, and then the large language model generates a natural language response. The final response includes the reasoning chain and evidence, without directly relying on the large language model for inference.
[0182] This application also provides a knowledge retrieval data processing apparatus, which can implement the above-described knowledge retrieval data processing method, as described above. Figure 14 The device 1400 includes: The response acquisition module 1410 is used to acquire a partial target document slice related to the user's query request in response to the user's query request; The reading module 1420 is used to read the micro ontology slices and instance layer fact data corresponding to a portion of the target document slices. The micro ontology slices are stored as derived attributes of the corresponding document slices. The micro ontology slices contain local schema layer ontology axioms that have been verified by the original text evidence. Each schema layer ontology axiom is bound to an evidence identifier that indicates the source of the original text evidence in the corresponding document slice. The local ontology slice determination module 1430 is used to perform normalization alignment and synthesis processing on class identifiers and attribute identifiers in micro ontology slices based on preset standard identifier mapping relationships to obtain local ontology slices. The local reasoning module 1440 is used to perform local closed-loop reasoning within the scope of local ontology slices and instance layer fact data corresponding to some target document slices, and obtain structured reasoning results. The data generation module 1450 is used to obtain and output retrieval and tracing data based on the structured reasoning results, the source document slices associated with the structured reasoning results, and the corresponding evidence identifiers.
[0183] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, the specific implementation of the knowledge retrieval data processing device is basically the same as the specific implementation of the knowledge retrieval data processing method described above, and will not be repeated here.
[0184] This application also provides an electronic device, including: At least one memory; At least one processor; At least one program; The program is stored in memory, and the processor executes at least one program to implement the knowledge retrieval data processing method described above in this application. The electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.
[0185] Please see Figure 15 , Figure 15 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 1501 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 1502 can be implemented in the form of ROM (Read-Only Memory), static storage device, dynamic storage device, or RAM (Random Access Memory). The memory 1502 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1502 and is called and executed by the processor 1501 using the knowledge retrieval data processing method of the embodiments of this application. The input / output interface 1503 is used to implement information input and output; The communication interface 1504 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1505 transmits information between various components of the device (e.g., processor 1501, memory 1502, input / output interface 1503, and communication interface 1504); The processor 1501, memory 1502, input / output interface 1503 and communication interface 1504 are connected to each other within the device via bus 1505.
[0186] This application embodiment also provides a storage medium, which is a computer-readable storage medium, storing a computer program that, when executed by a processor, implements the above-described knowledge retrieval data processing method.
[0187] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0188] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0189] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0190] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0191] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0192] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0193] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0194] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, or indirect coupling or communication connection between the apparatus or units, and may be electrical, mechanical, or other forms.
[0195] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0196] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0197] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0198] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A knowledge retrieval data processing method, characterized in that, The method includes: In response to a user query request, obtain a partial target document slice related to the user query request; Read the micro ontology slices and instance layer fact data corresponding to the partial target document slices, wherein the micro ontology slices are associated and stored as derived attributes of the corresponding document slices, and the micro ontology slices contain local schema layer ontology axioms that have passed the original text evidence verification, and each schema layer ontology axiom is bound to an evidence identifier used to indicate the source of the original text evidence in the corresponding document slice. Based on the preset standard identifier mapping relationship, the class identifier and attribute identifier in the micro ontology slice are normalized, aligned and synthesized to obtain a local ontology slice. Local closed-loop reasoning is performed within the scope of the local ontology slices corresponding to the partial target document slices and the instance layer fact data to obtain structured reasoning results; Based on the structured reasoning results, the associated source document slices, and the corresponding evidence identifiers, the retrieval and tracing data is obtained and output.
2. The knowledge retrieval data processing method according to claim 1, characterized in that, Before retrieving a partial target document slice related to the user query request in response to the user query request, the method further includes: Obtain the original document and parse and segment it into multiple document slices; Entity relations are extracted from each document slice to obtain the instance layer fact data; Based on the text content of each document slice, the corresponding instance layer fact data, and the preset restricted vocabulary, an initial micro-ontology slice containing multiple pattern layer ontology axioms is obtained. For each schema-layer ontology axiom in the initial micro-ontology slice, perform original text evidence verification, and add the schema-layer ontology axiom that passes the original text evidence verification to the micro-ontology slice of the corresponding document slice. Then, generate the association storage relationship of the derived attributes based on the micro-ontology slice and the corresponding document slice.
3. The knowledge retrieval data processing method according to claim 2, characterized in that, The step of performing original evidence verification on each schema-layer ontology axiom in the initial micro-ontology slice includes: For each of the aforementioned schema layer ontology axioms, obtain the candidate evidence text associated with the schema layer ontology axiom; The candidate evidence text is compared with the content of the corresponding document slice to obtain the content location test result. The semantic relevance is obtained by calculating the correlation between the candidate evidence text and the pattern layer ontology axiom. When the content location test result indicates that the content location test is passed, and the semantic relevance reaches a preset relevance threshold, the evidence identifier is generated based on the candidate evidence text. When the content positioning test result indicates that the content positioning test has failed, or when the semantic relevance has not reached the preset relevance threshold, the pattern layer ontology axiom will be discarded or marked as pending review.
4. The knowledge retrieval data processing method according to claim 1, characterized in that, The process of performing local closed-loop reasoning within the scope of the local ontology slices corresponding to the partial target document slices and the instance layer fact data to obtain structured reasoning results includes: Determine the axiom type of each of the schema-layer ontology axioms in the local ontology slice; Based on the axiom type, the axiom distribution in the local ontology slice is transformed into a calculation form to obtain a target calculation form, wherein the target calculation form is at least one of forward inference rules, hierarchical inference data, and constraint verification data. When the target calculation form includes at least one of the forward reasoning rule or the hierarchical reasoning data, topological expansion is performed based on the corresponding calculation form to obtain derived fact data. When the target calculation form includes the constraint verification data, a consistency check is performed on the instance layer fact data based on the constraint verification data to obtain the constraint conflict result. The structured reasoning result is obtained based on the derived factual data and / or the constraint conflict results corresponding to all the ontology axioms of the pattern layer.
5. The knowledge retrieval data processing method according to claim 1, characterized in that, In the process of normalizing, aligning, and compositing the class identifiers and attribute identifiers in the micro-ontology slices, the method further includes: During the synthesis process, when a conflict of schema-level ontology axioms is detected between micro-ontology slices belonging to different document slices, the axiom content corresponding to the conflicting schema-level ontology axiom, as well as the associated source document slice and evidence identifier, are stored. Obtain the extraction confidence level and / or expert review status parameters corresponding to the conflicting schema layer ontology axioms; Based on the extraction confidence level and / or the expert review status parameter, the target main path axiom is determined from the conflicting schema layer ontology axioms, and the target main path axiom is used as the execution basis for the local closed-loop reasoning.
6. The knowledge retrieval data processing method according to claim 1, characterized in that, When the received user query request is in natural language form, before performing local closed-loop reasoning within the scope of the local ontology slice corresponding to the partial target document slice and the instance layer fact data, the method further includes: The user query request is converted into candidate structured query statements using a large language model; Based on the class identifiers and attribute identifiers in the local ontology slices, a matching test is performed on the class identifiers and attribute identifiers referenced in the candidate structured query statements to obtain the identifier test results; When the identifier verification result fails, the query clauses containing unidentified identifiers in the candidate structured query statements are filtered to obtain filtered structured query statements, which are used for data retrieval and inference. The identifier verification results in the candidate structured query statement, representing the identifier data that failed the verification and the list of standardized identifiers, are fed back to the large language model to generate the target structured query statement.
7. The knowledge retrieval data processing method according to claim 1, characterized in that, The method further includes: Obtain historical statistical data of the local pattern layer ontology axioms; The promotion score of the local pattern layer ontology axiom is obtained by calculating based on the historical statistical data. When the promotion score reaches the preset promotion condition, the corresponding local schema layer ontology axiom is marked as a global schema layer ontology axiom. The global schema layer ontology axiom is used to introduce the normalization alignment and synthesis process of class identifiers and attribute identifiers in the micro ontology slice, and the priority of the global schema layer ontology axiom is higher than that of the local schema layer ontology axiom in the micro ontology slice.
8. A knowledge retrieval data processing device, characterized in that, The device includes: The response acquisition module is used to acquire a partial target document slice related to the user's query request in response to the user's query request; The reading module is used to read the micro ontology slices and instance-level fact data corresponding to the partial target document slices. The micro ontology slices are stored as derived attributes of the corresponding document slices. The micro ontology slices contain local schema-level ontology axioms that have been verified by the original text evidence. Each schema-level ontology axiom is bound to an evidence identifier that indicates the source of the original text evidence in the corresponding document slice. The local ontology slice determination module is used to perform normalization alignment and synthesis processing on the class identifiers and attribute identifiers in the micro ontology slice based on a preset standard identifier mapping relationship to obtain a local ontology slice. The local reasoning module is used to perform local closed-loop reasoning within the scope of the local ontology slice corresponding to the partial target document slice and the instance layer fact data to obtain structured reasoning results; The data retrieval generation module is used to obtain and output retrieval and tracing data based on the structured reasoning results, the source document slices associated with the structured reasoning results, and the corresponding evidence identifiers.
9. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the knowledge retrieval data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the knowledge retrieval data processing method according to any one of claims 1 to 7.
