A method and device for unstructured document experience extraction and consistency checking

CN122433734APending Publication Date: 2026-07-21ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
Filing Date
2026-04-15
Publication Date
2026-07-21

Smart Images

  • Figure CN122433734A_ABST
    Figure CN122433734A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of conversational business intelligence data processing, and discloses a method and device for extracting and checking consistency of unstructured documents. The method comprises the following steps: obtaining an unstructured business document, identifying a business logic intention, and dividing the document into a plurality of semantic blocks which are semantically complete based on corresponding semantic boundaries; performing structured mapping processing on each semantic block to generate structured experience data comprising business rule expression information; generating experience representation according to the structured experience data, and retrieving candidate experience from a stock experience library; in the case of retrieving the candidate experience, performing consistency checking on the structured experience data and the candidate experience based on the business rule expression information; and performing storage control on the structured experience data according to the consistency checking result. The application can reduce rule conflicts and inconsistent problems caused by directly storing unstructured business experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of conversational business intelligence data processing technology, specifically to a method and apparatus for extracting experience and verifying consistency from unstructured documents. Background Technology

[0002] Conversational business intelligence refers to a class of data processing technologies that use natural language interaction to complete data queries, statistical analysis, and result presentation. In this type of technology, the system typically needs to understand the user's input question and, in conjunction with the data table structure, field semantics, and business rules, generate query statements or analytical logic that can be executed by the database.

[0003] In enterprise-level application scenarios, business knowledge related to data queries is not entirely stored in structured databases. Besides table names, field names, and inter-table relationships, much of the business experience that influences query results is scattered across unstructured documents such as policy documents, requirement documents, analysis specifications, operation manuals, and knowledge base entries. This business experience often involves indicator definitions, statistical definitions, calculation formulas, filtering conditions, time constraints, and multi-step analysis processes. For conversational business intelligence systems, this content affects both the true semantics of user questions and the correctness of subsequent query generation.

[0004] One existing approach typically involves first segmenting the business document according to a preset length or paragraph boundaries, and then storing the segmented text fragments in a retrieval system. When business knowledge is needed, relevant text fragments are retrieved using semantic retrieval, and these fragments are then provided as context for subsequent model processing. This approach facilitates engineering deployment and can, to some extent, expand the model's ability to utilize external knowledge.

[0005] However, business rules in business documents are often not presented as independent short sentences, but rather distributed across multiple consecutive statements or even paragraphs. A complete business rule may simultaneously include definitions, calculation relationships, scope of application, and exceptions. If segmented solely according to preset lengths or paragraph boundaries, the same business rule can easily be split into different text fragments. Consequently, the retrieved fragments often fail to simultaneously contain complete formulas, constraints, and applicable contexts, leading to incomplete information issues in subsequent processing.

[0006] Furthermore, the recalled content is typically still in the form of natural language. While natural language can be understood by humans, it lacks a clear and stable structured representation for the program processing that generates database query statements. Especially when it comes to calculation formulas, filtering criteria, and time dependencies, simply relying on fragments of natural language often fails to provide stable support for field selection, condition concatenation, and computational logic. Therefore, existing solutions still have room for improvement in transforming unstructured business knowledge into executable analytical logic.

[0007] Another existing approach typically relies on keywords, templates, or rule expressions to extract sentences containing specific words from a document in order to identify potential business rules. This method can quickly identify and extract some rules when the text format is relatively fixed and the expression is relatively simple.

[0008] However, business experience in enterprise documents is often characterized by diverse expressions, strong contextual dependencies, and numerous implicit relationships. Different documents may use different wording for the same business meaning; different authors may use different word orders or different decomposition methods to describe the same computational relationship. In this situation, extraction methods based on keywords or rule templates often struggle to balance extraction scope and accuracy, easily overlooking implicit logic and extracting semantically incomplete rule fragments when contextual constraints are lacking.

[0009] Besides the completeness of extraction, consistency issues during knowledge entry into the knowledge base have received insufficient attention. Business documents within an enterprise are typically scattered, created at different times, applied to different departments, and updated at varying frequencies. The same business concept may have different aliases, expressions, or definitions in different documents. For some metric definitions, there may also be version evolutions or mutually exclusive conditions. If newly extracted business experience is not normalized and validated for consistency, but directly written into the knowledge base, the knowledge base is prone to containing semantic redundancy, logical inconsistencies, or definitional conflicts.

[0010] When a conversational business intelligence system acquires business experience from such a knowledge base, if there are duplicates or conflicts among the candidate knowledge, the system will find it difficult to reliably determine the business logic to be used during subsequent query generation. This can easily affect the field mapping and condition settings in the query statement, and may also cause the same problem to yield different analytical results at different times, thus affecting the stability of the system when processing complex business queries.

[0011] Therefore, how to extract semantically complete business experience from unstructured documents, transform the extracted results into a structured representation suitable for program processing, and perform consistency verification of new and old experience during the data entry stage to build a logically self-consistent experience library remains a technical problem to be solved in the process of conversational business intelligence data processing. Summary of the Invention

[0012] One technical problem solved by this invention is to provide a scheme for extracting and verifying the consistency of unstructured document experience, so that when extracting business experience from unstructured business documents, not only can searchable and reusable structured experience data be formed, but also the consistency, supplementation or conflict relationship between new experience and existing experience can be identified before being stored in the database, thereby reducing the situation of inconsistent business rules and duplicate storage in the experience database.

[0013] To address the aforementioned technical problems, one aspect of the present invention provides a method for extracting and verifying the consistency of unstructured document experience, comprising: acquiring an unstructured business document; identifying the business logic intent in the unstructured business document; and dividing the unstructured business document into multiple semantically complete semantic blocks based on the semantic boundaries corresponding to the business logic intent; performing structured mapping processing on each semantic block to generate structured experience data, wherein the structured experience data includes business rule expression information for characterizing business calculation rules or constraint relationships; generating an experience representation based on the structured experience data; and retrieving candidate experiences from an existing experience database based on the experience representation; when a candidate experience is retrieved, performing a consistency verification between the structured experience data and the candidate experience based on the business rule expression information; and performing database entry control on the structured experience data based on the consistency verification result.

[0014] In some implementations, the business logic intent in the unstructured business document is identified, and based on the semantic boundaries corresponding to the business logic intent, the unstructured business document is divided into multiple semantically complete semantic blocks, including: converting the unstructured business document into text with a hierarchical structure; identifying business logic segments in the text that represent business definitions, calculation rules, constraints, or operation processes; determining the start and end positions of each business logic segment, and taking the text located between the start and end positions as the corresponding semantic blocks.

[0015] In some implementations, a structured mapping process is performed on each of the semantic blocks to generate structured experience data, including mapping each of the semantic blocks to at least one of a noun paradigm, a logical paradigm, and a process paradigm; wherein the noun paradigm is used to represent business entities, synonyms, and business terms, the logical paradigm is used to represent calculation formulas, filtering conditions, sorting rules, or time period dependencies, and the process paradigm is used to represent multi-step business processes.

[0016] In some implementations, the business rule expression information includes core logic fields, which include at least one of the calculation formula, filtering conditions, or sorting rules in the logical paradigm; the calculation formula is represented by a triplet structure or a tree structure, and the triplet structure includes at least an lvalue, an operator, and an rvalue.

[0017] In some implementations, generating an experience representation based on the structured experience data and retrieving candidate experiences from an existing experience database based on the experience representation includes: generating corresponding representation vectors based on business entity information, business rule expression information, and semantic block summary information in the structured experience data; fusing the representation vectors to obtain the experience representation; and retrieving candidate experiences that satisfy similar conditions to the experience representation from the existing experience database based on the experience representation.

[0018] In some implementations, performing consistency verification between the structured experience data and the candidate experience based on the business rule expression information includes: performing standardized preprocessing on the business rule expression information of the structured experience data and the business rule expression information of the candidate experience to obtain a standardized logical expression; performing a structured comparison based on the standardized logical expression, and determining the degree of logical mutual exclusion between the structured experience data and the candidate experience by combining structural difference degree and semantic similarity.

[0019] In some implementations, the business rule expression information of the structured experience data and the business rule expression information of the candidate experience are subjected to standardized preprocessing, including: performing entity linking processing on variable names in the business rule expression information based on the business entity mapping relationship in the structured experience data, so as to map different expressions to a unified field identifier; and performing operator normalization processing on the natural language operation relationship in the business rule expression information to generate a standardized logical expression with a unified representation.

[0020] In some implementations, performing structured comparison based on the standardized logical expression includes: when the structured experience data and the candidate experience represent the same business theme, performing slot alignment comparison on the lvalues, operators, and rvalues ​​corresponding to the standardized logical expression; when the slot alignment comparison result indicates that the lvalues ​​are the same and the operators or rvalues ​​are different, determining the structural difference degree between the structured experience data and the candidate experience based on the tree structure corresponding to the standardized logical expression.

[0021] In some implementations, the structured experience data is subject to database entry control based on the consistency verification result, including: when the logical mutual exclusion degree is greater than a first preset threshold, outputting conflict warning information containing difference point markers and restricting the automatic entry of the structured experience data into the database; when the logical mutual exclusion degree is less than or equal to the first preset threshold and greater than a second preset threshold, marking the structured experience data as pending confirmation; when the logical mutual exclusion degree is less than or equal to the second preset threshold, performing merging or enhancement processing on the structured experience data and the candidate experience before writing it into the existing experience database; and writing the structured experience data into the existing experience database when no candidate experience is found.

