Real-time account checking method and system based on rule engine

By evaluating the importance of each dimension of the reconciliation data and correcting the information gain of the decision tree, the existing rule engines have solved the problem of difficulty and insufficient flexibility in the reconciliation process, and achieved more efficient and accurate reconciliation data processing.

CN119904324AActive Publication Date: 2025-04-29INSPUR SMART SUPPLY CHAIN TECH (SHANDONG) CO LTD

Patent Information

Application Number
CN202510405618.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-04-29
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

During the reconciliation process, the existing rule engines have problems such as difficulty in maintaining rules, insufficient flexibility and strong data dependence, which leads to high maintenance costs and difficulty in quickly adapting to business changes.

Method used

By calculating the degree of discreteness and abnormal sensitivity of each dimension of the reconciliation data, the importance of each dimension is evaluated, and the information gain of the decision tree node is corrected based on this to generate a rule engine that is more suitable for actual business scenarios.

Benefits of technology

It improves the flexibility and accuracy of the rule engine, reduces the difficulty and cost of rule maintenance, and enhances the abnormal identification ability of reconciliation data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904324A_ABST
    Figure CN119904324A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a real-time account checking method and system based on a rule engine. The method comprises the following steps: acquiring reconciliation data containing multiple dimensions of an enterprise, and determining normal reconciliation data and abnormal reconciliation data according to a result of each reconciliation data; determining the data dispersion degree of each dimension; determining the abnormal sensitivity of each dimension; obtaining the importance degree of each dimension; obtaining a correction information gain for performing data division on each node by utilizing each dimension in the decision tree; and based on the correction information gain, generating a decision tree and constructing a rule engine of the reconciliation data. According to the method, the importance of the dimensions is introduced on the basis of the traditional information gain, so that the decision tree can pay more attention to the dimensions which are more sensitive to account checking anomaly detection when the split attributes are selected, the generated rule is closer to an actual account checking scene, and the accuracy of account checking data anomaly recognition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a real-time reconciliation method and system based on a rule engine. Background Art

[0002] Since the business system of supply chain service companies covers multiple links such as procurement, logistics, and cross-border transactions, their unique reconciliation scenarios present significant characteristics such as high-frequency transactions, multiple participants, and complex business rules. This complex business model causes companies to face real pain points such as high labor costs and difficult operations during the reconciliation process. Therefore, companies usually use rule engines to improve the level of reconciliation automation.

[0003] A Chinese patent document with announcement number CN117350880B discloses a full-link reconciliation method, device, equipment and medium based on a snowflake algorithm, including: responding to a cross-border business reconciliation request and obtaining bill source data from the business end; parsing the obtained bill source data and converting it into target bill data; calling the reconciliation rule engine to obtain the corresponding reconciliation rule and select the corresponding reconciliation algorithm, executing the full-link reconciliation task on the target bill data to obtain the reconciliation result; transmitting the unbalanced reconciliation data to the corresponding exception handling system for verification and processing; generating a unique target ID based on the optimized snowflake algorithm to associate the reconciliation result with the corresponding bill, automatically penetrating the full-link data of the information flow and the capital flow according to the corresponding unique target ID in the reconciliation result, tracing the entire process of the corresponding bill flowing between the capital flow and the information flow according to the unique target ID to achieve a complete reconciliation closed loop, and improving the reconciliation work efficiency and data accuracy of the full-link cross-border business.

[0004] However, existing rule engines have the following major defects in practical applications: first, rule maintenance is difficult, and changes to business rules require frequent intervention and modification by technical personnel; second, the system lacks flexibility and is difficult to quickly adapt to changing reconciliation needs; third, the excessive dependence on data limits the applicability of the rule engine; and manually written rules are prone to errors, and rules need to be frequently modified when business changes, which makes the rule engine for reconciliation data have a high maintenance cost, restricting the progress of supply chain service companies in improving reconciliation efficiency. Summary of the invention

