Intelligent accounting strategy configuration method based on rule model

By constructing a lightweight rule set and performing simulated accounting at edge nodes, the problems of low accounting efficiency and insufficient rule adaptability at edge nodes are solved, and efficient and flexible accounting strategy configuration is achieved.

CN122288871APending Publication Date: 2026-06-26CHINA SOUTHERN POWER GRID CO LTD SHARED OPERATION CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA SOUTHERN POWER GRID CO LTD SHARED OPERATION CO
Filing Date
2026-04-01
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies have low computational efficiency and insufficient rule adaptability at edge nodes, resulting in high computational load, high resource consumption, lack of flexibility in the simulation and verification process, and low adaptability to rule changes.

Method used

By collecting rule metadata and business characteristics, a full set of rules is constructed, and rule path reachability analysis and redundancy elimination are performed to generate a lightweight set of rules. Edge nodes construct rule logic trees in a simulated accounting environment, perform simulated accounting, and after numerical comparison, replace the full set of rules with the lightweight set of rules in the production environment.

Benefits of technology

It achieves rule simplification and logic optimization, improves the accounting efficiency and rule maintainability of edge nodes, and ensures the accuracy and flexibility of accounting strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122288871A_ABST
    Figure CN122288871A_ABST
Patent Text Reader

Abstract

This invention discloses a rule-based intelligent accounting strategy configuration method, relating to the field of distributed intelligent accounting technology. The method includes: collecting rule metadata and business characteristics, and constructing a full rule set based on the rule metadata; edge nodes retrieving business transaction logs and performing simulated accounting on the business transaction logs in a simulated accounting environment based on a rule logic tree, outputting simulated accounting data; performing benchmark accounting on the business transaction logs in a production accounting environment using the full rule set, outputting benchmark accounting data; comparing the simulated accounting data with the benchmark accounting data, and when the comparison results are consistent, replacing the full rule set with a lightweight rule set in the production accounting environment to generate a lightweight intelligent accounting strategy. This invention improves the accounting efficiency of edge nodes and the maintainability of rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed intelligent accounting technology, and in particular to a method for configuring intelligent accounting strategies based on a rule model. Background Technology

[0002] Against the backdrop of rapid informatization and digitalization, rule-driven intelligent accounting technology is gradually becoming a core technological tool in enterprise finance, settlement, and business operations management. In existing technologies, rule-based accounting methods primarily rely on collecting transaction logs from business systems and processing and calculating business data through predefined rule sets to achieve automated data accounting and statistical analysis. In traditional applications, rule sets are typically built and managed uniformly in the cloud or on a central server, using all rules to perform accounting operations on all business nodes to ensure consistency and accuracy of the accounting logic. With the development of edge computing, some accounting tasks are beginning to be decentralized to edge nodes, forming a cloud-edge collaborative processing model to improve accounting efficiency and response speed while reducing dependence on central nodes.

[0003] While existing technologies can meet basic rule calculation functions, they still suffer from rule redundancy and limited calculation efficiency when faced with complex business characteristics and large rule sets. Existing methods typically cannot optimize rule sets according to the characteristics of business nodes, resulting in high computational load and resource consumption during execution at edge nodes, a lack of flexibility in simulation and verification processes, and low adaptability to rule changes. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a rule-based intelligent accounting strategy configuration method to solve the problems of low accounting efficiency and insufficient adaptability of accounting strategies at edge nodes.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a method for configuring intelligent accounting strategies based on a rule model, which includes: collecting rule metadata and business characteristics, and constructing a full set of rules based on the rule metadata; Based on business characteristics, rule path reachability analysis and redundancy elimination are performed on the full set of rules to output a lightweight set of rules. Edge nodes receive a lightweight rule set pushed by cloud nodes, build a simulated accounting environment, and construct a rule logic tree based on the lightweight rule set within the simulated accounting environment; Edge nodes retrieve business transaction logs and perform simulated accounting on the business transaction logs in a simulated accounting environment based on rule logic trees, outputting simulated accounting data; In the production accounting environment, the full set of rules is used to perform benchmark accounting on business transaction flow and output benchmark accounting data. The simulated accounting data is compared with the benchmark accounting data. When the comparison results are consistent, a lightweight rule set is used to replace the full rule set in the production accounting environment to generate a lightweight intelligent accounting strategy.