[0022] Another aspect of the present invention provides an unstructured document experience extraction and consistency verification device, comprising: a semantic segmentation module, used to acquire unstructured business documents, identify business logic intents in the unstructured business documents, and divide the unstructured business documents into multiple semantically complete semantic blocks based on the semantic boundaries corresponding to the business logic intents; a structured mapping module, used to perform structured mapping processing on each of the semantic blocks to generate structured experience data, the structured experience data including business rule expression information for characterizing business calculation rules or constraint relationships; a candidate retrieval module, used to generate experience representations based on the structured experience data, and retrieve candidate experiences from an existing experience database based on the experience representations; a consistency verification module, used to perform consistency verification between the structured experience data and the candidate experiences based on the business rule expression information when the candidate experiences are retrieved; and an inbound control module, used to perform inbound control on the structured experience data based on the consistency verification results.

[0023] Compared with existing technologies, the embodiments of the present invention divide unstructured business documents based on semantic boundaries corresponding to business logic intent, enabling business definitions, calculation rules, and constraints to enter the subsequent processing chain as more complete semantic units; by mapping semantic blocks to structured experience data including business rule expression information, unstructured business experience can be transformed into knowledge expressions suitable for retrieval and comparison; by retrieving candidate experiences and performing consistency checks before storage, the complementary, compatible, and conflicting relationships between new and existing experiences can be distinguished; by performing differentiated storage control based on the consistency check results, the direct writing of rule conflicts and duplicate experiences into the experience database can be reduced, thereby improving the consistency, maintainability, and subsequent call stability of the experience database. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments in this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a schematic diagram of the overall process of an unstructured document experience extraction and consistency verification method.

[0026] Figure 2 This is a diagram illustrating how unstructured business documents are preprocessed to form hierarchical text.

[0027] Figure 3 This is a schematic diagram illustrating the identification of business logic fragments and the generation of semantic blocks during the semantic segmentation process.

[0028] Figure 4 This is a schematic diagram illustrating the composition of the structured empirical data obtained after structured mapping.

[0029] Figure 5 This is a schematic diagram of the process of generating experience representations and retrieving candidate experiences.

[0030] Figure 6 A diagram illustrating the standardized preprocessing process for expressing information in business rules.

[0031] Figure 7 This is a schematic diagram illustrating the process of structured comparison and determination of logical mutual exclusion.

[0032] Figure 8 This is a diagram illustrating the implementation of inbound control based on the consistency verification results.

[0033] Figure 9 This is a schematic diagram of the module structure of an unstructured document experience extraction and consistency verification device.

[0034] Figure 10 A schematic diagram of the hardware structure of an electronic device for implementing the above method. Detailed Implementation

[0035] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0036] Figure 1 This paper presents the overall process of an unstructured document experience extraction and consistency verification method. Figure 2 This diagram illustrates how an unstructured business document 101 is preprocessed to form a hierarchical text fragment 201. Figure 3 This shows the results of business logic fragment identification during the semantic fragmentation process. Figure 4 The empirical data structure obtained after structured mapping is shown. Figure 5 The process of generating experience representations and recalling candidate experiences is illustrated. Figure 6 This demonstrates the standardized preprocessing procedure for expressing business rule information. Figure 7 The structured alignment process is shown. Figure 8 The inbound control process is shown. Figure 9 This illustrates the modular structure at the device level. Figure 10 This shows a schematic diagram of the hardware structure of the electronic device.

[0037] In one embodiment of the present invention, the execution entity can be a data processing device deployed on the server side, or a processing system composed of a server cluster, vector retrieval nodes, and relational storage nodes. The execution entity can also be other computing devices with document parsing capabilities and experience base access capabilities. Considering that the document size, update frequency, and knowledge usage frequency are often high in enterprise-level conversational business intelligence scenarios, this embodiment preferentially adopts a server-side execution method. This method facilitates unified maintenance of experience base versions and also facilitates the reuse of the same experience processing flow among multiple upstream document sources and multiple downstream query generation modules. If the deployment environment has strong requirements for data domain isolation, a dedicated network deployment method can also be adopted; the method itself does not depend on a specific network configuration.

[0038] Figure 1The process begins with unstructured business document 101. This unstructured business document 101 can include office documents, memos, policy statements, requirement specifications, analysis reports, knowledge pages, and plain text content obtained through optical character recognition. Document sources can be file systems, object storage, document management platforms, or API push results. Due to significant differences in document formatting from different sources, the original text often contains a mixture of titles, body text, lists, tables, footnotes, and non-business narrative information. Directly performing semantic segmentation on the original content could easily introduce formatting noise into subsequent logical recognition processes. Therefore, before proceeding to semantic segmentation, the document is typically parsed and normalized.

[0039] Figure 2 The document parsing unit 202 can receive unstructured business documents 101 and output hierarchical text (i.e., hierarchical text) 203. The hierarchical structure mentioned here is not limited to a specific markup language. A common implementation is to convert the document into lightweight markup text that retains heading levels, list relationships, and table placeholders, such as Markdown formatted text; it can also be converted into structured plain text with paragraph-level tags, or into tree-like intermediate data organized with paragraph nodes, heading nodes, and list nodes. There are two practical reasons for using hierarchical text instead of directly preserving the original character stream. First, business rules are often attached to a heading or section, and the heading level can provide prior constraints for subsequent identification of semantic boundaries. Second, list items, table comments, and numbered paragraphs often carry conditional restrictions or exceptions; preserving these structures helps determine whether a business logic segment has ended.

[0040] In a specific example, document parsing unit 202 can first perform layout extraction on the original document, identifying headings, body paragraphs, list paragraphs, table paragraphs, and annotation paragraphs, and outputting them as hierarchical text 203 in their original order. If the original document contains headers, footers, stamps, or repetitive copyright notices, this type of content is usually not included in the business logic extraction and can be filtered out during the parsing stage using positional or template rules. Strict accuracy in the filtering process is not required here. This is because subsequent business logic fragment recognition will perform secondary filtering based on semantic features. The parsing stage focuses more on reducing the proportion of obviously irrelevant content rather than making overly aggressive cuts at the outset. If text is deleted too early in the preprocessing, it is difficult to recover the mistakenly deleted context in subsequent steps.

[0041] Figure 1 The next step in the process involves identifying the business logic intent. Figure 3After the hierarchical text 203 enters the intent recognition unit 301, multiple candidate business logic fragments 302, 303, and 304 can be obtained. Business logic intents are not limited to a single type. In accordance with the application requirements of conversational business intelligence in this embodiment, common business logic intents include business definition intents, calculation rule intents, constraint condition intents, and operational process intents. Business definition intents are typically used to explain the meaning of a certain indicator, object, or statistical caliber, such as concepts like active users, net profit, and fulfilled orders. Calculation rule intents are used to express addition, subtraction, multiplication, division, aggregation relationships, composition relationships, or derivation relationships. Constraint condition intents often correspond to effective scope, time range, state filtering, and exclusion conditions. Operational process intents are more commonly seen in step-by-step analysis or multi-stage judgment processes.

[0042] The intent recognition unit 301 can be implemented in several ways. One approach is to use a pre-trained language model to perform sequence labeling on paragraph-level or sentence-level text, outputting the intent label and boundary probability for each segment. Another approach is to first use a lightweight classifier for coarse screening, and then call a model with strong semantic understanding capabilities for fine-grained recognition on the shortlisted candidate segments. The reason for setting up a two-stage processing is that the part of enterprise documents that truly carries business experience usually accounts for a small proportion. If all text is processed by a complex model, the throughput will be limited, and a large amount of background information, business presentation content, and general rules and regulations will interfere with the recognition of logical boundaries. Adopting a coarse-to-fine processing approach can control the average processing cost while maintaining recognition accuracy.

[0043] Identifying business logic fragments involves more than just determining whether a passage is relevant to the business; it's also crucial to pinpoint its start and end points. Figure 3 Candidate business logic fragment 302 can begin with a defining sentence, then extend through an explanatory sentence and a constraint sentence before ending; candidate business logic fragment 303 may begin with the title line and extend to the end of the list item. This boundary does not always coincide with the original paragraph boundary. In practice, it is common for a calculation relationship to appear at the beginning of a paragraph, but its application is limited to the first sentence of the next paragraph; if segmented only by paragraph, the subsequently extracted logical expressions will lack constraints. Therefore, the intent recognition unit 301, while providing fragment labels, can also output a boundary expansion signal to indicate whether the current fragment should be merged with adjacent sentence segments.

[0044] In one embodiment of the present invention, semantic block boundaries can be determined based on sentence-level scores and segment-level structural constraints. Assume the hierarchical text 203 is segmented into several sequential units. Each sequential unit corresponds to a sentence, list item, or short paragraph. The intent recognition unit 301 outputs a business logic relevance score for each sequential unit. Continuous scoring of the output boundary for adjacent units The semantic block boundary can be determined using the following boundary scoring function:

