CN-121998635-A - Rule engine-based freight bill receipt coping accounting method and system
Abstract
The invention provides a method and a system for carrying out check-up processing on a waybill based on a rule engine, wherein the method comprises the steps of carrying out text recognition and structured document information extraction on a multi-source waybill set to obtain a waybill document set, carrying out waybill entity recognition and entity relation extraction on the waybill document set to obtain a waybill entity information set, carrying out entity alignment and entity conflict resolution on the waybill entity information set based on a graph clustering mode to obtain a standard entity information set, generating a service heterogeneous graph structure based on a waybill service relation and the standard entity information set, carrying out logic consistency check and association conflict detection according to the service heterogeneous graph structure to obtain an abnormal entity list, carrying out cost check and rule chain interpretation on the standard entity information by utilizing a check rule engine to obtain a primary check list, carrying out association entity source and logic inversion correction on the abnormal entity list based on the service heterogeneous graph structure, and carrying out manual check on a correction result to obtain the standard check list.
Inventors
- WANG CHAOHUI
- LI LIANG
- YANG JIAN
Assignees
- 运脉云技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260119
Claims (10)
- 1. A rule engine-based policy receipt accounting method, the method comprising: configuring an accounting rule engine based on a waybill accounting rule, and carrying out text recognition, layout analysis and structured document information extraction on a multisource waybill set acquired in advance to obtain a waybill document set; Carrying out waybill entity identification and entity relation extraction on the waybill document set by utilizing a field knowledge base based on an external feature injection mode to obtain a waybill entity information set, and carrying out entity alignment and multi-strategy entity conflict resolution on the waybill entity information set based on a graph clustering mode to obtain a standard entity information set; Generating a service heterogeneous graph structure according to the waybill service relation of the domain knowledge base and the standard entity information set, and carrying out logic consistency check, root cause entity inference and association conflict detection on the standard entity information set according to the service heterogeneous graph structure to obtain an abnormal entity list; Performing cost accounting and rule chain interpretation on the entity information except the abnormal entity list in the standard entity information set by using the accounting rule engine to obtain a primary accounting list; And performing associated entity tracing and logic inversion correction on the abnormal entity list based on the accounting rule engine and the business abnormal composition structure, and performing manual rechecking on a correction result and the primary accounting list to obtain a standard accounting list.
- 2. The rule engine-based waybill receivability accounting method of claim 1, wherein configuring the audit rule engine based on waybill audit rules comprises: carrying out structural analysis on the freight list accounting rules, and generating an accounting rule meta-model according to analysis results; extracting a rule field set from the accounting rule meta-model, and carrying out field type inference and dependency analysis on the rule field set to obtain a field dependency directed graph; Performing logic expression conversion on the accounting rule meta-model to obtain a rule expression set, and performing grammar and semantic consistency verification on the rule expression set to obtain a verification expression set; performing rule conflict detection and conflict resolution on the verification expression set based on the field dependency directed graph to obtain a standard expression set; And carrying out topological ordering on the standard expression set according to the field dependent directed graph to obtain an accounting rule chain, and loading and instantiating an accounting rule engine according to the accounting rule chain.
- 3. The rule engine-based waybill handling accounting method of claim 1, wherein the performing text recognition, layout analysis and structured document information extraction on the pre-acquired multi-source waybill set to obtain the waybill document set comprises: Performing image format conversion on a multi-source waybill set acquired in advance to obtain a waybill atlas, and performing image standardization and image enhancement processing on the waybill atlas to obtain an enhanced waybill atlas; performing text detection and text recognition on the enhanced waybill atlas to obtain a waybill text block information set; Performing layout content analysis and layout area division on the enhanced waybill atlas to obtain a layout area set, and generating layout structure information according to the layout area set; Carrying out text sequence restoration and cross-region information recombination on the waybill text block information set based on the layout structure information to obtain a recombined text information set; Performing text field positioning and field information association on the recombined text information set to obtain a field association relation set; and carrying out structural information extraction and formatting output on the recombined text information set according to the field association relation set to obtain a waybill document set.
- 4. The method for accounting payable of waybill receivability based on rule engine according to claim 1, wherein the method for identifying waybill entity and extracting entity relation in the waybill document set by using domain knowledge base based on external feature injection to obtain a waybill entity information set comprises: Carrying out character cleaning and character format unification on the waybill fields in the waybill document set, and carrying out text sequence segmentation on the waybill document set according to a text sequence to obtain a preprocessing text sequence; Performing entity dictionary matching on the preprocessed text sequence based on a domain knowledge base to obtain a candidate entity field set, and performing word feature embedding on the preprocessed text sequence to obtain a text feature sequence; Injecting the candidate entity field set as external features into corresponding positions of the text feature sequences to obtain enhanced text feature sequences, and performing context segment coding on the enhanced text feature sequences based on a self-attention mechanism to obtain context segment coding sequences; Performing sequence decoding on the context segment code sequence based on a conditional random field to obtain a decoding entity field set, and performing entity linking and semantic normalization on the decoding entity field set based on the domain knowledge base to obtain a standard entity field set; extracting an entity field code set corresponding to the standard entity field set from the context segment codes, and extracting the relation between any two entity field codes in the entity field code set based on a multi-head attention mechanism to obtain an entity relation set; And filtering the confidence coefficient of the entity relationship set according to the original confidence coefficient, the multi-head attention score and the relationship constraint corresponding to the domain knowledge base corresponding to the entity relationship set to obtain a standard entity relationship set, and generating a waybill entity information set according to the standard entity relationship set and the standard entity field set.
- 5. The rule engine-based waybill receiving and coping accounting method of claim 1, wherein the graph clustering-based method performs entity alignment and multi-strategy entity conflict resolution on a waybill entity information set to obtain a standard entity information set, and the method comprises the following steps: performing inverted index on the waybill entity information set based on entity attributes, and performing quick search matching on the waybill entity information set based on accurate matching rules and fuzzy matching strategies to obtain a candidate alignment entity pair set; Taking the context entity of each entity in the candidate alignment entity pair set in the waybill entity information set as a candidate context entity set, and carrying out multidimensional feature normalization and multidimensional similarity calculation on each entity in the candidate alignment entity pair set and the context entity set to obtain an entity semantic similarity matrix; Constructing an entity similarity graph structure by taking each entity corresponding to the entity semantic similarity matrix as a node, taking a similarity relation as an edge and taking multi-dimensional semantic similarity as an edge weight, and carrying out threshold pruning on the edge of the entity similarity graph structure according to each edge weight to obtain a standard entity graph structure; Performing entity clustering on the standard entity graph structure based on a graph clustering algorithm to obtain entity clusters, and performing internal conflict detection on each entity cluster in the entity cluster set to obtain an attribute conflict entity set; Respectively carrying out conflict resolution on the attribute conflict entity sets based on confidence voting, time sequence priority screening and statistic fusion, and carrying out consistency verification on the conflict entity sets after conflict resolution based on the domain knowledge base to obtain verification entity sets; and updating the entity cluster by using the verification entity set, and generating a standard entity information set based on the updated entity cluster.
- 6. The rule engine-based waybill handling accounting method of claim 1, wherein the generating a business heterogeneous map structure according to the waybill business relation of the domain knowledge base and the standard entity information set comprises: extracting a bill business relation from the domain knowledge base, and performing modeling processing on the bill business relation to obtain a business relation mode; traversing each standard entity in the standard entity information set, matching a node type from the service relation mode based on the entity type of the standard entity, and instantiating a service graph node according to the node type; Generating corresponding service directed edges for each service graph node based on the service relationship mode and the entity relationship in the standard entity information set; Constructing a primary service network topology according to all service graph nodes and all service directed edges, and performing constraint verification and redundancy elimination on the primary service network topology based on the service relation mode to obtain a standard service network topology; and carrying out attribute map encapsulation on the standard service network topology to obtain a service heterogeneous map structure.
- 7. The rule engine-based policy handling accounting method of claim 1, wherein said performing logical consistency check, root cause entity inference and association conflict detection on the standard entity information set according to the service heterogram structure to obtain an abnormal entity list comprises: Extracting constraint rules of the business iso-composition structure, and generating a structured logic verification template set; sub-pattern matching is carried out on the business heterogeneous graph structure based on the logic verification template set, and an entity context relation chain is obtained; Performing logic consistency check on each sub-graph instance in the entity context relation chain based on the logic check template set, and generating a logic exception instance set according to a check result; performing abnormal clustering on the logic abnormal instance set in the service heterogeneous graph structure based on a graph clustering algorithm to obtain an abnormal cluster, and performing root cause entity inference on the abnormal cluster to obtain an abnormal root cause entity set; Carrying out multidimensional abnormal scoring on each abnormal root entity in the abnormal root entity set, and carrying out priority ranking on the abnormal root entity set according to a scoring result to obtain a primary abnormal list; and filtering the primary abnormal list by using an abnormal threshold value to obtain an abnormal entity list.
- 8. The rule engine-based waybill receipt accounting method of claim 7, wherein the calculating the cost accounting and rule chain interpretation of the entity information except the abnormal entity list in the standard entity information set by using the accounting rule engine to obtain a primary accounting list comprises: collecting entity information except the abnormal entity list in the standard entity information set into a safe entity information set; extracting a static context set and a dynamic context set corresponding to the security entity information set from the business iso-composition structure and the domain knowledge base; injecting the static context set and the dynamic context set as global facts into the accounting rules engine; Performing rule triggering matching, rule execution and cost flow calculation on the safe entity information set by using a fact-injected accounting rule engine to obtain a cost accounting list; and capturing the full link track of the accounting rule chain when the rule is executed by the accounting rule engine to obtain a rule chain interpretation document, and carrying out association encapsulation on the rule chain interpretation document and the expense accounting list to obtain a primary accounting list.
- 9. The rule engine-based waybill receivability accounting method of claim 1, wherein the performing associated entity tracing and logic inversion correction on the abnormal entity list based on the accounting rule engine and the business anomaly composition structure comprises: performing sub-graph pattern matching in the service heterogeneous graph structure by taking each entity in the abnormal entity list as a starting point to obtain an abnormal associated sub-graph; Selecting the entities in the abnormal associated subgraph one by one as target associated entities, and carrying out local dependency construction on the target associated entities based on an accounting rule chain in the accounting rule engine to obtain an entity local dependency graph; Carrying out alignment fusion on the entity local dependency graph by utilizing the service heterogeneous graph structure to obtain a fusion dependency graph, and carrying out reverse tracing on the basis of the dependency edges of the fusion dependency graph to obtain a target source entity and a target tracing path; Identifying all variable attribute nodes in the target tracing path, and carrying out inverse solution on each variable attribute node based on the accounting rule engine to obtain a candidate correction hypothesis set; Mapping the correction hypothesis set to the service heterogeneous graph structure to obtain a correction service graph snapshot set; Performing static consistency verification on the correction service graph snapshot set based on constraint rules in the domain knowledge base, and performing dynamic simulation accounting on the correction service graph snapshot set by using the accounting rule engine; Carrying out multidimensional correction scoring on the candidate correction hypothesis set according to the static consistency check and the dynamic simulation accounting result to obtain candidate correction scoring set; and carrying out threshold screening on the candidate correction hypothesis set based on the candidate correction evaluation set to obtain a standard correction hypothesis set, and generating a correction result according to the standard correction hypothesis set, the target tracing path and the candidate correction score set.
- 10. A rule engine-based waybill receipt accounting system, comprising a document extraction module, an entity extraction module, an anomaly detection module, a primary accounting module, and a secondary accounting module, wherein: the document extraction module is used for configuring an accounting rule engine based on a waybill accounting rule, and carrying out text recognition, layout analysis and structured document information extraction on a multisource waybill set acquired in advance to obtain a waybill document set; The entity extraction module is used for carrying out waybill entity identification and entity relation extraction on the waybill document set by utilizing a domain knowledge base based on an external feature injection mode to obtain a waybill entity information set, and carrying out entity alignment and multi-strategy entity conflict resolution on the waybill entity information set based on a graph clustering mode to obtain a standard entity information set; the anomaly detection module generates a service heterogeneous graph structure according to the waybill service relation of the domain knowledge base and the standard entity information set, and carries out logic consistency check, root cause entity inference and association conflict detection on the standard entity information set according to the service heterogeneous graph structure to obtain an anomaly entity list; The primary accounting module is used for carrying out cost accounting and rule chain interpretation on the entity information except the abnormal entity list in the standard entity information set by utilizing the accounting rule engine to obtain a primary accounting list; And the secondary accounting module is used for carrying out associated entity tracing and logic inversion correction on the abnormal entity list based on the accounting rule engine and the business abnormal composition structure, and carrying out manual rechecking on a correction result and the primary accounting list to obtain a standard accounting list.
Description
Rule engine-based freight bill receipt coping accounting method and system Technical Field The invention relates to the technical field of financial automation service, in particular to a method and a system for accounting payable of waybill receipt based on a rule engine. Background The waybill data is used as a core information carrier in the logistics business process, has complex structure, various sources and obvious format difference, and directly influences the tracking, cost accounting, risk management and cross-system business coordination capacity of enterprises on the transportation process. Along with the development of intelligent information extraction, knowledge graph and graph calculation and other technologies, the construction of an automatic intelligent accounting system has become a key direction for improving the financial integration level and the risk management and control capability. However, the current mainstream waybill accounting method still faces a significant technical bottleneck when dealing with complex business reality and massive heterogeneous data. Firstly, the conventional method generally regards the bill data processing and the cost accounting rules as separate links, relies on a manual or semi-automatic mode to process multi-source heterogeneous bill documents, and manually configures the extracted fields into a rigid and flat accounting rule table, so that the flow is tedious and difficult to adapt to frequent changes of customer, line and contract terms, and the accounting efficiency is low and the error rate is high. Secondly, most technical frameworks focus on single-point and field-level verification and calculation, lack of the capability of deep modeling and consistency insight on a multi-party business relation network with complex back of a waybill, and cannot systematically detect logic conflict and compliance risks of cross-bill and cross-entity, so that accounting errors are often discovered in post audit, and loss is caused. Disclosure of Invention (One) solving the technical problems Aiming at the defects of the prior art, the invention provides a method and a system for processing accounting due to freight bill receipt based on a rule engine, which have the advantages of unified processing of multi-source data, flexible service rule configuration and global self-correction accounting, and solve the problems of low accounting automation degree, difficult guarantee of accuracy and lower accounting efficiency caused by multi-source isomerism, complex semantics, dynamic changeable accounting rules and the lack of understanding of a service relation network in the prior art. (II) technical scheme In order to achieve the above purpose, the present invention provides the following technical solutions: the invention provides a rule engine-based waybill receiving and accounting coping method, which comprises the following steps: configuring an accounting rule engine based on a waybill accounting rule, and carrying out text recognition, layout analysis and structured document information extraction on a multisource waybill set acquired in advance to obtain a waybill document set; Carrying out waybill entity identification and entity relation extraction on the waybill document set by utilizing a field knowledge base based on an external feature injection mode to obtain a waybill entity information set, and carrying out entity alignment and multi-strategy entity conflict resolution on the waybill entity information set based on a graph clustering mode to obtain a standard entity information set; Generating a service heterogeneous graph structure according to the waybill service relation of the domain knowledge base and the standard entity information set, and carrying out logic consistency check, root cause entity inference and association conflict detection on the standard entity information set according to the service heterogeneous graph structure to obtain an abnormal entity list; Performing cost accounting and rule chain interpretation on the entity information except the abnormal entity list in the standard entity information set by using the accounting rule engine to obtain a primary accounting list; And performing associated entity tracing and logic inversion correction on the abnormal entity list based on the accounting rule engine and the business abnormal composition structure, and performing manual rechecking on a correction result and the primary accounting list to obtain a standard accounting list. According to one preferred embodiment of the invention, an accounting rule engine is configured based on a waybill accounting rule, and text recognition, layout analysis and structured document information extraction are carried out on a multisource waybill set acquired in advance to obtain a waybill document set; Carrying out waybill entity identification and entity relation extraction on the waybill document set by utilizing a field knowledge base based