[0007] As a preferred embodiment of the rule-based intelligent accounting strategy configuration method of the present invention, the specific steps of collecting rule metadata and business characteristics, and constructing a full set of rules based on the rule metadata are as follows: Scan the underlying operating environment and business attributes of edge nodes to obtain business characteristics; Collect rule metadata and parse out the judgment conditions and calculation logic formulas. Construct rule paths based on the judgment conditions, associate the calculation logic formulas with the rule paths, and summarize and encapsulate all rule paths and associated calculation logic formulas into a full set of rules.

[0008] As a preferred embodiment of the rule-based intelligent accounting strategy configuration method of the present invention, the specific steps of performing rule path reachability analysis and redundancy elimination on the full set of rules according to business characteristics, and outputting a lightweight set of rules are as follows: Business characteristics are transformed into logical constraint formulas, and the judgment conditions in the rule path are symbolized into logical predicates through logical extraction and predicate recombination. The SMT solver is used to determine the reachability of rule paths under the constraints of logical formulas, and rule paths that are determined to be unreachable are removed from the full rule set, outputting the remaining rule set. In the remaining rule set, when there is a logical implication relationship between one logical predicate and another logical predicate, the predicate merging operation is performed, and a lightweight rule set is output.

[0009] As a preferred embodiment of the rule-based intelligent accounting strategy configuration method of the present invention, the logical constraint formula is a standardized logical paradigm generated by formally describing business features using first-order predicate logic.

[0010] As a preferred embodiment of the rule-based intelligent accounting strategy configuration method of the present invention, the edge node receives a lightweight rule set pushed by the cloud node, constructs a simulated accounting environment, and builds a rule logic tree based on the lightweight rule set in the simulated accounting environment. The specific steps are as follows: The kernel instructions divide the memory into an independent computing space that is logically isolated from the production computing environment, and load the image file in the independent computing space to build a simulated computing environment; Receive lightweight rule sets pushed by cloud nodes, restore the logical predicates of the lightweight rule sets to judgment conditions, and map each judgment condition to a Boolean expression according to the logical relationship between the judgment conditions; Based on the operation priority of Boolean expressions, each judgment condition is used as a branch judgment node, and the accounting logic formula associated with each rule path is used as a leaf node to construct a rule logic tree in a simulated accounting environment.

[0011] As a preferred embodiment of the rule-based intelligent accounting strategy configuration method of the present invention, the production accounting environment is a resident computing space constructed on physically isolated hardware by a static hardware resource partitioning method.

[0012] As a preferred embodiment of the rule-based intelligent accounting strategy configuration method of the present invention, the step of the edge node retrieving business transaction logs refers to the edge node intercepting data traffic in the business link in real time, identifying the target transaction item from the data traffic, converting the target transaction item into a key-value pair format, and outputting the business transaction logs.

[0013] As a preferred embodiment of the rule-based intelligent accounting strategy configuration method of the present invention, the step of simulating accounting of business transaction flow in a simulated accounting environment based on rule logic tree and outputting simulated accounting data includes the following specific steps: For each individual transaction in the business transaction log, data alignment is performed according to the field mapping relationship required by the rule logic tree, and the accounting tuple is output. Input the accounting element items in the accounting tuple into each judgment condition in turn for logical judgment, and obtain the accounting logic formula that matches a single transaction in the rule logic tree; Substitute the accounting element items into the matching accounting logic formula to calculate the single accounting value, and summarize all single accounting values ​​to output simulated accounting data.

[0014] As a preferred embodiment of the rule-based intelligent accounting strategy configuration method of the present invention, the output benchmark accounting data refers to loading the business transaction flow into the production accounting environment, calculating the benchmark single-transaction accounting value according to the accounting logic formula in the full set of rules, summarizing and calculating all benchmark single-transaction accounting values, and outputting the benchmark accounting data.

[0015] As a preferred embodiment of the rule-based intelligent accounting strategy configuration method of the present invention, the step of comparing simulated accounting data with benchmark accounting data, and when the comparison results are consistent, replacing the full rule set with a lightweight rule set in the production accounting environment to generate a lightweight intelligent accounting strategy, is as follows: The individual accounting values ​​in the simulated accounting data are compared item by item with the baseline individual accounting values ​​in the baseline accounting data. When all individual accounting values ​​are consistent with the corresponding baseline individual accounting values, a lightweight rule set replaces the full rule set in the production accounting environment to generate a lightweight intelligent accounting strategy.