[0045]

[0046] in, Indicates from the first The sequence unit to the first The boundary score of the same semantic block is composed of sequential units; Indicates the first The business logic-related score for each sequential unit; Indicates the first The sequential unit and the first Boundary continuity scores between sequential units; The score represents the consistency of the hierarchical structure and is used to reflect the interval. Whether they are in the same heading level, the same list set, or the same table description area; , and This indicates the preset weight. If... Once the preset conditions are met, the interval can be... It is identified as a semantic block.

[0047] The purpose of using Equation (1) is not to pursue a complex scoring format, but to incorporate semantic relevance, adjacency continuity, and document structure consistency into the boundary judgment simultaneously. When relying solely on single-sentence classification scores, it is easy to exclude supplementary explanatory sentences; when relying solely on adjacency continuity, it is easy to incorporate a long background narrative error into the business rule fragment. By considering all three factors together, the boundaries of semantic blocks are usually more stable.

[0048] Figure 3 The semantic block generation unit 305 can output multiple semantically complete semantic blocks 306, 307, and 308 accordingly. Semantic completeness here does not mean that each semantic block must contain the entire business context, but rather that the semantic block already contains core content sufficient to express a relatively complete business experience. For example, for a certain indicator definition, semantic completeness usually covers at least the defined object and key specifications; for a certain calculation rule, semantic completeness usually covers at least the main components of the lvalue, operational relationship, and rvalue; for a certain filtering condition, semantic completeness usually covers at least the restricted object and the restriction condition itself. If a condition depends on a higher-level title constraint, such as a section title explicitly stating that it only applies to domestic orders, then the title content can also be incorporated into the semantic block header during boundary backtracking. After this processing, the subsequent mapping module no longer reads isolated sentences, but rather business semantic units with contextual constraints.

[0049] From a process perspective, semantic segmentation is not a mechanical cutting of a document, but a reorganization of the business experience within it. The reorganized basic processing unit is no longer driven by length, but by the degree of closure of the business logic. This creates semantic blocks that facilitate subsequent structured mapping and allow for comparable representation of similar experiences. If constraint information and calculation rules are not placed in the same semantic block, even with complex consistency checks, it will be difficult to distinguish between genuine rule conflicts and superficial differences caused by missing context.

[0050] In one different embodiment, if the input document contains many tabular rules, the document parsing unit 202 can also transcribe the column headers and row headers of the table into text fragments with row-column relationships, and then hand them over to the intent recognition unit 301 for boundary recognition. The reason for this processing is that some business rules are not directly given as long sentences in natural language, but are expressed through column names plus value ranges. For example, a field may correspond to different statistical calibers in different order statuses. If the table structure is ignored, the semantic blocks generated subsequently will lose the correspondence between conditions and results. After expanding the table headers, row headers, and cross-cell content in a preset order, the logical relationships in the original table can be preserved as a recognizable text sequence.

[0051] Figure 1 After this part of the process is completed, a set of semantic blocks is obtained, each corresponding to a relatively complete unit of business experience. This result directly affects the quality of subsequent structured mapping. If the semantic blocks are too short, the resulting business rule expressions will be fragmented; if the semantic blocks are too long, irrelevant descriptions will interfere with the extraction of business entities, computational relationships, and constraints. Therefore, the semantic segmentation stage is both a preprocessing step and one of the prerequisites for subsequent consistency checks to be successful. For conversational business intelligence scenarios, this prerequisite is quite important because query generation modules typically rely more on comprehensive and clearly constrained experience data than on large chunks of unorganized raw text.

[0052] After obtaining semantic blocks 306, 307, and 308 Figure 1 The processing flow then enters the structured mapping stage. Figure 4The diagram shows that after receiving the semantic block 306, the mapping module 401 can output structured experience data 402. This structured experience data 402 is not a simple field extraction from the original text, but rather a breakdown of business entities, business rules, and business processes into independently processable units of expression. The reason for this is straightforward. If the entire natural language is still used as the experience carrier, candidate experience retrieval and consistency verification can only rely on overall semantic similarity, making it difficult to accurately distinguish between synonyms, fine-grained supplements, and genuine rule conflicts. After mapping the semantic block to structured experience data 402, different types of information are placed in more appropriate positions, and subsequent actions no longer need to repeatedly guess the internal logic of the entire text.

[0053] Figure 4 In this context, structured experience data 402 may include noun paradigms 403, logical paradigms 404, process paradigms 405, and source information 406. Noun paradigms 403 are typically used to represent business entities, synonyms, aliases, short descriptions of business terms, and hierarchical relationships between entities. Logical paradigms 404 are used to represent calculation formulas, filtering conditions, sorting rules, grouping conditions, and time-cycle dependencies. Process paradigms 405 are used to represent business operation processes with step sequences or decision branches. Source information 406 records the original document identifier, paragraph position, extraction time, and version context. This information does not directly participate in logical mutual exclusion calculations, but it has practical value for subsequent manual verification, version replacement, and knowledge tracing.

[0054] In one embodiment, the mapping module 401 can first perform syntactic parsing and entity extraction on the semantic block. The entity extraction result enters the noun paradigm generation subunit 411, the logical relation extraction result enters the logical paradigm generation subunit 412, and the sequential action extraction result enters the process paradigm generation subunit 413. This splitting is not to complicate the system structure, but because entity definitions, calculation relationships, and step-by-step operations may coexist in the same semantic block. If only one unified extraction template is used to handle all cases, one type of information will often suppress another type of information. For example, in the semantic block describing cost calculation, entity names, calculation items, and applicable scenarios often appear intertwined, and unified extraction is prone to incorrectly incorporating constraint phrases into the right-hand value of the formula. After adopting the sub-paradigm approach, the entity layer, rule layer, and process layer can be aligned with their respective parsing targets.

[0055] An entry in Noun Paradigm 403 can include a standard entity name, a list of entity aliases, a business definition, and an entity mapping identifier. The standard entity name represents the core object being discussed in the semantic block, and the list of entity aliases accommodates different names for the same object in different documents. The business definition is typically a concise but information-dense description, such as a user who has logged in or placed an order in the past 30 days. The entity mapping identifier is used to link business entities to database fields, metric identifiers, or internal knowledge item identifiers during subsequent standardization preprocessing. It is not required to complete the final field binding during the structured mapping stage, as the underlying fields for some entities may differ across business domains. A more prudent approach is to first establish a unified intermediate entity identifier and then map it to specific fields in a later entity linking stage.

[0056] The content in logical paradigm 404 is closer to the core of this invention. Figure 4 The logical paradigm 404 can include indicator targets 421, operational relationships 422, conditional constraints 423, sorting rules 424, and time periods 425. Indicator targets 421 typically correspond to a calculation result or a defined object. Operational relationships 422 can represent addition, subtraction, multiplication, division, set inclusion, aggregation summation, ratio calculation, conditional branching, etc. Conditional constraints 423 can record applicable states, applicable objects, excluded objects, and exceptions. Sorting rules 424 can represent ascending order, descending order, priority by a certain field, and other analytical preferences. Time periods 425 can represent time dependencies by day, week, month, calendar year, or billing period, etc. It should be noted that these parts are not required to appear in every semantic block. Some semantic blocks only have definitions without formulas, and some semantic blocks only have filtering conditions without sorting rules. The mapping module 401 determines which slots to fill based on the content of the semantic blocks.

[0057] Business rule expressions are typically generated from Logical Normal Form 404, and may also incorporate some information from Nominal Normal Form 403. In a more specific implementation, business rule expressions can be represented using key-value structures, triple structures, or tree structures. When the rules in a semantic block are relatively simple, such as net profit equaling revenue minus cost, a triple structure is sufficient, using the left-hand side to represent net profit, the operator to represent subtraction, and the right-hand side to represent the combination of revenue and cost. When the rules in a semantic block contain nested expressions, such as net profit equaling revenue minus total cost, where total cost consists of direct costs and indirect expenses, using only planar triples would lose the hierarchical relationship, making a tree structure more suitable. In a tree structure, the root node can represent assignment relationships or primary operational relationships, internal nodes represent compound operations, and leaf nodes represent entity variables or constants.

[0058] In one embodiment of the present invention, the calculation formula in logical paradigm 404 can be first converted into an intermediate logical expression. Then, depending on the complexity, choose between a triplet structure or a tree structure. If the semantic block contains only a single-layer expression, or the complexity score does not exceed the threshold, then the intermediate logical expression... Convert to triples .in, Indicates lvalue, Represents operators, Indicates an rvalue. If the intermediate logic expression If it contains nested parentheses, combined operations, or conditional branches, then... Convert to tree structure The choice of structure can be determined by the following complexity function:

[0059]

[0060] in, Indicates intermediate logic expression The complexity; Indicates the number of operators; Indicates the nesting level; Indicates the number of conditional branches; , and This indicates the corresponding weight. If If the complexity does not exceed a preset threshold, a triplet structure is used; if... If the complexity exceeds a preset threshold, a tree structure will be used.