[0005] In order to solve the problems that the construction of rule engines has defects such as difficulty in rule maintenance, insufficient flexibility and strong data dependence; and that manually written rules are prone to errors and the rules need to be frequently modified when the business changes, which makes the reconciliation rule engine have a high maintenance cost, restricting the progress of supply chain service companies in improving reconciliation efficiency, the present invention provides a real-time reconciliation method and system based on a rule engine.

[0006] In a first aspect, the present invention provides a real-time reconciliation method based on a rule engine, which adopts the following technical solution: A real-time reconciliation method based on a rule engine comprises: obtaining reconciliation data of an enterprise including multiple dimensions, and determining normal reconciliation data and abnormal reconciliation data according to the result of each reconciliation data; for each numerical dimension in the multiple dimensions of the reconciliation data, determining the data dispersion degree of the numerical dimension according to the standard deviation, interquartile range and maximum value of the reconciliation data of the numerical dimension; determining the abnormal sensitivity of the numerical dimension according to the mean of the normal reconciliation data and the abnormal reconciliation data in the numerical dimension; for each text dimension in the multiple dimensions of the reconciliation data, determining the abnormal sensitivity of the numerical dimension according to the data dispersion degree of the numerical dimension, the information entropy of the reconciliation data of the text dimension, the minimum value, the reconciliation data The data discreteness of the text dimension is determined by the cosine similarity between the sentence vectors of the data; the abnormal sensitivity of the text dimension is determined according to the cosine similarity between the means of the sentence vectors of the normal reconciliation data and the abnormal reconciliation data in the text dimension; the product of the data discreteness and the abnormal sensitivity of each dimension is recorded as the importance of each dimension; in the process of using the decision tree to construct the rule engine of the reconciliation data, the information gain of each node of the decision tree is corrected according to the importance, and the corrected information gain of each node for data division using each dimension is obtained; based on the corrected information gain, a decision tree is generated and a rule engine for the reconciliation data is constructed.

[0007] The present invention calculates the degree of discreteness of each dimension of the reconciliation data, and the degree of discreteness can intuitively reveal which dimensions have greater potential value in distinguishing normal and abnormal data, thereby providing a basis for subsequent adjustments based on the importance of the dimensions; the importance of each dimension is obtained by combining the degree of discreteness of each dimension with the abnormality sensitivity, so that the contribution of each dimension in distinguishing normal and abnormal data can be evaluated, and the feature weight can be automatically adjusted according to the importance, so that the generation of the decision tree is more in line with the needs of the rule engine of the actual reconciliation business scenario; the calculation of information gain is adjusted by the importance of each dimension, and a decision tree is generated by correcting the information gain. A rule engine for reconciliation data is constructed based on the decision tree, and the importance of dimensions is introduced on the basis of traditional information gain, so that the decision tree can pay more attention to dimensions that are more sensitive to reconciliation anomaly detection when selecting split attributes, so that the generated rules are closer to the actual reconciliation scenario, thereby improving the accuracy of anomaly recognition of reconciliation data.

[0008] Furthermore, the reconciliation data includes a unique identifier, a transaction amount, a transaction status, a timestamp, and key fields.

[0009] Furthermore, the data discreteness of the numerical dimension satisfies: ; In the formula, For the The degree of data dispersion in the numerical dimension, For the The standard deviation of the reconciliation data in the numerical dimension, For this The interquartile range of the reconciliation data for the numerical dimension, For the The maximum value of the reconciliation data of the numeric dimension.

[0010] The present invention comprehensively considers the standard deviation, interquartile range and maximum value, and can comprehensively evaluate the degree of dispersion of reconciliation data, reflecting the volatility, variability and concentration of the data; by quantifying the degree of dispersion of numerical dimensions, it can more sensitively capture abnormal data points. When the degree of dispersion significantly deviates from the normal range, the system can identify and issue an alarm in a timely manner, thereby improving the accuracy and real-time performance of reconciliation.