[0016] The beneficial effects of this invention are as follows: by performing rule path reachability analysis and redundancy elimination on the full set of rules, a lightweight set of rules is generated, which realizes rule simplification and logic optimization, improves the efficiency of edge node calculation and rule maintainability, and realizes policy verification and safe replacement by constructing a rule logic tree based on the lightweight set of rules and performing simulated calculation in a simulated calculation environment. Attached Figure Description

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

[0018] Figure 1 A flowchart illustrating the configuration method for a rule-based intelligent accounting strategy.

[0019] Figure 2 This is a flowchart for outputting simulated accounting data.

[0020] Figure 3 This is a flowchart for outputting a lightweight set of rules.

[0021] Figure 4 A flowchart for constructing a rule logic tree. Detailed Implementation

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0025] Reference Figures 1-4 This is one embodiment of the present invention, which provides a method for configuring intelligent accounting strategies based on a rule model, including the following steps: S1. Collect rule metadata and business characteristics, and build a full set of rules based on the rule metadata.

[0026] S1.1 Scan the underlying operating environment and business attributes of edge nodes to obtain business characteristics.

[0027] Furthermore, the cloud node sends a remote probe request to the edge node to obtain the edge node's configuration document and real-time operating status parameters. The cloud node then classifies, deduplicates, and aggregates the read configuration document and real-time operating status parameters according to a preset feature extraction template (preset based on the edge node's hardware architecture and industry type) to obtain business features.

[0028] It should be noted that the underlying operating environment of an edge node includes the operating system version, kernel parameters, remaining memory space, and current CPU load status above the edge node hardware layer.

[0029] The business attributes of an edge node include the administrative division code of its geographical location, the business department identifier to which it belongs, and the transaction settlement type currently being handled by the edge node.

[0030] Business characteristics are a set of structured parameters, including: Node computing power level: a rating of computing power determined by the number of CPU cores and clock speed; Available memory bandwidth: the real-time schedulable memory throughput of the edge node; Geographic location tag: a code indicating the province or city where the edge node is physically deployed; Industry affiliation code: a specific code indicating whether the edge node serves retail, manufacturing, or finance; Protocol support list: a set of underlying communication protocols that the edge node can parse.

[0031] S1.2 Collect rule metadata and parse out the judgment conditions and calculation logic formulas. Construct rule paths based on the judgment conditions, associate the calculation logic formulas with the rule paths, and summarize and encapsulate all rule paths and associated calculation logic formulas into a full set of rules.

[0032] Furthermore, the system accesses the cloud rule base to obtain rule metadata, performs syntax parsing and field decomposition on the rule metadata using regular expressions, identifies the judgment conditions used for logical decision-making and the accounting logic formulas used for executing business transaction numerical calculations; arranges the judgment conditions according to the topological order of the business logic to form rule paths, and attaches the corresponding accounting logic formulas to the end of their respective rule paths; and unifies all rule paths and associated accounting logic formulas into a complete set of rules.

[0033] It should be noted that the cloud-based rule base is a database that stores rule metadata; A rule path is a logical decision path formed by arranging the judgment conditions parsed from the rule metadata in the topological order of the business logic. Rule metadata is atomic descriptive information that defines business logic, including judgment conditions and calculation logic formulas. For example, a rule metadata is "If the 'transaction type' is 'retail' and the 'amount' is greater than 1000 (judgment condition), then the 'handling fee' is equal to the 'amount' multiplied by 0.01 (calculation logic formula)".

[0034] The full set of rules is a complete set of rules that describes the business logic. It consists of interrelated rule paths and calculation logic formulas for performing numerical calculations. It is used to perform layer-by-layer judgments based on the characteristics of business transaction flows and output baseline calculation values.

[0035] S2. Based on business characteristics, perform rule path reachability analysis and redundancy elimination on the full set of rules, and output a lightweight set of rules.

[0036] S2.1 Transform business features into logical constraint formulas, and symbolize the judgment conditions in the rule path into logical predicates through logical extraction and predicate recombination.

[0037] Furthermore, mutually exclusive attributes in the business features are divided into mutually exclusive feature clusters, and attributes with size order in the business features are divided into ordered numerical intervals. A unique constraint is established for each mutually exclusive feature cluster, upper and lower bound constraints are established for each ordered numerical interval, and condition trigger constraints are established for business features with prerequisite relationships, generating logical constraint formulas. After extracting judgment conditions along each rule path, they are first merged according to the judgment object. Multiple equal value conditions, range conditions, or set belonging conditions with the same judgment object are folded and converted into member predicates or interval predicates respectively. Then, the predicates are reorganized according to the logical connection relationship in the original rule path, and the logical predicates are output.