[0061] Equation (2) does not limit a fixed threshold or weight; its purpose is to transform the structure selection process from empirical judgment to repeatable processing rules. For most business rule documents, simple formulas account for a significant proportion, and converting them all into a tree structure would incur unnecessary parsing costs. However, for complex formulas with deeper hierarchies, using a planar structure would cause subsequent consistency checks to lose accuracy. By adopting complexity-driven structure selection, the processing chain can more easily achieve a balance between accuracy and cost.

[0062] Process paradigm 405 is more suitable for experience extracted from multi-step analysis and description, approval process conditions, or manual processing procedures. Figure 4The process paradigm 405 can include a step sequence 431, inter-step dependencies 432, and step outputs 433. The step sequence 431 is used to maintain the sequential relationship, the inter-step dependencies 432 are used to indicate whether a certain step depends on the output of the previous step, and the step outputs 433 are used to represent the intermediate results or judgment results produced by the step. Although the process paradigm 405 is not the only key in this invention, its existence can cover another type of high-frequency knowledge in enterprise documents, namely, operational logic that is not formulaic but affects query generation or result interpretation. For example, first filter active users, then aggregate by region, and finally sort by transaction amount. If this type of process knowledge is ignored, the subsequent system is likely to only obtain partial filtering conditions and lack analysis of the sequential organizational relationship between actions.

[0063] Figure 4 In addition to storing the document's source information, the 406 source information can also record the start and end offsets of semantic blocks in the original text, title paths, and generation time. Title paths have practical uses. Rules with the same name sometimes appear in different chapters of enterprise documents; for example, both financial and operational definitions involve costs, but their title paths differ. Adding the title path to the 406 source information can help distinguish entities with the same name in different business domains during subsequent candidate experience searches or manual reviews. Generation time can provide a sorting basis for subsequent version evolution. This information is usually not directly included in the main comparison process, but it can serve as an auxiliary judgment condition when rules are similar and a conflict cannot be immediately determined.

[0064] Figure 5 The diagram illustrates the processing steps of structured experience data 402 after it enters the experience representation generation module 501. The experience representation generation module 501 does not simply perform a uniform vectorization of the entire structured experience data 402. If all fields were directly concatenated into a long text and then a single vector generated, the contributions of noun information, logical information, and source information would be mixed together, and the ability to distinguish logical relationships would be easily diluted by entity names and background descriptions. Therefore, in one embodiment, corresponding representation vectors can be generated based on business entity information 511, business rule expression information 512, and semantic block summary (i.e., semantic block summary information) 513 respectively, and then fused.

[0065] The representation vector corresponding to business entity information 511 is more suitable for reflecting topic similarity. The representation vector corresponding to business rule expression information 512 is more suitable for reflecting logical proximity. The representation vector corresponding to semantic block summary 513 can retain supplementary semantics in the original natural language and is used to absorb some contextual information that is not fully expressed by the structured slots. These three should not be simply weighted equally. For empirical consistency verification, the logical part is often more important than entity aliases and natural language summaries. Therefore, the empirical representation generation module 501 can obtain empirical representation 514 in a weighted manner:

[0066]

[0067] in, Experience is represented by 514; This represents the entity representation vector generated based on business entity information 511; This represents the rule representation vector generated based on the business rule expression information 512; This represents the summary representation vector generated based on semantic block summarization 513; , and This represents the fusion weight, and the sum of the three can be 1.

[0068] After adopting equation (3), the empirical expression 514 shows that its response to logical similarity is more stable. If two empirical expressions are not significantly different in entity names but have significantly different rule structures, The contributions of these two experiences will differentiate them. If two experiences are similar in formula structure but completely different in entity representation, It can also provide topic constraints to prevent irrelevant rules from being mistakenly recalled. (Summary representation vector) It then serves as a buffer, preserving the semantic background that is not fully unfolded during the structured mapping process.

[0069] Figure 5 The candidate retrieval unit 502 performs nearest neighbor retrieval in the existing experience base 503 based on the experience representation 514, obtaining a candidate experience set 504. The existing experience base 503 may include a structured experience index 531, a representation vector index 532, and a source information index 533. The vector index 532 is suitable for performing semantic nearest neighbor recall, while the structured experience index 531 is suitable for quickly locating the corresponding business rule expression information and metadata after recall. The candidate experience set 504 is not required to contain only one record. In cases where there are many enterprise document versions and many synonym expressions, the same new experience often recalls multiple similar items. Multiple candidate recall is a reasonable phenomenon, and the subsequent consistency verification stage will further distinguish which are duplicates, which are enhancements, and which are conflicts.

[0070] To avoid local false recall caused by pure vector similarity, in one embodiment, the candidate retrieval unit 502 can also introduce a topic filtering process. For example, it first filters out candidate ranges with the same or similar topics based on standard entity identifiers in the noun paradigm, and then performs vector retrieval within this range according to empirical representation 514. The motivation for doing this is that some general logical structures may behave similarly in different business domains, such as counting by time window or filtering orders by status. Without topic restrictions, the system may recall rules that do not belong to the same business concept as candidate experiences. After topic filtering, the similarity of the candidate set is more concentrated, and the computational cost of subsequent structured comparison is easier to control.

[0071] Up to this point, the semantic block has been transformed into structured empirical data 402, and further transformed into empirical representation 514 for candidate retrieval. After this stage of processing, Figure 1 The process no longer relies on raw natural language for primary judgment, but instead focuses on processing information expressed through structured results and business rules. This change directly impacts subsequent verification steps. If the internal structure of the experience is not clearly deconstructed here, subsequent consistency checks can only perform coarse-grained comparisons of the entire text, easily misjudging supplementary differences as conflicts and easily burying genuine rule mutual exclusions in text similarity. By deconstructing these contents in advance during the structured mapping stage, subsequent verification steps have clear processing objects and a more stable comparison basis.

[0072] Figure 5 After the candidate experience set 504 is generated, Figure 1 The process then enters the consistency verification phase. The object of processing in this phase is no longer the original semantic block, nor the overall text vector, but rather information expressed around business rules. The candidate retrieval phase primarily aims to recall potentially relevant existing experiences, addressing the issue of incomplete recall. The consistency verification phase, on the other hand, determines whether new experiences and candidate experiences are synonymous complements, differ in terminology, or logically mutually exclusive, addressing the issue of misjudgment. If the coarse-grained representation used in candidate retrieval is still employed, experiences that appear similar but have different computational structures are easily misjudged as consistent, while experiences that differ only in expression may be misjudged as conflicting.

[0073] Figure 6 This illustrates the standardized preprocessing process for business rule expression information. After the newly generated structured experience data 402 contains business rule expression information 601, and the candidate business rule expression information 602 contains candidate experience set 504, they enter the standardized preprocessing unit 603 to obtain standardized logical expressions 604 and 605. The standardized preprocessing unit 603 typically includes an entity linking subunit 611, an operator normalization subunit 612, a numerical and temporal normalization subunit 613, and an expression structure rearrangement subunit 614. This layer of processing is designed because the expression methods of rules in enterprise documents vary considerably; the same logic can be written in multiple ways. Without prior normalization, subsequent structural comparisons may mistake differences in expression for differences in logic.

[0074] Entity Linking Subunit 611 handles the alignment issue between variable names and business entities. In enterprise documentation, the same business object may be written as sales revenue, revenue, transaction amount, or an abbreviation in different documents. If these different names ultimately point to the same business entity, and the system treats them as different variables during comparison, two rules with identical structures will be judged as different. To address this, Entity Linking Subunit 611 can uniformly replace variable names in the rule expression information based on the standard entity names, alias list, and entity mapping identifiers in Noun Normal Form 403. The unified result does not necessarily have to be directly equal to the actual field name in the database; it can also be mapped to an intermediate entity identifier, for example... , , The use of intermediate entity identifiers has a practical consideration: it allows for the separation of the unified semantic layer of documents from the binding of underlying database physical fields, avoiding premature fixation of the specific data warehouse implementation in the rule comparison chain.

[0075] The operator normalization subunit 612 handles the unification of natural language relational terms, mathematical symbols, and conditional expressions. In natural language, terms representing subtraction relationships include subtract, deduct, remove, and reduce; terms representing inclusion relationships include include, count, and incorporate; and terms representing conditional relationships include when…, if…then, and satisfy… If these expressions are not unified, subsequent structured comparisons are easily affected by redundant language differences. Therefore, the operator normalization subunit 612 can map these natural language relations to standard symbols in a predefined set of operators. For example, subtract and deduct are unified as subtraction operators, include and belong to are unified as set inclusion operators, and greater than and exceed are unified as comparison operators. Here, the normalized symbols are not required to be completely equivalent to the syntax of a particular programming language or query language; they only need to have consistent meaning within this processing chain.

[0076] The numerical and time normalization subunit 613 addresses another common type of discrepancy: the use of different units or time expressions for the same business constraint. For example, monthly active users might be written as within the past 30 days, while some documents might use "within the past month"; a monetary threshold might be written as 10,000 yuan or 10,000 yuan. If subsequent comparisons are made directly using string comparisons, these rules will show discrepancies, but from a business semantics perspective, they don't necessarily constitute a conflict. Subunit 613 can convert time expressions into standard time windows and numerical values ​​and units into a unified dimension. After this processing, subsequent structured comparisons will focus more on the business logic relationships themselves, rather than the colloquial writing style.