[0011] Furthermore, the abnormal sensitivity of the numerical dimension satisfies: ; In the formula, For the Abnormal sensitivity of numerical dimensions, For the The average value of normal reconciliation data in the numerical dimension, For the The average of abnormal reconciliation data in the numerical dimension, is the maximum value function, is the absolute value symbol.

[0012] The present invention can quantify the significance of anomalies by calculating the mean difference between normal and abnormal reconciliation data. High sensitivity means that there is a large difference between abnormal data and normal data, which helps to identify anomalies more quickly and accurately; using the ratio of the absolute difference of the mean to the maximum mean can effectively eliminate the difference in data scale, making the sensitivity between different numerical dimensions comparable, which helps to identify the importance of abnormal data in different dimensions in the overall data set.

[0013] Furthermore, the sentence vector is obtained by transforming the reconciliation data of the text dimension using Sentence-BERT.

[0014] Furthermore, the data discreteness of the text dimension satisfies: ; In the formula, For the The degree of data dispersion of the text dimension, is the minimum value of the data discreteness of all numerical dimensions, For the The information entropy of the reconciliation data in the text dimension, For the In the text dimension The mean of the cosine similarity between the sentence vectors of the reconciliation data and the rest of the reconciliation data, is the number of reconciliation data, is the natural exponential function, is a linear normalization function.

[0015] The present invention combines information entropy and the mean cosine similarity between sentence vectors, which can comprehensively reflect the diversity and complexity of text data and help to deeply analyze the characteristics of reconciliation data; by introducing information entropy, the diversity of text dimensions can be quantified; the cosine similarity of sentence vectors is linearly normalized to ensure that the influence of extreme similarity on the result is reasonably controlled, making the calculated discrete degree more robust.

[0016] Furthermore, the abnormal sensitivity of the text dimension satisfies: ; In the formula, For the Abnormal sensitivity of the text dimension, For the The cosine similarity between the mean of the sentence vectors of normal reconciliation data and abnormal reconciliation data in the text dimension, is a natural exponential function.

[0017] The present invention quantifies the similarity between normal reconciliation data and abnormal reconciliation data, making the calculation of abnormal sensitivity more intuitive and clear, and the sensitivity value directly reflects the degree of difference between normal data and abnormal data; using the natural exponential function to transform the similarity, data with lower similarity (larger anomalies) can be given a higher weight, making it more sensitive to larger deviations in anomaly detection, thereby enhancing the system's anomaly detection capability; through the exponential processing of cosine similarity, it can effectively capture different degrees of abnormal situations in the text dimension, so that the model can adapt to data changes more flexibly.

[0018] Furthermore, the modified information gain satisfies: ; In the formula, For the node Use the The modified information gain of data partitioning in dimensions, For Node The information entropy of internal reconciliation data, For the node Use the The number of branch nodes obtained by dividing the data into dimensions, For the node Use the The first The information entropy of the branch nodes is For Node The amount of reconciliation data included, For the node Use the The first The number of reconciliation data contained in each branch node, For the The importance of the dimension, is a natural exponential function.

[0019] Furthermore, the rule engine for generating a decision tree and constructing reconciliation data based on the modified information gain includes: using the modified information gain to replace the information gain when generating the decision tree, selecting the dimension corresponding to the maximum value of the modified information gain to divide the branch nodes of the decision tree, until all samples on all leaf nodes of the decision tree belong to the same category, and completing the generation of the decision tree; taking each node of the decision tree as a judgment condition, each branch as a judgment result, and each leaf node as a reconciliation rule, traversing the decision tree, extracting all reconciliation rules and forming a rule set, realizing the construction of the rule engine, and completing real-time reconciliation based on the rule engine.

[0020] In a second aspect, the present invention provides a real-time reconciliation system based on a rule engine, which adopts the following technical solution: A real-time reconciliation system based on a rule engine comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the real-time reconciliation method based on the rule engine is implemented.

[0021] By adopting the above technical solution, the above-mentioned real-time reconciliation method based on the rule engine is generated into a computer program and stored in the memory to be loaded and executed by the processor, so that a terminal device is made according to the memory and the processor for easy use.