[0038] Logical constraint formula It can be represented as: ; curly braces This indicates that all constraints listed in all rows must be true simultaneously. Constraints include unique constraints, upper and lower bound constraints, and condition-triggered constraints. The unique constraint is: ; The upper and lower bound constraints are: ; The conditional triggering constraint is: ; In the unique constraint, It is the first A mutually exclusive feature cluster; express There is one and only one valid feature; It is a mutually exclusive feature cluster index variable; It is the total number of mutually exclusive feature clusters; It is the conjunction operator; In upper and lower bound constraints It is the first A continuous business feature index; This represents the total number of continuous business characteristics. It is the first A continuous business characteristic; It is the lower bound (minimum allowable value) for continuous business characteristics. It is the upper bound (maximum allowable value) of continuous business characteristics; In conditional triggering constraints, It is the first Index of prerequisite relationships; It is the total number of prerequisite relations; It is the first One prerequisite; It is the first The condition that is depended upon; Represents logical implication (if) If true, then (must be true) It should be noted that the prerequisite is the antecedent in the logical implication, used to set the necessary business premises for triggering subsequent logic; the dependent condition is the consequent in the logical implication, used to specify the associated constraints that must be satisfied simultaneously when the prerequisite is met.

[0039] Logical constraint formulas are standardized logical paradigms generated by formally describing business features using first-order predicate logic. They are used to provide boundary conditions for automated reasoning in SMT solvers, thereby determining the logical reachability of rule paths in actual business scenarios.

[0040] S2.2. Use the SMT solver to determine the reachability of rule paths under the constraints of logical formulas, and remove rule paths that are determined to be unreachable from the full rule set, outputting the remaining rule set.

[0041] Furthermore, the logical predicates and logical constraint formulas are conjunct to generate a logical reachability judgment expression describing whether a rule path holds true under specific business constraints (e.g., "when the industry belongs to finance, the transaction settlement type must include cross-border clearing"). The logical reachability judgment expression is input into the SMT solver for automatic solving. If the solution result is unsatisfiable, the corresponding rule path is determined to be an unreachable rule path. All rule paths determined to be unreachable are identified and removed from the full rule set, and logically consistent paths are retained, outputting the remaining rule set.

[0042] The set of remaining rules can be represented as: ; in, It is the set of remaining rules; It is the first in the full set of rules. The path of the rule to be verified; This is the Boolean satisfaction determination function of the SMT solver, which returns... Indicates logical reachability; It is a rule path The corresponding logical predicate; It is the first The index of the rule path to be verified; It should be noted that SMT solvers (such as Z3, Boolector, and Yices) are automated reasoning tools used to determine satisfiability modular theory problems. Their goal is to determine whether there exists a set of variable assignments that make the first-order logic formula true, given a first-order logic formula.

[0043] The remaining rule set is a subset of rules retained after logical constraint analysis and elimination of unreachable paths from the full rule set. It is used to initially narrow down the rule scope and, while ensuring logical consistency, provide filtered basic data for subsequent execution of predicate merging and generation of lightweight strategies.

[0044] S2.3 In the remaining rule set, when there is a logical implication relationship between one logical predicate and another logical predicate, perform a predicate merging operation and output a lightweight rule set.

[0045] Furthermore, the system sequentially scans each rule path in the remaining rule set, extracts the logical predicates derived from the judgment conditions, and combines them in pairs to construct logical predicate pairs to be verified. By constructing a judgment expression and using the SMT solver to verify its unsatisfiability, it identifies whether there exists a logical implication relationship where the following logical predicate must be true if the previous logical predicate is true. For logical predicates with logical implication relationships, the system performs logical simplification and merges redundant terms to reduce the depth and width of the rule path, outputting a lightweight rule set. For example, if two logical predicates are extracted from the remaining rule set, one is "amount greater than 5,000 and region is Beijing" and the other is "amount greater than 3,000", combining them into a judgment expression and using the solver to verify that the second predicate must be true when the first predicate is true, i.e., a logical implication relationship exists, then the redundant judgment term "amount greater than 3,000" is removed from the rule path through a predicate merging operation, thereby simplifying the multi-layered nested judgment logic into a single-layer efficient logic.