[0077] The expression structure rearrangement subunit 614 is used to rearrange the canonical order of the standardized logical expressions. Its main function is in conditional combination expressions. For example, conditional... And conditions With conditions And conditions Logically equivalent, but with different character orders. If the expression structure is not normalized, subsequent comparisons will treat them as different. Reordering can be done using sorting, set-based methods, or regularized traversal. For parallel conditions, sorting can be done by field identifiers and operator combinations; for hierarchical conditions, normalized expressions can be output according to tree structure traversal order. This step does not change the logic, but only projects the equivalent expressions into a more consistent form.

[0078] In one embodiment of the present invention, the standardized preprocessed logical expression can be denoted as: If the original business rule expresses the information as follows: Then standardized logical expression It can be derived from the standardized transformation function Information expressed based on original business rules Entity mapping set Operator Mapping Set and a set of time and numerical normalization rules The relationship between them can be represented as follows:

[0079] (4)

[0080] in, Represents standardized logical expression, Represents the standardized transformation function. This indicates the information expressed by the original business rules. This represents a set of entity mappings used to perform entity linking. This represents the set of operator maps used to perform operator normalization. This represents a set of time and numerical normalization rules used to unify time windows and dimensional expressions. Equation (4) does not require standardization to be completed in one step. In actual implementation, It can be executed in stages or iteratively according to rule priorities. The key is that, after... After processing, synonyms will converge to similar or even identical logical forms as much as possible, while the real differences in rules can still be preserved.

[0081] Figure 7The diagram illustrates the processing steps after standardized logical expressions 604 and 605 enter the structured comparison unit 701. The structured comparison unit 701 may include a topic alignment subunit 711, a slot alignment subunit 712, and a structural difference analysis subunit 713. The topic alignment subunit 711 first determines whether the new experience and candidate experiences represent the same business topic. Here, the business topic does not necessarily refer to a high-level business domain, but rather something closer to a core object or metric, such as net profit, monthly active users, or refund amount. If two experiences do not belong to the same topic, even if their expressions are similar, they usually do not constitute objects requiring in-depth verification. Performing topic alignment first reduces invalid comparisons and avoids similar formulas under different topics from mistakenly entering conflict judgments.

[0082] After topic alignment is successful, slot alignment subunit 712 compares the key slots in the standardized logical expression. For rule expressions with a triple structure, slots typically include lvalues, operators, and rvalues. For tree structure expressions, slots can be expanded to include root nodes, main operation nodes, condition nodes, and leaf variable sets. The significance of slot alignment lies in first identifying the core differences most likely to cause conflicts. If the lvalues ​​of two rules are different, it often means they are defining different objects; even if the rvalues ​​are similar, it is not advisable to directly determine a conflict. If the lvalues ​​are the same but the rvalues ​​are different, it is closer to a true difference in definition or a conflict. Therefore, slot alignment is usually used as a preliminary step in structural difference analysis.

[0083] In a simpler implementation, the slot alignment subunit 712 can align the left value in the triplet. operators and rvalue Compare them separately. If... If they are different, it is recorded as a topic offset and will not be included in the strong conflict judgment; if Same and or If they differ, proceed to the structural difference analysis subunit 713. This design is because identical left-hand values ​​indicate that both experiences are attempting to define the same business object, while differences in right-hand values ​​or operational relationships truly affect the computational scope of that object. For tree structure representations, the root node and first-level child nodes can be compared first. If these are already significantly different, there is no need for deeper traversal; if the main branches are consistent but local subtrees differ, then proceed to fine-grained tree difference analysis.

[0084] The structural difference analysis subunit 713 is used to quantify the degree of difference between two rules in their logical structure. In one embodiment, if the business rule expresses information using a tree structure, the structural difference can be calculated using tree edit distance or substructure difference. Considering that the expressions in enterprise documents are not always extremely complex, a more practical approach is to first calculate the difference in the main subtree and then add the difference in the condition nodes. This approach is closer to the business semantics than simply comparing the character forms of the entire tree, and it is also easier to control computational costs than calculating the exact tree edit distance.

[0085] If the new experience tree structure is denoted as The candidate experience tree structure is denoted as Then the degree of structural difference It can be obtained by weighting the differences in the main operation structure, the differences in the condition nodes, and the differences in the leaf variable sets. The relationship can be represented as follows:

[0086] (5)

[0087] in, Representing the new experience tree structure With candidate experience tree structure The degree of structural difference between them This indicates differences in the main operational structure. Indicates the difference in condition nodes. Indicates the difference between the leaf variable sets. , and This represents the weighting coefficient.

[0088] One consideration for adopting Equation (5) is that different sources of difference have varying degrees of impact on business conflicts. Different main structures usually mean different calculation logic; different condition nodes often correspond to differences in applicable scope or screening criteria; different leaf variables may indicate changes in calculation factors. By separating the sources of difference, subsequent inventory control can no longer only obtain a general result of similarity or dissimilarity, but can know where the differences mainly lie.

[0089] In addition to structural differences Figure 7 The semantic auxiliary unit 714 can also generate semantic similarity to correct implicit equivalence relations that may have been missed during the standardization process. This is because some business rules may differ structurally, but remain consistent in their business definitions. For example, one document states "total cost," while another states "the sum of direct and indirect costs." If the noun paradigm already indicates that total cost includes both direct and indirect costs, then these two expressions may not conflict in business terms. Relying solely on structural differences would tend to classify them as different; introducing semantic similarity can negatively correct this situation.

[0090] In one embodiment, logical mutual exclusion It can be determined by structural differences. and semantic similarity Determined jointly. More specifically, the degree of logical mutual exclusion. It can be obtained by weighting two parts: one part comes from structural dissimilarity. Another part comes from the degree of semantic inconsistency, namely The corresponding weights can be denoted as... and ,in, It can be set higher This is to give greater weight to structural differences in conflict determination. The relationship can be represented as follows:

[0091] (6)

[0092] in, Indicates the degree of logical mutual exclusion. Indicates the degree of structural difference. Indicates semantic similarity. and represents the weighting coefficient. Using equation (6), the system will neither ignore structural mutual exclusion due to superficial similarity in natural language, nor prematurely determine conflict due to slight differences in structural form. Here, semantic similarity is not intended to replace structural comparison, but rather to correct the boundaries of structural comparison. This is particularly valuable for enterprise knowledge governance scenarios, as documents written by different departments and at different times often overlap and have subtle differences, making it difficult for a single indicator to stably cover all situations.

[0093] Figure 7 The difference point marking unit 715 in the calculation can also be used to calculate the degree of logical mutual exclusion. When discrepancies occur, the source of the discrepancy is recorded, such as inconsistent left values, missing condition items, addition of additional cost items, or expansion of the time window. This discrepancy label is useful in subsequent inventory control and manual verification. Especially in weak conflict scenarios, if the system only provides a mutual exclusion score, the cost of manual review is still relatively high; if a discrepancy point marker is also provided, the reviewer can more quickly determine whether it belongs to a rule update, rule supplement, or rule conflict.

[0094] From a process perspective, the consistency verification stage further processes the multiple similar experiences recalled in the candidate retrieval stage in a tiered manner. Candidate retrieval primarily addresses the issue of incomplete recall, while structured comparison addresses the issue of misjudgment. The two are not substitutes for each other, but rather complementary. Without candidate retrieval, directly performing a structured comparison of each new experience with the entire experience base is costly; without structured comparison, candidate retrieval alone would lead to the simplistic categorization of many superficially similar rules into the same type. Figure 6 and Figure 7 The processing chain in the system separates these two types of problems, making the input judgment of the experience base more stable.

[0095] In one different implementation, if the rule expressions in a certain business domain are highly templated, such as an operational activity caliber table or a financial system entry table, template matching priority can be added to the standardized preprocessing. That is, before entity linking and operator normalization, it is first determined whether the current rule matches a predefined rule template. If the match is successful, it can be directly mapped to the standard logical expression. This approach can reduce parsing fluctuations in highly templated scenarios. However, for documents with a high degree of freedom in natural language, such as meeting minutes or requirements analysis specifications, this approach is usually not suitable for use alone and still needs to be retained. Figure 6 The common standardized link in it serves as a backup.

[0096] At this point, the degree of logical mutual exclusion between structured experience data and candidate experience can be quantified. This quantification does not directly imply that a particular rule is necessarily wrong, but rather provides a basis for subsequent data entry control decisions. The subsequent processing does not simply divide data into similarity and dissimilarity, but rather combines the interval of mutual exclusion, the location of differences, and the existence of candidate experience to adopt different data entry paths. This approach more closely reflects the actual state of enterprise business knowledge, because business knowledge, in addition to being correct and incorrect, commonly involves supplementation, replacement, evolution, and parallel interpretation.

[0097] Figure 8 This illustrates the inbound control process after the consistency check is completed. The logical mutual exclusion level has already been determined in the previous stage. Including the results of difference point marking, the entry control is no longer simply about adding new experience to the experience base or discarding it directly. Instead, it selects different processing paths based on the range of mutual exclusion, the location of the difference, and the existence of candidate experience. The reason for this approach is that enterprise-level business knowledge is not static. Some new experience clearly conflicts with existing experience and is indeed unsuitable for automatic entry; others merely supplement existing rules or add aliases, time descriptions, or additional constraints. If all such content were subject to manual review, it would make the knowledge governance process too slow. Therefore, Figure 8 The inbound control unit 801 is closer to a diversion mechanism than a single pass or reject mechanism.