[0022] The present invention has the following technical effects: By calculating the importance of each dimension and correcting the information gain of the decision tree nodes accordingly to build a rule engine, the construction of the rule engine is more scientific and reduces the difficulty of rule maintenance compared to traditional methods. Because traditional manual rule writing is prone to errors and the rules are frequently modified when the business changes, the present invention determines the key factors of rule construction based on the characteristics of the data itself, making the rules more stable, reducing the frequent modification of rules due to business changes, and reducing the difficulty of rule maintenance; building a rule engine based on the relevant characteristics of multiple dimensions of data (including numerical dimensions and text dimensions) (such as data discreteness, abnormal sensitivity, etc.) can better adapt to different types of data and business scenarios. When the business changes, the rule engine can The rules can be adjusted more flexibly according to the changes in characteristics, rather than relying entirely on frequent manual modification of rules as in the traditional way, thereby improving the flexibility of the rule engine; in the process of building the rule engine, the multiple dimensional characteristics of the data and the importance of each dimension are comprehensively considered, and the data is analyzed more comprehensively and in-depth, rather than simply relying on one or several data characteristics. This can more accurately capture the patterns and anomalies in the data, reduce excessive reliance on a single data feature, and make the rule engine more robust when processing data; due to the reduced difficulty of rule maintenance and improved flexibility, the adjustment of rules when the business changes is more efficient and accurate, reducing the workload of manual writing and modification of rules, thereby reducing the maintenance cost of the reconciliation rule engine. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 The present invention is a flowchart of a real-time reconciliation method based on a rule engine in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0025] The embodiment of the present invention discloses a real-time reconciliation method based on a rule engine, referring to Figure 1 , comprising steps S1 to S6: S1: Obtain the reconciliation data of the enterprise containing multiple dimensions, and determine the normal reconciliation data and the abnormal reconciliation data according to the results of each reconciliation data.

[0026] It should be noted that the internal reconciliation system of the enterprise collects structured (the structure includes account ID, the difference between the amount in the business system and the amount in the financial system, customer ID, payment status, etc.) transaction flow, bill and log data from multiple business systems such as ERP, financial system, payment gateway, etc. through API interface, database synchronization, ETL tasks and real-time stream processing. After key field matching, data cleaning and standardization preprocessing, reconciliation data containing multiple dimensions is generated. Each reconciliation data corresponds to a label, that is, reconciliation normal or reconciliation abnormal (implementation personnel can also increase the setting of label categories according to the specific implementation situation).

[0027] Specifically, the reconciliation data includes a unique identifier, a transaction amount, a transaction status, a timestamp, and key fields.

[0028] S2: Determine the degree of data dispersion in each dimension.

[0029] It should be noted that data of different dimensions in the reconciliation data have different distribution characteristics, which also makes the data of different dimensions have different discrete degrees. This difference affects the construction of the rule engine under different reconciliation cycles. In order to make the rule engine construction of the reconciliation system more adaptable to the needs of reconciliation work in different periods, this step calculates the discrete degree of each dimension based on the reconciliation data of each dimension.

[0030] For each numerical dimension in the multiple dimensions of the reconciliation data, the data dispersion degree of the numerical dimension is determined according to the standard deviation, interquartile range and maximum value of the reconciliation data of the numerical dimension.

[0031] Specifically, the data discreteness of the numerical dimension satisfies: ; In the formula, For the The degree of data dispersion in the numerical dimension, For the The standard deviation of the reconciliation data in the numerical dimension, For this The interquartile range of the reconciliation data for the numerical dimension, For the The maximum value of the reconciliation data of the numeric dimension.

[0032] in, The larger the value, the more drastic the fluctuation of the data in this dimension, the more discrete the distribution, and the greater the degree of discreteness of this dimension. The smaller the value, the more stable the data of the dimension is, the more concentrated the distribution is, and the smaller the discrete degree of the dimension is. In order to facilitate calculation, we divide it by The way to Normalized. The larger the value is, the wider the distribution range of the regular (non-prominent) data in the dimension data is, and the more discrete the distribution of the dimension data is, the greater the degree of dispersion of the dimension is; The smaller the value, the more concentrated the data in the dimension data is towards the median of the dimension data. The more concentrated the distribution of the dimension data is, the smaller the discrete degree of the dimension is. In order to facilitate calculation, we also divide by The way to Normalized.