[0046] The lightweight rule set can be represented as: ; in, It is a lightweight set of rules; It is the complete set of all logical predicates in the remaining rule set; It is a traversal The target logical predicate that is currently being pointed to serves as the object being checked for redundancy. It is a traversal When used with Reference logical predicates for logical comparison; Represents logical implication (if) If true, then yes (Redundant superordinate conditions). yes exist Index in; yes exist Index in; It is a logical NOT operator used to represent independent predicates that are not covered by other more stringent conditions; It should be noted that the lightweight rule set is a subset generated after the full rule set has undergone logical path reachability analysis and redundancy elimination. It consists of rule paths after removing unreachable paths and performing predicate merging, as well as associated accounting logic formulas, and is used to build rule logic trees in the simulated accounting environment of edge nodes.

[0047] S3. Edge nodes receive a lightweight rule set pushed by cloud nodes, build a simulated accounting environment, and construct a rule logic tree based on the lightweight rule set in the simulated accounting environment.

[0048] S3.1. By using kernel instructions, an independent computing space is partitioned in memory, logically isolated from the production computing environment, and an image file is loaded into the independent computing space to build a simulated computing environment.

[0049] Furthermore, the kernel instructions are executed to request and allocate a dedicated resource area in memory, and an access control protocol is configured to achieve complete logical isolation from the production computing environment; within the allocated resource area, the runtime stack and register context are configured to establish a non-persistent runtime environment with independent computing capabilities, and an independent computing space is output; the image file containing the computing logic and necessary dependencies is read into the independent computing space and initialization boot is performed, and finally, the simulated computing environment is deployed and generated in memory.

[0050] It should be noted that the production computing environment is a resident computing space built on physically isolated hardware using a static hardware resource allocation method. It is used to execute logical operations on the full set of rules on physically isolated hardware and to provide benchmark computing data for comparison in simulated computing. The static hardware resource allocation method refers to the pre-allocation of CPU cores, memory address space and I / O channels at the physical level through motherboard firmware or kernel boot parameters. This ensures that the production computing environment has exclusive access to specific hardware registers and computing clusters, and that these physical resources do not participate in dynamic scheduling or sharing during operation.

[0051] Image files are standardized encapsulation files containing core computing logic and runtime dependency libraries, used to quickly initialize the runtime environment in an independent computing space; image files are preset based on the execution requirements of computing tasks.

[0052] Kernel instructions are low-level operation commands used to allocate independent computing spaces in memory. They are obtained by calling the resource allocation interface provided by the kernel and configuring the access control protocol.

[0053] The simulated computing environment is an independent computing space in memory allocated by the edge node through kernel instructions, which is logically isolated from the production environment. It is used to load image files and instantiate rule logic trees, and to perform simulated calculations on business transaction flows to verify the accuracy of lightweight rules without affecting actual production tasks.

[0054] S3.2 Receive the lightweight rule set pushed by the cloud node, restore the logical predicates of the lightweight rule set to judgment conditions, and map each judgment condition to a Boolean expression according to the logical relationship between the judgment conditions.

[0055] Furthermore, the edge node receives the lightweight rule set through the communication interface and parses the logical predicates and corresponding logical structures encapsulated in the lightweight rule set; it uses a preset symbol mapping table to convert the abstract logical predicates back into judgment conditions with business semantics, thus completing the instantiation of the logical expression; it extracts the logical associations between each judgment condition and converts them into Boolean expressions that can be directly executed by the computer.

[0056] It should be noted that the symbol mapping table is a conversion index that records the correspondence between judgment conditions and logical predicates. It is used to restore logical predicates to judgment conditions with business semantics during the parsing process of the lightweight rule set. The symbol mapping table is set based on the operation records of the formal processing stage of the full rule set.

[0057] S3.3. Based on the operation priority of Boolean expressions, each judgment condition is used as a branch judgment node, and the accounting logic formula associated with each rule path is used as a leaf node to construct a rule logic tree in the simulated accounting environment.

[0058] Furthermore, in the simulated accounting environment, by parsing the reverse Polish notation of Boolean expressions, the logical operators and their nested parentheses are identified, and an operation priority sequence is established. Based on the operation priority sequence, the corresponding judgment conditions are sequentially attached as branch judgment nodes, and the skeleton of the rule logic tree is built through the hierarchical nesting of logical branches. The calculation logic of the endpoint of each rule path in the lightweight rule set is retrieved, and the associated accounting logic formula is filled into the end of the corresponding rule path as a leaf node to construct the rule logic tree. It should be noted that the rule logic tree is a tree-like data structure generated after a lightweight rule set is instantiated in memory in a simulated accounting environment. It consists of judgment conditions as branch judgment nodes and accounting logic formulas as leaf nodes. It is used to judge business transaction flows step by step according to logical priority and execute corresponding accounting calculations.