[0098] In one embodiment of the present invention, the warehouse entry control unit 801 can receive structured experience data 402, candidate experience set 504, and logical mutual exclusion degree. The system also outputs the difference point marking result 802, and outputs conflict warning information 803, records to be confirmed 804, merge update result 805, or new entry result 806. Figure 8The outputs shown are not mutually exclusive single actions throughout the entire system lifecycle, but rather correspond to different endpoints of the same new experience under different judgment conditions. This setup allows the experience processing chain to maintain a balance between automation efficiency and knowledge base consistency. If all new experiences are automatically added to the knowledge base, the knowledge base will expand faster, but logical conflicts and duplicate definitions will also accumulate more quickly. If all new experiences are manually reviewed, while the consistency of the knowledge base is more stable, system throughput and knowledge update timeliness will significantly decrease.

[0099] In a specific example, the inbound control unit 801 can preset at least two thresholds, denoted as the first preset threshold. Second preset threshold ,in, Greater than Degree of logical mutual exclusion The relationship between these two thresholds can be used to divide the region into strong conflict regions, weak conflict regions, and consistent or compatible regions. The determination relationship can be expressed as follows:

[0100] (7)

[0101] in, Indicates the degree of logical mutual exclusion. This represents the first preset threshold. Indicates the second preset threshold, and .

[0102] Using a two-tiered threshold system instead of a single threshold has a more practical consideration. Differences in business knowledge cannot always be reduced to explicit conflicts or non-conflicts. Some differences lie in the middle ground; for example, the conditions for the same metric may change slightly in different versions, or a boundary constraint may be added to the same rule. In such cases, if there is only one threshold, the system often makes an overly rigid choice between automatic data entry and complete blocking. Introducing a weak conflict range allows for the temporary storage of this portion of experience that requires confirmation but is not obviously erroneous, to be handled by subsequent confirmation processes.

[0103] when Greater than the first preset threshold hour, Figure 8The conflict handling subunit 811 can output conflict warning information 803 and restrict the automatic entry of structured experience data 402 into the database. Restricting automatic entry does not mean directly deleting the corresponding data; instead, it writes the structured experience data 402 and its discrepancy markers into the conflict buffer 807. The conflict buffer 807 can record the source document identifier, original semantic block, standardized logical expression, candidate experience identifier, mutual exclusion degree value, and discrepancy list of the new experience. After this processing, conflicting experiences will not enter the main experience database, but will still retain the context required for subsequent backtracking and manual judgment. This is particularly important for enterprise scenarios. Because some so-called strong conflicts may actually stem from changes in business terminology, old documents not being taken offline, or inconsistent definitions of the same concept across departments. If the system only rejects the conflict without retaining the context, it will be difficult to quickly locate the source of the conflict during subsequent governance.

[0104] Conflict warning information 803 can include candidate experience identifiers, a summary of differences, and suggested review priorities. The summary of differences can be generated from the difference marking results 802, such as identical left-hand values ​​but inconsistent right-hand value components, opposite filtering conditions, or expanded or narrowed time windows. Review priorities can be determined based on the degree of mutual exclusion. The size of the candidate experience and its frequency of reference in the experience base are jointly determined. If a candidate experience has been frequently called by the downstream query generation module, and a new experience strongly conflicts with it, then this conflict is more suitable to be prioritized. This can reduce the impact of high-frequency knowledge in the experience base being in a state of conflict for a long time.

[0105] when At the second preset threshold With the first preset threshold In between, Figure 8 The pending confirmation processing subunit 812 can mark the structured experience data 402 as pending confirmation and generate a pending confirmation record 804. The pending confirmation state differs from strong conflict blocking. At this time, the system does not assume that the new experience and the candidate experience are necessarily incompatible, but rather considers that the current differences are insufficient to support automatic merging and are not suitable for direct automatic storage. The pending confirmation record 804 can be written to the pending confirmation queue 808, maintaining the association index with the candidate experience. If a review action is triggered subsequently, the reviewer can see the side-by-side display of the old and new experiences, the difference markers, and the source document information.

[0106] In one implementation, the confirmation processing subunit 812 can also attach a confirmation suggestion type to each record 804 to be confirmed. Confirmation suggestion types can include version update suggestions, rule supplement suggestions, parallel criteria suggestions, and manual review suggestions. If the differences mainly lie in the time window or additional conditions, and the source of the new experience is significantly later than the candidate experience, it is more likely to be a version update suggestion; if the differences mainly manifest as adding aliases or supplementing constraints, it is more likely to be a rule supplement suggestion; if the differences are concentrated on the scope limitations such as applicable departments or applicable regions, it is more likely to be a parallel criteria suggestion. The advantage of this design is that the confirmation queue 808 does not merely accumulate unresolved matters, but rather provides an initial direction for processing, thereby reducing the judgment cost during subsequent verification.

[0107] when Less than or equal to the second preset threshold hour, Figure 8 The merging enhancement subunit 813 can determine whether the new experience and the candidate experience have a consistent or compatible relationship. At this point, the system does not simply discard the new experience as a duplicate, but continues to determine whether the new experience contains supplementary information that has not yet been recorded in the candidate experience. This supplementary information typically includes added synonyms, added constraints, source updates, rule interpretation enhancements, or process step completions. If such information exists, merging or enhancement processing can be performed on the candidate experience, generating a merge update result 805; if no content can be incrementally absorbed, only the source information or the most recent verification time can be updated, without repeatedly writing the entire rule.

[0108] In one embodiment, the merging enhancement subunit 813 can first perform a field-level comparison between the new experience and the candidate experience. This field-level comparison is not limited to the business rule expression information in the logical paradigm 404, but can also cover synonyms in the noun paradigm 403 and step descriptions in the process paradigm 405. If the new experience adds an entity alias that is not yet recorded in the candidate experience, then the alias is written into the alias field of the candidate experience; if the new experience adds an additional constraint that does not conflict with existing logic, then the additional constraint is attached to the corresponding condition field of the candidate experience; if the new experience provides a more complete source description or a later version of the source identifier, then the source information 406 is updated with this information. After this processing, the knowledge items in the experience base will gradually become more complete as documents flow in, rather than continuously generating superficially similar duplicate records.

[0109] In a specific example, let the newly added synonym set in structured empirical data 402 be denoted as The newly added set of constraints is denoted as The original set of synonyms in the candidate experience is denoted as The original set of constraints is denoted as Then the enhanced set of synonyms With the enhanced set of constraints They can be obtained separately through the union operation, and their relationship can be represented as follows:

[0110] (8)

[0111] in, This represents the enhanced set of synonyms. This represents the original set of synonyms in the candidate experience. This represents the newly added set of synonyms provided by new experiences. This represents the enhanced set of constraints. This represents the set of original constraints in the candidate experience. Represents the set of new constraints provided by new experience, denoted by [symbol]. This indicates the set union operation.

[0112] Equation (8) does not express a simple data concatenation, but rather an incremental merging relationship for knowledge base fields. The union operation is used here because synonyms and compatible constraints are usually cumulative, provided that the consistency check passes. Of course, this accumulation is not without boundaries. If the new constraint and the existing constraint do not reach a strong conflict level, but there is a clear covering or substitution relationship, the merging enhancement subunit 813 can also first write it into the version candidate area, and then the version management logic decides whether to replace the original field content.

[0113] If no candidate experience is found during the candidate retrieval phase, then Figure 8 The new write subunit 814 can write the structured experience data 402 as new experience into the main experience database 809 and generate the new entry result 806. This new write is not limited to simply appending a record; it can also simultaneously create corresponding representation vector indexes, source indexes, and topic indexes. This is because when similar experiences arrive later, it is necessary to be able to quickly retrieve the new experience through experience representation and topic filtering. If only the main record is written without updating the indexes, subsequent knowledge links will encounter the problem of difficulty in recalling records already in the database.

[0114] In one embodiment, each experience in the main experience base 809 can simultaneously maintain an experience master record, a version record, and an index record. The experience master record is used to store currently available normalized results; the version record is used to store historical change trajectories; and the index record is used to support vector retrieval, topic retrieval, and source retrieval. The reason for maintaining these three types of records separately is that business knowledge, in actual use, requires both clear and callable current rules and traceable historical changes. If there is only a current master record and no version record, it is difficult to determine why a certain rule was updated; if there is only a version chain and no stable current master record, downstream modules need to make additional selections among multiple versions, which complicates the processing chain.

[0115] Figure 8 The version management subunit 815 can synchronously update the version record when merging enhancements or adding new writes. If a new experience is determined to be an enhancement of an old experience, version management subunit 815 can retain the same experience identifier and only add the version number or update time; if a new experience is determined to be a parallel application, different application branches can be generated under the same topic and distinguished by the applicable scope field; if a new experience eventually replaces an old experience, the old version can be marked as a historical state, while the new version is set as the currently effective state. After this processing, the experience repository will not lose its interpretability in the time dimension due to continuous writes.