[0033] For each text dimension in the multiple dimensions of the reconciliation data, the data discreteness of the text dimension is determined based on the data discreteness of the numerical dimension, the information entropy of the reconciliation data in the text dimension, the minimum value, and the cosine similarity between the sentence vectors of the reconciliation data.

[0034] Specifically, the sentence vector is obtained by transforming the reconciliation data of the text dimension using Sentence-BERT.

[0035] Specifically, the data discreteness of the text dimension satisfies: ; In the formula, For the The degree of data dispersion of the text dimension, is the minimum value of the data discreteness of all numerical dimensions, For the The information entropy of the reconciliation data in the text dimension, For the In the text dimension The mean of the cosine similarity between the sentence vectors of the reconciliation data and the rest of the reconciliation data, is the number of reconciliation data, is the natural exponential function, is a linear normalization function.

[0036] Among them, because the data of the numerical dimension in the reconciliation system is usually more discrete than the data of the text dimension, The data discreteness of the text dimension is calculated by downward adjustment on the basis of , with the aim of unifying the dimension so that the data discreteness of the text dimension is smaller than that of the numerical dimension. The larger the value is, the more diverse the text patterns of the reconciliation data of this text dimension are, and the greater the data dispersion of this text dimension is; The smaller it is, the simpler the text pattern of the reconciliation data of this text dimension is, and the smaller the data discreteness of this text dimension is. The larger the value is, the more similar the reconciliation data of the text dimension is, the more unified the content of the reconciliation data of the text dimension is, and the smaller the data dispersion of the text dimension is; The smaller it is, the greater the semantic difference of the reconciliation data of this text dimension, the more diverse the content, and the greater the data discreteness of this text dimension.

[0037] S3: Determine the abnormal sensitivity of each dimension.

[0038] It should be noted that in the reconciliation data, different dimensions have different sensitivities to identifying abnormal data; this difference in abnormal sensitivity will directly affect the degree of reliance of the rule engine on each dimension when judging whether the data is abnormal; in order to build a more accurate and effective rule engine so that it can more accurately identify abnormal reconciliation data, this step calculates the abnormal sensitivity of each dimension based on the characteristics of normal reconciliation data and abnormal reconciliation data in different dimensional data.

[0039] For each numerical dimension in the multiple dimensions of the reconciliation data, the abnormal sensitivity of the numerical dimension is determined according to the average of the normal reconciliation data and the abnormal reconciliation data in the numerical dimension.

[0040] Specifically, the abnormal sensitivity of the numerical dimension satisfies: ; In the formula, For the Abnormal sensitivity of numerical dimensions, For the The average value of normal reconciliation data in the numerical dimension, For the The average of abnormal reconciliation data in the numerical dimension, is the maximum value function, is the absolute value symbol.

[0041] in, The larger the In a numerical dimension, the greater the difference between the mean of normal reconciliation data and the mean of abnormal reconciliation data, the higher the sensitivity of this dimension in distinguishing normal and abnormal data, and the greater the abnormal sensitivity of this dimension; The smaller the value, the smaller the difference between the mean of normal and abnormal data in this numerical dimension, the weaker the ability of this dimension to distinguish between normal and abnormal data, and the smaller the abnormal sensitivity of this dimension; by dividing by way, yes Normalization was performed to make the value of abnormal sensitivity within a reasonable range, which facilitates the comparison of abnormal sensitivity between different numerical dimensions.