[0059] S4. Edge nodes retrieve business transaction logs and perform simulated accounting on the business transaction logs in a simulated accounting environment based on rule logic trees, outputting simulated accounting data.

[0060] S4.1 Edge node retrieval of business transaction logs refers to the edge node intercepting data traffic in the business link in real time, identifying target transaction items from the data traffic, converting the target transaction items into key-value pair format, and outputting the business transaction log.

[0061] Furthermore, edge nodes capture raw data packets flowing through the edge gateway through bypass listening; through deep packet inspection (DPI), they extract underlying communication protocol information from the raw data packets and extract target transaction items including transaction amount, transaction type, user characteristics, and geographical location; the scattered target transaction items are encapsulated into key-value pair structures according to the mapping relationship of "attribute name: attribute value", and a globally unique serial number and collection timestamp are attached to generate standardized business transaction logs.

[0062] It should be noted that the business transaction log is structured data that has been cleaned, extracted, and formatted, and is used as the input source for the rule logic tree.

[0063] S4.2. For each individual transaction in the business transaction log, align the data according to the field mapping relationship required by the rule logic tree and output the accounting tuple.

[0064] Furthermore, the system reads the single transaction flow to be processed from the generated business transaction flow and parses all the original business fields contained in the single transaction flow; it accesses the rule logic tree, identifies the input parameters that each branch judgment node and leaf node depends on, and determines the field mapping relationship. For example, it scans the rule logic tree to identify the parameter requirements such as "transaction type" and "transaction amount" contained in the branch judgment nodes and "user level coefficient" involved in the accounting logic formula in the leaf nodes, and compares them with the original key-value pairs in the business transaction flow to find that the original field names are "Trans_Type", "Amt_Val" and "User_LV", thus establishing the field mapping relationship of "Trans_Type corresponds to transaction type", "Amt_Val corresponds to transaction amount" and "User_LV corresponds to user level coefficient"; according to the field mapping relationship, the original business fields in the single transaction flow are converted into standardized accounting element items, data alignment is completed and accounting tuples are output.

[0065] It should be noted that the accounting tuple is a standardized transaction data structure after data alignment processing. It consists of accounting element items extracted from a single transaction and is used to input the rule logic tree for logical judgment and numerical calculation.

[0066] S4.3. Input the accounting element items in the accounting tuple into each judgment condition in sequence for logical judgment, and obtain the accounting logic formula that matches the single transaction flow in the rule logic tree.

[0067] Furthermore, the accounting tuples are traversed, and the accounting element items participating in the logical operation are extracted according to the preset field identifiers (set based on the logical judgment requirements of the lightweight rule set and the structural definition of the business data dictionary). The accounting element items are substituted into the judgment nodes of each branch in the rule logic tree, and the logical judgment is executed layer by layer through Boolean operations. Based on the true or false value (Boolean value) obtained by the judgment, the tree structure is searched downwards until the unique execution branch is located, and the rule path corresponding to a single transaction is determined. The accounting logic formula associated with the corresponding rule path is the accounting logic formula matched by the single transaction in the rule logic tree.

[0068] S4.4 Substitute the accounting element items into the matching accounting logic formula to calculate the single accounting value, and summarize all single accounting values ​​to output simulated accounting data.

[0069] Furthermore, the accounting element items in the accounting tuple are used as independent variables and substituted into the accounting logic formula matched by the rule logic tree. Mathematical logic transformation and numerical calculation are performed to generate the corresponding single accounting value. According to the preset aggregation logic, all generated single accounting values ​​are statistically analyzed to ensure that the calculation scope covers all business transaction flows and output simulated accounting data.

[0070] It should be noted that the simulated accounting data is the numerical result generated by the edge node after performing logical operations on the business transaction flow based on the lightweight rule set in the simulated accounting environment. It is used to make a horizontal comparison with the benchmark accounting data generated by the production accounting environment. By verifying the consistency between the two, the accuracy and reliability of the lightweight rule set after replacing the full rule set can be ensured.

[0071] The aggregation logic is preset based on the accounting objectives and business needs. For example, it can use methods such as summing, weighted averaging, minimum value statistics, or custom summary rules to calculate the value of a single transaction by transaction type or time window.

[0072] S5. In the production accounting environment, use the full set of rules to perform benchmark accounting on business transaction flow and output benchmark accounting data.