[0116] In one different implementation, the entry control can be further refined by combining the frequency of experience citations or the confidence level of experience. For example, when a candidate experience is already frequently invoked in the conversational business intelligence system, even if a new experience is in a weak conflict zone, it can be prioritized for entry into the confirmation queue 808 instead of directly executing automatic enhancement. The reason for this is that if frequently used experience is incorrectly overwritten, the downstream query results will be more significantly affected. Conversely, for candidates with lower citation frequencies, newer sources, and more complete expressions, the tolerance for automatic enhancement can be appropriately increased. This type of processing does not change the aforementioned main process; it only makes fine adjustments to the triage results after threshold judgment to better reflect the business usage.

[0117] Overall, Figure 8 The inbound control process creates a relatively complete closed loop in the experience processing chain. Semantic sharding ensures the basic integrity of business experience, structured mapping provides a clear carrier for rule comparison, consistency verification moves the differences between new and old experience from the text layer to the logic layer, and inbound control transforms the difference results into actual knowledge governance actions. In this way, the system does not mechanically write all information from unstructured documents into the experience database, but distinguishes between conflicting, supplementary, compatible, and newly added scenarios before writing. For conversational business intelligence scenarios, this distinction reduces confusion within the experience database and also helps improve the stability of the downstream query generation process.

[0118] In one embodiment of the present invention, by Figures 1 to 8 The embodiments of the method flow shown can achieve the following technical results: By segmenting unstructured business documents based on the semantic boundaries corresponding to business logic intent, the definition content, calculation relationships, and constraints in the same business experience can be kept in the same semantic block as much as possible, thereby reducing logical fragmentation caused by mechanical segmentation; by converting semantic blocks into structured experience data and generating business rule expression information, the natural language experience that originally relied mainly on human understanding can be transformed into knowledge units more suitable for program processing; by retrieving candidate experiences and performing consistency checks before entering the database, the duplicate relationships, compatible relationships, and conflict relationships between new and old experiences can be distinguished; by performing conflict warning, pending confirmation processing, merging enhancement, or new writing for strong conflicts, weak conflicts, and consistent or compatible cases respectively, the possibility of logically inconsistent experiences directly entering the experience database can be reduced, and the business rules of the experience database can maintain good traceability and consistency.

[0119] Based on the aforementioned method embodiments, corresponding device embodiments can also be obtained. Figure 9 A device 900 for extracting and verifying experience from unstructured documents is shown. This device 900 can be deployed on servers, private cloud nodes, industry knowledge governance platforms, or other computing devices with document processing and knowledge database retrieval capabilities. Structurally, the device 900 may include a semantic sharding module 901, a structured mapping module 902, a candidate retrieval module 903, a consistency verification module 904, and an ingestion control module 905. These modules can be implemented by software instructions or by a combination of software and hardware. For scenarios with high computational demands, such as large-scale batch document processing, high concurrency vector retrieval, or continuously expanding experience databases, the modules can be deployed in a distributed manner; for small- to medium-sized single-domain knowledge governance scenarios, the modules can be centrally deployed on the same processing node.

[0120] The semantic segmentation module 901 is used to acquire unstructured business documents, identify the business logic intents within the unstructured business documents, and divide the unstructured business documents into multiple semantically complete semantic blocks based on the semantic boundaries corresponding to the business logic intents. This module, in its implementation, may include a document parsing submodule 911, an intent recognition submodule 912, and a boundary generation submodule 913. The document parsing submodule 911 converts the business document into hierarchical text; the intent recognition submodule 912 identifies business logic fragments in the text that represent business definitions, calculation rules, constraints, or operational processes; and the boundary generation submodule 913 determines the start and end positions of the business logic fragments and outputs the corresponding semantic blocks. If the input document contains both text segments and table segments, the document parsing submodule 911 can also first expand the table structure into text segments with row and column semantics before handing them over to the intent recognition submodule 912 for processing.

[0121] The structured mapping module 902 performs structured mapping processing on each semantic block to generate structured experience data. This structured experience data includes business rule expression information used to represent business calculation rules or constraint relationships. This module may include a paradigm generation submodule 921, a rule expression generation submodule 922, and a source record submodule 923. The paradigm generation submodule 921 maps semantic blocks to at least one of noun paradigm, logical paradigm, and process paradigm; the rule expression generation submodule 922 forms business rule expression information from the logical paradigm, outputting a triple structure when rule complexity is low and a tree structure when rule complexity is high; the source record submodule 923 records the position of the semantic block in the original document, the source document identifier, and the version context. After this processing, the structured experience data retains both the rules themselves and a source chain sufficient to support subsequent backtracking and review.

[0122] The candidate retrieval module 903 is used to generate experience representations based on structured experience data and retrieve candidate experiences from the existing experience database based on these experience representations. The candidate retrieval module 903 may include a representation generation submodule 931 and a nearest neighbor recall submodule 932. The representation generation submodule 931 can generate corresponding representation vectors based on business entity information, business rule expression information, and semantic block summary information, respectively, and fuse these representation vectors to obtain the experience representation. The nearest neighbor recall submodule 932 performs nearest neighbor retrieval in the existing experience database based on the experience representation and returns a set of candidate experiences that meet similarity conditions. If it is necessary to improve the topic consistency of the recall results, the nearest neighbor recall submodule 932 can also add a topic filtering process before vector retrieval, that is, first filter the candidate range according to entity mapping identifiers or topic tags, and then perform vector nearest neighbor retrieval.

[0123] The consistency verification module 904 performs consistency verification between structured experience data and candidate experiences based on business rule expression information when candidate experiences are retrieved. This module may include a standardization preprocessing submodule 941, a structured comparison submodule 942, and a difference labeling submodule 943. The standardization preprocessing submodule 941 performs entity linking, operator normalization, numerical normalization, and time normalization on the business rule expression information in new and candidate experiences to obtain standardized logical expressions. The structured comparison submodule 942 performs slot alignment and difference analysis on triplet or tree structures under the premise of topic alignment and outputs the degree of logical mutual exclusion. The difference labeling submodule 943 records the location and type of differences, such as lvalue differences, condition node differences, or leaf variable differences. Thus, the consistency verification module 904 outputs not just an abstract similarity value, but a set of judgment results that can directly support the data entry decision.

[0124] The inbound control module 905 is used to perform inbound control on structured experience data based on the consistency verification results. The inbound control module 905 may include a conflict handling submodule 951, a pending confirmation handling submodule 952, a merge enhancement submodule 953, a new write submodule 954, and a version management submodule 955. The conflict handling submodule 951 outputs conflict warning information and restricts automatic inbound of structured experience data when the logical mutual exclusion degree is greater than a first preset threshold; the pending confirmation handling submodule 952 marks the structured experience data as pending confirmation and writes it to the pending confirmation queue when the logical mutual exclusion degree is between two preset thresholds; the merge enhancement submodule 953 performs merge or enhancement processing on the structured experience data and candidate experiences when the logical mutual exclusion degree is less than or equal to a second preset threshold; the new write submodule 954 writes the structured experience data as new experience into the experience database when no candidate experience is found; and the version management submodule 955 maintains the association between the experience master record, version record, and index record. With this configuration, the device 900 does not process all document experiences in a single path, but instead diverts experiences in different consistency states to different subsequent actions.

[0125] In one embodiment, the modules described above in device 900 can exist logically independently or be deployed in combination according to the execution chain. For example, the semantic sharding module 901 and the structured mapping module 902 can be deployed on the same preprocessing service node to reduce the cost of repeated serialization during the transmission of semantic blocks across the network; the candidate retrieval module 903 and the consistency verification module 904 can share part of the entity mapping cache and candidate index cache to reduce repeated queries; the database entry control module 905 can be deployed on the same transaction processing layer as the experience database write interface to uniformly maintain state consistency between conflict blocking, pending confirmation writes, and version updates. This type of deployment change does not change the functional boundaries of device 900, but only adapts to the engineering implementation methods under different computing resources and throughput requirements.

[0126] Figure 10 An electronic device 1000 for implementing the above method is shown. The electronic device 1000 may include a processor 1001, a memory 1002, a communication interface 1003, a display interface 1004, and a bus 1005. The processor 1001 may be a central processing unit, a graphics processing unit, a dedicated neural network processor, or other computing components with data processing capabilities. The memory 1002 may include volatile and non-volatile memory for storing program instructions, intermediate results, experience indexes, and configuration parameters. The communication interface 1003 is used to communicate with a document management platform, a knowledge base service, a vector retrieval service, or an external management terminal. The display interface 1004 may be omitted in server-side implementations, but in devices with a management console, it can be used to present conflict warning information, pending confirmation records, and knowledge version difference results. The bus 1005 is used to transmit data between the processor 1001, the memory 1002, and the communication interface 1003.

[0127] In one embodiment, the memory 1002 may store a computer program. When the computer program is executed by the processor 1001, the electronic device 1000 performs the steps described in the aforementioned method embodiment. More specifically, the processor 1001 may invoke a document parsing program to perform hierarchical parsing of unstructured documents, invoke a semantic recognition program to perform business logic intent recognition and semantic boundary generation, invoke a structured mapping program to form noun paradigms, logical paradigms, and process paradigms, invoke a retrieval program to form experience representations and retrieve candidate experiences from the experience base, invoke a consistency verification program to complete entity linking, standardization preprocessing, and structured comparison, and finally invoke an entry control program to distribute new experiences to a conflict buffer, a pending confirmation queue, or the main experience base. Thus, each processing step in the method embodiment can be executed programmatically on the electronic device 1000.