[0042] For each text dimension in the multiple dimensions of the reconciliation data, the abnormal sensitivity of the text dimension is determined according to the cosine similarity between the mean of the sentence vectors of the normal reconciliation data and the abnormal reconciliation data in the text dimension; assuming that the number of normal reconciliation data is 2, and the normal reconciliation data 1 is in the first The sentence vector of the text dimension is , normal reconciliation data 2 is in The sentence vector of the text dimension is , then the mean of the sentence vector of the normal reconciliation data is ; The same is true for the mean of the sentence vector of abnormal reconciliation data.

[0043] Specifically, the abnormal sensitivity of the text dimension satisfies: ; In the formula, For the Abnormal sensitivity of the text dimension, For the The cosine similarity between the mean of the sentence vectors of normal reconciliation data and abnormal reconciliation data in the text dimension, is a natural exponential function.

[0044] in, The larger the The higher the cosine similarity between the mean values ​​of the sentence vectors of normal reconciliation data and abnormal reconciliation data in a text dimension, that is, the higher the semantic similarity between the two types of data, the lower the sensitivity of the text dimension in distinguishing normal and abnormal data, and the lower the abnormal sensitivity; The smaller it is, the lower the cosine similarity between the mean values ​​of the sentence vectors of normal and abnormal data in this text dimension is, the greater the semantic difference is, the stronger the ability of this text dimension to distinguish normal and abnormal data is, and the greater the abnormal sensitivity is; The calculation method is to convert the cosine similarity Converted into a suitable abnormal sensitivity value, the abnormal sensitivity of the text dimension can play a reasonable role in building the rule engine and better adapt to the characteristics of data in different text dimensions.

[0045] S4: Get the importance of each dimension.

[0046] It should be noted that reconciliation data usually contains multi-dimensional features, but not all features contribute equally to anomaly identification, and the importance of dimensions may change dynamically in reconciliation under different business cycle scenarios, that is, data of one dimension has a higher degree of importance in the reconciliation task of a certain period, while the importance of data of this dimension is lower in another period. Treating reconciliation data of various dimensions equally may not meet the reconciliation needs well. Therefore, this step calculates the importance of each dimension of the reconciliation data based on the discreteness and abnormal sensitivity of each dimension.

[0047] Specifically, the importance satisfies: ; In the formula, For the The importance of the dimension, is the numerical dimension, is the text dimension, and Respectively The degree of discreteness and abnormal sensitivity when the dimension belongs to the numerical dimension, and Respectively The degree of discreteness and abnormal sensitivity when the dimension belongs to the text dimension.

[0048] in, or The larger the value, the higher the reconciliation data. The more differentiated data there are in each dimension, the more The dimensions can more effectively segment data and improve the classification ability of the decision tree, thereby enabling the rule engine to be better applied to reconciliation work. or The bigger, the The importance of the reconciliation data in the first dimension (i.e. The importance of each dimension) is greater; or The smaller the size, the higher the reconciliation data. The smaller the data differentiation in each dimension, the smaller the The more dimensions, the less effective it is in segmenting data. In order to improve the classification ability of the decision tree and enable the rule engine to be better applied to reconciliation work, the first The more dimensions of reconciliation data are included, the less important they are. or The larger the value, the more different types of reconciliation data (normal or abnormal) are in the The greater the difference in the first dimension, The more sensitive the reconciliation data of the first dimension is to the reconciliation work, the The more important the reconciliation data is, the higher the importance of the reconciliation data in each dimension; or The smaller the value, the more different types of reconciliation data (normal or abnormal) are. The smaller the difference in the first dimension, the The less sensitive the reconciliation data of the first dimension is to the reconciliation work, the The more dimensions of reconciliation data are included, the less important they are.

[0049] S5: Obtain the modified information gain of each node in the decision tree using each dimension to partition the data.

[0050] It should be noted that in the process of building the reconciliation rule engine, decision trees can be used to extract data splitting rules to meet reconciliation needs. However, the traditional decision tree generation process lacks a dynamic adjustment mechanism, that is, it lacks the ability to dynamically adjust the importance of features, and it is difficult to respond to changes in business scenarios in real time. By introducing the importance of each dimension to adjust the information gain calculation, the splitting decision can be made more in line with the feature distribution and anomaly identification needs in the actual business, thereby generating more accurate and adaptable reconciliation rules. Therefore, this step adjusts the calculation of information gain through the importance of each dimension.