[0073] S5.1 Outputting baseline accounting data refers to loading business transaction logs into the production accounting environment, calculating the baseline single-transaction accounting value based on the accounting logic formulas in the full set of rules, summarizing and calculating all baseline single-transaction accounting values, and outputting the baseline accounting data.

[0074] Furthermore, the business transaction logs are imported into the production accounting environment. For each individual business transaction in the business transaction logs, starting from the root node of the full set of rules, the judgment is performed layer by layer according to the judgment conditions defined in the rule path until an execution branch that fully matches the business characteristics is locked. The accounting logic formula associated with the successfully matched rule path is called to perform numerical calculations and output the baseline single transaction accounting value.

[0075] The system sequentially reads all baseline single-item accounting values ​​generated during the current accounting cycle from the storage cache of the production accounting environment; based on the aggregation logic, it performs statistics on all extracted baseline single-item accounting values ​​and outputs the baseline accounting data.

[0076] It should be noted that the baseline single-transaction calculation value is a value obtained by logically matching and formula calculation of a single business transaction flow based on the full set of rules in the production accounting environment. It is used as a standard reference to verify the accuracy of the simulated accounting data and to determine whether to generate a lightweight intelligent accounting strategy.

[0077] The benchmark accounting data is the numerical result generated by the edge node in the production accounting environment after performing logical operations on the business transaction flow using the full set of rules. It is used to provide an accurate comparison reference for the simulated accounting data. By measuring the consistency of the two in arithmetic values, it is determined whether the lightweight rule set can safely replace the full set of rules.

[0078] S6. Compare the simulated accounting data with the benchmark accounting data. When the comparison results are consistent, replace the full set of rules with a lightweight set of rules in the production accounting environment to generate a lightweight intelligent accounting strategy.

[0079] It should be noted that a consistent numerical comparison result means that each individual accounting value in the simulated accounting data is arithmetically equal to the corresponding benchmark individual accounting value in the benchmark accounting data.

[0080] S6.1 Compare the individual accounting values ​​in the simulated accounting data with the baseline individual accounting values ​​in the baseline accounting data item by item.

[0081] Furthermore, the system reads each individual transaction value from the simulated accounting data and the benchmark individual transaction value from the benchmark accounting data. It then matches each simulated transaction value with its corresponding benchmark individual transaction value, recording the comparison results, including whether they match or not. If all individual comparison results are consistent, the simulated accounting data and benchmark accounting data are considered to be consistent.

[0082] S6.2 When all individual accounting values ​​are consistent with the corresponding baseline individual accounting values, a lightweight rule set replaces the full rule set in the production accounting environment to generate a lightweight intelligent accounting strategy.

[0083] Furthermore, if all individual accounting values ​​are consistent with the corresponding baseline individual accounting values, then locate the currently used full set of rules in the production accounting environment; load the lightweight set of rules into the production accounting environment and replace the original full set of rules; confirm that the replaced lightweight set of rules has taken effect, and generate a lightweight intelligent accounting strategy that can be directly used for business transaction flow accounting.

[0084] It should be noted that the lightweight intelligent accounting strategy is an optimization scheme generated by replacing the full set of rules with a lightweight set of rules in the production accounting environment after the simulated accounting data and the benchmark accounting data reach a consensus. It is used to perform more efficient and low-cost business transaction flow accounting tasks at edge nodes, ensuring that the accounting logic remains highly accurate even in a simplified state.

[0085] In summary, this invention achieves rule simplification and logic optimization by performing rule path reachability analysis and redundancy elimination on the full rule set to generate a lightweight rule set, thereby improving the efficiency of edge node calculation and rule maintainability. Furthermore, it realizes policy verification and secure replacement by constructing a rule logic tree based on the lightweight rule set and performing simulated calculation in a simulated calculation environment.

[0086] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for configuring intelligent accounting strategies based on a rule model, characterized in that, include: Collect rule metadata and business characteristics, and build a full set of rules based on the rule metadata; Based on business characteristics, rule path reachability analysis and redundancy elimination are performed on the full set of rules to output a lightweight set of rules. Edge nodes receive a lightweight rule set pushed by cloud nodes, build a simulated accounting environment, and construct a rule logic tree based on the lightweight rule set within the simulated accounting environment; Edge nodes retrieve business transaction logs and perform simulated accounting on the business transaction logs in a simulated accounting environment based on rule logic trees, outputting simulated accounting data; In the production accounting environment, the full set of rules is used to perform benchmark accounting on business transaction flow and output benchmark accounting data. The simulated accounting data is compared with the benchmark accounting data. When the comparison results are consistent, a lightweight rule set replaces the full rule set in the production accounting environment to generate a lightweight intelligent accounting strategy.