[0128] If the electronic device 1000 is deployed within the conversational business intelligence platform, its output can also be invoked by the downstream query generation chain. For example, after understanding the user's natural language question, when the downstream query generation module needs to determine the calculation method, filtering conditions, or time window for a certain indicator, it can directly query the experience base governed by this embodiment. Since the experience in the experience base has undergone structured mapping and consistency verification, the knowledge items received by the downstream module usually have clearer logical boundaries and better consistency. This connection does not require adding new processing steps in this embodiment, but it illustrates the role of the aforementioned experience extraction and consistency verification process in the overall system chain.

[0129] In one different embodiment, the electronic device 1000 can also be implemented using a hybrid edge and central deployment approach. Document parsing and initial semantic sharding can be completed on the side closer to the data source to reduce bandwidth consumption during large-scale uploading of original documents; structured mapping, candidate retrieval, and consistency verification can be performed centrally on the central node to uniformly use a global experience base and unified threshold configuration; and data entry control and version management can be consistent with the central knowledge governance platform. With this deployment, module boundaries and... Figure 9 The logical modules remain the same, only the execution location differs. For scenarios involving data security isolation or cross-organizational document governance, this deployment method is more suitable for balancing local processing needs and centralized knowledge management requirements.

[0130] In one embodiment of the present invention, the aforementioned method embodiments, device embodiments, and electronic device embodiments are mutually corresponding. The descriptions of semantic segmentation, structured mapping, candidate retrieval, consistency verification, and database entry control in the method embodiments can also correspond to the functional modules in device 900 and the program instruction execution process in electronic device 1000. Therefore, the foregoing embodiments not only illustrate the implementation of the solution in terms of algorithm flow but also its implementation at the system deployment and device execution levels. For scenarios where unstructured business documents continuously flow in, experience definitions continuously evolve, and need to be stably invoked by conversational business intelligence systems, the above implementation methods can jointly support the continuous updating and consistency maintenance of the experience base.

[0131] Thus, the method embodiments, device embodiments, and electronic device embodiments in the specific implementation details have been described. Without departing from the inventive concept, the semantic segmentation strategy, structured mapping strategy, candidate retrieval strategy, consistency verification strategy, and database entry control strategy can all be adapted and adjusted according to the characteristics of the business domain. As long as semantic segmentation is still performed around the business logic intent in unstructured business documents, structured mapping and consistency verification are performed around the information expressed by business rules, and database entry control is executed on structured experience data based on the consistency verification results, all fall within the technical concept of this invention.

[0132] It should be understood that the method steps in the foregoing embodiments can be implemented by program instructions controlling related hardware, or by dedicated circuits, programmable logic devices, or a combination thereof. Correspondingly, the systems, devices, modules, units, or components in the foregoing embodiments can be implemented in software, hardware, or a combination of both. The division of modules, units, or components is merely a logical division for the purpose of illustrating the technical solution; in actual implementation, they can be combined, split, or integrated as needed.

[0133] In one embodiment, the electronic device may include a processor, a memory, and a communication interface, wherein the memory is used to store program instructions, and the processor is used to call and execute the program instructions to implement all or part of the steps in the foregoing method embodiments. The electronic device may be a server, a terminal device, an edge computing node, a cloud computing device, or other device with data processing capabilities.

[0134] In one embodiment, this application may also be implemented in the form of a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to implement all or part of the steps in the foregoing method embodiments. The computer-readable storage medium may be a read-only memory, random access memory, flash memory, hard disk, solid-state drive, optical disk, or other non-transitory storage medium.

[0135] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0136] Furthermore, the terms "including," "comprising," and "having" used in the specification are all non-exclusive inclusions; the terms "first," "second," etc., are only used to distinguish technical features and do not indicate limitations on order, quantity, or importance. The execution order of each step in the method embodiments is not strictly limited. Without departing from the technical concept of this application, the steps can be adjusted in order, executed in parallel, combined, or split.

Claims

1. A method for extracting experience and verifying consistency in unstructured documents, comprising: Obtain unstructured business documents, identify the business logic intent in the unstructured business documents, and divide the unstructured business documents into multiple semantically complete semantic blocks based on the semantic boundaries corresponding to the business logic intent; Perform structured mapping processing on each of the semantic blocks to generate structured experience data, which includes business rule expression information used to characterize business calculation rules or constraint relationships; An experience representation is generated based on the structured experience data, and candidate experiences are retrieved from the existing experience database based on the experience representation. If the candidate experience is retrieved, a consistency check is performed between the structured experience data and the candidate experience based on the business rule expression information; The structured experience data is subject to data entry control based on the consistency verification results.

2. The method as described in claim 1, wherein, Identify the business logic intent in the unstructured business document, and based on the semantic boundaries corresponding to the business logic intent, divide the unstructured business document into multiple semantically complete semantic blocks, including: Convert the unstructured business document into text with a hierarchical structure; Identify business logic segments in the text that represent business definitions, calculation rules, constraints, or operational processes; Determine the start and end positions of each business logic segment, and use the text located between the start and end positions as the corresponding semantic blocks.

3. The method as described in claim 1, wherein, Perform structured mapping processing on each of the semantic blocks to generate structured empirical data, including: Each of the semantic blocks is mapped to at least one of the noun paradigm, logical paradigm, and process paradigm; The noun paradigm is used to represent business entities, synonyms, and business terms; the logical paradigm is used to represent calculation formulas, filtering conditions, sorting rules, or time period dependencies; and the process paradigm is used to represent multi-step business processes.

4. The method as described in claim 1 or 3, wherein, The business rule expression information includes core logic fields, which include at least one of the calculation formula, filtering conditions, or sorting rules in the logical paradigm; the calculation formula is represented by a triplet structure or a tree structure, and the triplet structure includes at least an lvalue, an operator, and an rvalue.

5. The method of claim 1, wherein, Generate an experience representation based on the structured experience data, and retrieve candidate experiences from the existing experience database based on the experience representation, including: Based on the business entity information, business rule expression information, and semantic block summary information in the structured experience data, corresponding representation vectors are generated respectively. The representation vectors are fused to obtain the empirical representation; Based on the experience representation, candidate experiences that meet similar conditions to the experience representation are retrieved from the existing experience database.

6. The method of claim 4, wherein, Based on the business rule expression information, a consistency check is performed between the structured experience data and the candidate experience, including: The business rule expression information of the structured experience data and the business rule expression information of the candidate experience are standardized and preprocessed to obtain a standardized logical expression; Based on the standardized logical expression, a structured comparison is performed, and the degree of logical mutual exclusion between the structured experience data and the candidate experience is determined by combining the structural difference degree and semantic similarity.

7. The method of claim 6, wherein, The business rule representation information of the structured experience data and the business rule representation information of the candidate experience are subjected to standardized preprocessing, including: Based on the business entity mapping relationship in the structured experience data, entity linking processing is performed on the variable names in the business rule expression information to map different expressions to a unified field identifier; Operator normalization is performed on the natural language operation relations in the business rule expression information to generate a standardized logical expression with a unified representation.

8. The method of claim 6, wherein, Performing structured comparison based on the standardized logical expression includes: When the structured experience data and the candidate experience representation share the same business theme, slot alignment comparison is performed on the lvalues, operators, and rvalues ​​corresponding to the standardized logical expression. When the slot alignment comparison results indicate that the left values ​​are the same and the operators or right values ​​are different, the structural difference degree between the structured experience data and the candidate experience is determined based on the tree structure corresponding to the standardized logical expression.

9. The method of claim 6, wherein, Based on the consistency verification results, the structured experience data is subject to inbound control, including: When the logical mutual exclusion degree is greater than a first preset threshold, a conflict warning message containing difference point markers is output, and the automatic storage of the structured experience data is restricted. When the logical mutual exclusion degree is less than or equal to the first preset threshold and greater than the second preset threshold, the structured experience data is marked as pending confirmation. When the logical mutual exclusion degree is less than or equal to the second preset threshold, the structured experience data and the candidate experience are merged or enhanced and then written into the existing experience database. If the candidate experience is not found, the structured experience data is written into the existing experience database.

10. A device for extracting experience and verifying consistency from unstructured documents, comprising: The semantic segmentation module is used to acquire unstructured business documents, identify the business logic intent in the unstructured business documents, and divide the unstructured business documents into multiple semantically complete semantic blocks based on the semantic boundaries corresponding to the business logic intent. The structured mapping module is used to perform structured mapping processing on each of the semantic blocks to generate structured experience data, wherein the structured experience data includes business rule expression information used to characterize business calculation rules or constraint relationships; The candidate retrieval module is used to generate an experience representation based on the structured experience data, and retrieve candidate experiences from the existing experience database based on the experience representation; The consistency verification module is used to perform a consistency verification between the structured experience data and the candidate experience based on the business rule expression information when the candidate experience is retrieved. The inbound control module is used to perform inbound control on the structured experience data based on the consistency verification results.