[0051] In the process of constructing a rule engine for reconciliation data using a decision tree, the information gain of each node of the decision tree is corrected according to the importance, and a corrected information gain for data division at each node using each dimension is obtained.

[0052] Specifically, the modified information gain satisfies: ; In the formula, For the node Use the The modified information gain of data partitioning in dimensions, For Node The information entropy of internal reconciliation data, For the node Use the The number of branch nodes obtained by dividing the data into dimensions, For the node Use the The first The information entropy of the branch nodes is For Node The amount of reconciliation data included, For the node Use the The first The number of reconciliation data contained in each branch node, For the The importance of the dimension, is a natural exponential function.

[0053] in, This is the calculation method of the existing information gain. The larger the value, the more Dimensions to nodes The greater the purity of the branch nodes obtained during the division, the more it should be passed through the first Dimensions to nodes The smaller the value, the more Dimensions to nodes The smaller the purity improvement of the branch node obtained during the division, the less likely it is that the first Dimensions to nodes Divide. The larger the The more important a dimension is to the reconciliation work, the more it should be passed through the The nodes are divided into dimensions to make the construction of the decision tree more suitable for the needs of the reconciliation rule engine. The larger it is, the greater the corrected information gain is; The smaller the The less important a dimension is to the reconciliation work, the more priority should be given to other dimensions when dividing nodes. The smaller it is, the smaller the corrected information gain is.

[0054] S6: Based on the modified information gain, a decision tree is generated and a rule engine for reconciliation data is constructed.

[0055] Specifically, the rule engine for generating a decision tree and constructing reconciliation data based on the modified information gain includes: The modified information gain is used to replace the information gain when generating the decision tree, and the dimension corresponding to the maximum value of the modified information gain is selected to divide the branch nodes of the decision tree until all samples on all leaf nodes of the decision tree belong to the same category, thereby completing the generation of the decision tree; Take each node of the decision tree as a judgment condition, each branch as a judgment result, and each leaf node as a reconciliation rule. Traverse the decision tree, extract all reconciliation rules and form a rule set to build a rule engine. When new reconciliation data arrives, the rule engine will match the reconciliation data according to the reconciliation rules, thereby realizing automatic reconciliation and completing real-time reconciliation based on the rule engine.

[0056] When reconciliation is performed in a new round of reconciliation cycle, the decision tree is regenerated based on the reconciliation data of the new round of reconciliation cycle and a rule engine for the new round of reconciliation data is constructed.

[0057] An embodiment of the present invention further discloses a real-time reconciliation system based on a rule engine, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a real-time reconciliation method based on a rule engine according to the present invention is implemented.

[0058] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0059] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A real-time reconciliation method based on a rule engine, characterized in that: include: Obtain the company's reconciliation data containing multiple dimensions, and determine normal reconciliation data and abnormal reconciliation data based on the results of each reconciliation data; For each numerical dimension in the multiple dimensions of the reconciliation data, determine the data dispersion of the numerical dimension according to the standard deviation, interquartile range and maximum value of the reconciliation data of the numerical dimension; determine the abnormal sensitivity of the numerical dimension according to the mean of the normal reconciliation data and the abnormal reconciliation data in the numerical dimension; For each text dimension in the multiple dimensions of the reconciliation data, the data discreteness of the text dimension is determined according to the data discreteness of the numerical dimension, the information entropy of the reconciliation data in the text dimension, the minimum value, and the cosine similarity between the sentence vectors of the reconciliation data; the abnormal sensitivity of the text dimension is determined according to the cosine similarity between the mean values ​​of the sentence vectors of the normal reconciliation data and the abnormal reconciliation data in the text dimension; The product of the data discreteness and abnormal sensitivity of each dimension is recorded as the importance of each dimension; In the process of constructing a rule engine for reconciliation data using a decision tree, the information gain of each node of the decision tree is corrected according to the importance, so as to obtain a corrected information gain for data division of each node using each dimension; Based on the modified information gain, a decision tree is generated and a rule engine for reconciliation data is constructed.