2. The rule model-based intelligent accounting strategy configuration method of claim 1, wherein, The process involves collecting rule metadata and business characteristics, and constructing a full set of rules based on the rule metadata. The specific steps are as follows: Scan the underlying operating environment and business attributes of edge nodes to obtain business characteristics; Collect rule metadata and parse out the judgment conditions and calculation logic formulas. Construct rule paths based on the judgment conditions, associate the calculation logic formulas with the rule paths, and summarize and encapsulate all rule paths and associated calculation logic formulas into a full set of rules.

3. The intelligent accounting strategy configuration method based on a rule model as described in claim 2, characterized in that, The steps for performing rule path reachability analysis and redundancy elimination on the full rule set based on business characteristics, and outputting a lightweight rule set, are as follows: Business characteristics are transformed into logical constraint formulas, and the judgment conditions in the rule path are symbolized into logical predicates through logical extraction and predicate recombination. The SMT solver is used to determine the reachability of rule paths under the constraints of logical formulas, and rule paths that are determined to be unreachable are removed from the full rule set, outputting the remaining rule set. In the remaining rule set, when there is a logical implication relationship between one logical predicate and another logical predicate, the predicate merging operation is performed, and a lightweight rule set is output.

4. The intelligent accounting strategy configuration method based on a rule model as described in claim 3, characterized in that, The logical constraint formula is a standardized logical paradigm generated by formally describing business characteristics using first-order predicate logic.

5. The rule model-based intelligent accounting policy configuration method of claim 1, wherein, The edge node receives a lightweight rule set pushed by the cloud node, constructs a simulated computing environment, and builds a rule logic tree based on the lightweight rule set within the simulated computing environment. The specific steps are as follows: The kernel instructions divide the memory into an independent computing space that is logically isolated from the production computing environment, and load the image file in the independent computing space to build a simulated computing environment; Receive lightweight rule sets pushed by cloud nodes, restore the logical predicates of the lightweight rule sets to judgment conditions, and map each judgment condition to a Boolean expression according to the logical relationship between the judgment conditions; Based on the operation priority of Boolean expressions, each judgment condition is used as a branch judgment node, and the accounting logic formula associated with each rule path is used as a leaf node, thus constructing a rule logic tree in the simulated accounting environment.

6. The rule model-based intelligent accounting policy configuration method of claim 1, wherein, The production computing environment is a resident computing space built on physically isolated hardware using a static hardware resource partitioning method.

7. The rule model-based intelligent accounting policy configuration method of claim 1, wherein, The process of retrieving business transaction logs at the edge node refers to the edge node intercepting data traffic in the business link in real time, identifying the target transaction item from the data traffic, converting the target transaction item into a key-value pair format, and outputting the business transaction log.

8. The intelligent accounting strategy configuration method based on a rule model as described in claim 1, characterized in that, The steps for simulating business transaction flow in a simulated accounting environment based on rule logic trees and outputting simulated accounting data are as follows: For each individual transaction in the business transaction log, data alignment is performed according to the field mapping relationship required by the rule logic tree, and the accounting tuple is output. Input the accounting element items in the accounting tuple into each judgment condition in turn for logical judgment, and obtain the accounting logic formula that matches a single transaction in the rule logic tree; Substitute the accounting element items into the matching accounting logic formula to calculate the single accounting value, and summarize all single accounting values ​​to output simulated accounting data.

9. The rule model-based intelligent accounting policy configuration method of claim 1, wherein, The output benchmark accounting data refers to loading the business transaction flow into the production accounting environment, calculating the benchmark single-transaction accounting value according to the accounting logic formula in the full set of rules, summarizing and calculating all benchmark single-transaction accounting values, and outputting the benchmark accounting data.

10. The rule model-based intelligent accounting policy configuration method of claim 9, wherein, The process involves comparing the simulated accounting data with the benchmark accounting data. When the comparison results are consistent, a lightweight rule set replaces the full rule set in the production accounting environment to generate a lightweight intelligent accounting strategy. The specific steps are as follows: The individual accounting values ​​in the simulated accounting data are compared item by item with the baseline individual accounting values ​​in the baseline accounting data. When all individual accounting values ​​are consistent with the corresponding baseline individual accounting values, a lightweight rule set replaces the full rule set in the production accounting environment to generate a lightweight intelligent accounting strategy.