2. A real-time reconciliation method based on a rule engine according to claim 1, characterized in that: The reconciliation data includes a unique identifier, transaction amount, transaction status, timestamp, and key fields.

3. The real-time reconciliation method based on rule engine according to claim 1, characterized in that: The data discreteness of the numerical dimension satisfies: ; In the formula, For the The degree of data dispersion in the numerical dimension, For the The standard deviation of the reconciliation data in the numerical dimension, For this The interquartile range of the reconciliation data for the numerical dimension, For the The maximum value of the reconciliation data of the numeric dimension.

4. The real-time reconciliation method based on rule engine according to claim 1, characterized in that: The abnormal sensitivity of the numerical dimension satisfies: ; In the formula, For the Abnormal sensitivity of numerical dimensions, For the The average value of normal reconciliation data in the numerical dimension, For the The average of abnormal reconciliation data in the numerical dimension, is the maximum value function, is the absolute value symbol.

5. The real-time reconciliation method based on rule engine according to claim 1, characterized in that: The sentence vector is obtained by transforming the reconciliation data of the text dimension using Sentence-BERT.

6. A real-time reconciliation method based on a rule engine according to claim 5, characterized in that: The data discreteness of the text dimension satisfies: ; In the formula, For the The degree of data dispersion of the text dimension, is the minimum value of the data discreteness of all numerical dimensions, For the The information entropy of the reconciliation data in the text dimension, For the In the text dimension The mean of the cosine similarity between the sentence vectors of the reconciliation data and the rest of the reconciliation data, is the number of reconciliation data, is the natural exponential function, is a linear normalization function.

7. A real-time reconciliation method based on a rule engine according to claim 5, characterized in that: The abnormal sensitivity of the text dimension satisfies: ; In the formula, For the Abnormal sensitivity of the text dimension, For the The cosine similarity between the mean of the sentence vectors of normal reconciliation data and abnormal reconciliation data in the text dimension, is a natural exponential function.

8. The real-time reconciliation method based on rule engine according to claim 1, characterized in that: The modified information gain satisfies: ; In the formula, For the node Use the The modified information gain of data partitioning in dimensions, For Node The information entropy of internal reconciliation data, For the node Use the The number of branch nodes obtained by dividing the data into dimensions, For the node Use the The first The information entropy of the branch nodes is For Node The amount of reconciliation data included, For the node Use the The first The number of reconciliation data contained in each branch node, For the The importance of the dimension, is a natural exponential function.

9. The real-time reconciliation method based on rule engine according to claim 1, characterized in that: The method of generating a decision tree and constructing a rule engine for reconciliation data based on the modified information gain includes: The modified information gain is used to replace the information gain when generating the decision tree, and the dimension corresponding to the maximum value of the modified information gain is selected to divide the branch nodes of the decision tree until all samples on all leaf nodes of the decision tree belong to the same category, thereby completing the generation of the decision tree; Take each node of the decision tree as a judgment condition, each branch as a judgment result, and each leaf node as a reconciliation rule. Traverse the decision tree, extract all reconciliation rules and form a rule set to build a rule engine and complete real-time reconciliation based on the rule engine.

10. A real-time reconciliation system based on a rule engine, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a real-time reconciliation method based on a rule engine according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Full-link reconciliation method, device, equipment and medium based on snowflake algorithm

    CN117350880B

  • Settlement configuration method and device, and electronic equipment

    CN108629592A

  • Engine rule definition method and device, electronic equipment and storage medium

    CN114969123A

  • Risk identification method based on decision tree algorithm

    CN119167218A

  • Unmanned ship multi-mode perception and decision support method and system based on fuzzy logic and rule engine

    CN119294538A

Cited By

  • Reconciliation method and system, computer and storage medium

    CN122390898A