Bill matching method and system for cross-platform intelligent reconciliation of chain stores
By introducing dynamic feedback time prediction model and abnormal detection and automatic error correction model in intelligent reconciliation management, combined with blockchain technology, problems such as data synchronization delay, manual error and complex exception handling are solved, and efficient and automatic reconciliation management is achieved.
Patent Information
- Application Number
- CN202510152639.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-03-18
AI Technical Summary
现有技术在智能对账管理中存在数据同步延迟、人工参与导致的误差、复杂的异常处理机制、对账失败导致的操作复杂度和时间成本增加,以及反馈时间期限导致的推送消息失效问题。
Dynamic feedback time prediction model and abnormal detection and automatic error correction model are used to realize automatic reconciliation through blockchain technology. Specific steps include: data preprocessing and on-chain processing, inputting data to dynamic feedback time prediction model to determine feedback time, inputting distributed ledger to abnormal detection and automatic error correction model to detect abnormalities and correct data, and generating reconciliation reports.
By dynamically adjusting the reconciliation trigger time, avoid reconciliation failure caused by static periods, improve reconciliation efficiency and success rate, reduce manpower and material resources consumption, and realize automatic triggered reconciliation.
Smart Images

Figure CN119648214A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent account reconciliation, and more specifically, to a bill matching method and system for cross-platform intelligent account reconciliation of chain stores. Background Art
[0002] With the development of intelligent interconnection technology, the store retail industry increasingly relies on multiple online and offline business platforms for sales, circulation and services. However, there is a delay in the synchronization of data updates between these different platforms, making it difficult to conduct real-time and accurate reconciliation management.
[0003] The traditional reconciliation management method requires manual extraction and aggregation of data from various platforms, which is a cumbersome and inefficient process. Due to the possibility of manual participation, there are large errors in data synchronization and processing. On the other hand, as the scale of business expands, the time difference between different regions and systems also brings certain difficulties to reconciliation management.
[0004] At the same time, stores are increasingly paying attention to inventory management and customer service quality. However, manual reconciliation makes it difficult to monitor and analyze key indicators in real time, and it is difficult to detect and correct problems in a timely manner. This will affect inventory efficiency and customer experience.
[0005] Blockchain technology has the advantages of security, immutability and automatic execution, and can be used to solve the pain points of data synchronization and reconciliation management. At the same time, the use of smart contracts can automatically trigger the reconciliation process based on the data status.
[0006] For example, the Chinese patent with publication number CN112069262A provides a method for uploading reconciliation data to the chain based on blockchain smart contracts. The two parties in the logistics transaction implement a decentralized reliable storage based on blockchain and data security and automated reconciliation methods based on smart contracts based on logistics transaction order information. This invention uses blockchain smart contract technology to achieve the storage and management of uplinked data, and the reconciliation results are traceable. The identity verification based on smart contracts ensures data security and access control. The decentralized logistics transaction distributed ledger formed based on the uplink data realizes the automated reconciliation function, which solves the problems of inaccurate manual reconciliation results, low reconciliation efficiency, low credibility and performance of reconciliation results, and data insecurity in the actual business processing process.
[0007] Although the above invention solves some problems, the following problems still exist:
[0008] 1. The entire process relies on blockchain, which may lead to system performance bottlenecks, especially when the amount of data is large or the transactions are frequent. Although blockchain is secure, the disclosure of data may bring certain privacy risks.
[0009] 2. The mechanism for handling abnormal situations is relatively simple and may require more manual intervention, but manual intervention will bring efficiency problems.
[0010] 3. If the reconciliation fails, it is necessary to re-initiate the entire on-chain application and trigger the automatic reconciliation process, which may increase the complexity and time cost of the operation.
[0011] 4. The currently set feedback time limit may cause the push message to automatically become invalid, affecting the efficiency of reconciliation. Summary of the invention
[0012] In order to solve the above problems, an embodiment of the present invention provides a bill matching method for cross-platform intelligent reconciliation of chain stores, and the method includes:
[0013] Collect multi-platform account data and perform data preprocessing to obtain high-quality multi-platform account data;
[0014] Back up and upload excellent multi-platform account data to the blockchain, and store the backup of excellent multi-platform account data in a distributed database;
[0015] Input high-quality multi-platform account data into the pre-built dynamic feedback time prediction model, output the estimated feedback time, and use the estimated feedback time as the trigger condition for the smart contract to automatically reconcile accounts. When the smart contract is triggered, a distributed ledger is formed;
[0016] Input the distributed ledger into the pre-built anomaly detection and automatic error correction model, and output the anomaly detection results and corrected multi-platform account data;
[0017] Receive the anomaly detection results, the corrected multi-platform account data and the backed-up multi-platform transaction data, and generate a reconciliation report based on the anomaly detection results, the corrected multi-platform account data and the backed-up high-quality multi-platform account data.
[0018] Furthermore, the inputting of excellent multi-platform account data into a pre-built dynamic feedback time prediction model includes:
[0019] Taking a preset number of hours as the time window length, sliding on the historical data of the chain stores in units of hours to obtain the first time window of each sliding;
[0020] Taking a preset number of days as the time window length, sliding on the historical data of the chain stores in units of days to obtain a second time window for each sliding;
[0021] When it is detected that the difference between the business volume of the first time window and the business volume of the reference time window of the corresponding number of days before is higher than a first set threshold, all second time windows having time overlap with the first time window are extracted; the reference time window is the first time window of the same date in previous years with normal business volume;
[0022] All excellent multi-platform account data of the second time window with time overlap are input into the dynamic feedback time prediction model.
[0023] Furthermore, the dynamic feedback time prediction model integrates an event impact knowledge graph, a similarity comparison plug-in and a time calculation plug-in, the event impact knowledge graph includes multiple entities, each entity includes a business volume trend curve of each second time window involved in a type of emergency event, the similarity comparison plug-in is used to compare the similarity of each entity with multiple business volume trend curves input into the event impact knowledge graph model, and the time calculation plug-in is used to call all the second time windows involved in the determined entity, and determine the complete time period corresponding to all the second time windows involved as the feedback time. Furthermore, the multi-platform account data includes transaction data, order information, inventory data, payment information, customer complaint records, platform information, customer information and environmental variables; the method for processing the excellent multi-platform account data on the chain includes using a symmetric encryption algorithm to encrypt the excellent multi-platform account data and generate a symmetric encryption key; encrypting the symmetric encryption key using an asymmetric encryption algorithm to generate an encryption key; using a hash algorithm to generate a hash value of the excellent multi-platform account data; recording the generated hash value in a distributed database; formatting the excellent multi-platform account data into a structure suitable for blockchain storage; encapsulating the excellent multi-platform account data, the hash value of the excellent multi-platform account data and the secondary encrypted excellent multi-platform account data into a complete block.
[0024] Furthermore, the expected feedback time is used as a trigger condition for the smart contract to perform automatic reconciliation, wherein the automatic reconciliation of the smart contract is to trigger the smart contract to verify and store the excellent multi-platform account data, and the smart contract verification is to verify the hash value of the excellent multi-platform account data; when the smart contract is triggered, the process of forming a distributed ledger is to package the verified excellent multi-platform account data to generate a new block through the blockchain consensus mechanism, and the new block is distributedly stored through the blockchain network, and each node synchronizes the new block information to form a distributed ledger.
[0025] Furthermore, the anomaly detection and automatic error correction model is a single-class support vector machine model, including an input layer, a feature extraction layer, a feature selection layer, a coding layer, an SVM classifier layer and an output layer; the input layer nodes include transaction data input nodes, order data input nodes, payment data input nodes, inventory data input nodes and customer complaint record input nodes; the feature selection layer nodes include association analysis nodes and filtering nodes; the coding layer nodes include One-Hot coding nodes and standardization nodes; the SVM classifier layer nodes include RBF kernel operation nodes, maximum interval estimation nodes and classification prediction nodes;
[0026] RBF kernel operation node: maps the output values of the input layer, feature extraction layer, feature selection layer and encoding layer to high-dimensional space through the RBF kernel function. The RBF kernel function K( , ) form: K( , )=exp(-γ|| - || 2 ), where γ is the kernel parameter, is the output value of the input layer, feature extraction layer, feature selection layer and encoding layer, for The category label of
[0027] Maximum margin estimation node: learn the classification separation hyperplane, the calculation formula of the separation hyperplane is ×φ( )+ =0, where φ( ) Representatives will The new form after mapping to the high-dimensional feature space through the RBF kernel function, is the normal vector of the learned separation hyperplane in the high-dimensional feature space, is the offset of the separation hyperplane, that is, the location of the hyperplane in the feature space;
[0028] Classification prediction node: predicts the classification result based on the output values of the input layer, feature extraction layer, feature selection layer, and encoding layer. The prediction method is to calculate The mapping φ( ), insert the classification function sgn( ×φ( )+ ) is used for prediction. If it is greater than 0, it is predicted as a positive class, and if it is less than 0, it is predicted as a negative class;
[0029] The output values of the output layer nodes are the anomaly detection results and the corrected multi-platform account data.
[0030] Furthermore, the training method of the anomaly detection and automatic error correction model includes:
[0031] The anomaly detection and automatic error correction model uses the structural risk minimization method for model training. The training goal is to find the maximum margin hyperplane:
[0032] Optimize a problem with inequality constraints:
[0033] ;
[0034] ;
[0035] In the formula, is a slack variable, allowing part Outside the border, Indicates restriction, represents the penalty for training errors; Indicates the number, ≥1;
[0036] The conversion objective is in Lagrangian dual form, which becomes a convex quadratic programming problem:
[0037] ;
[0038] ;
[0039] In the formula, represents the dual function, express The corresponding Lagrange multiplier is, Indicates the number, and ≠ ≥1;
[0040] In the continuous training of the model, if and If convergence occurs, the model training is completed and the training stops immediately.
[0041] Furthermore, it also includes:
[0042] Perform data monitoring on high-quality multi-platform account data, input the monitored multi-platform account data into the abnormal data cleaning model, and output high-quality multi-platform account data.
[0043] Furthermore, the method for constructing the abnormal data cleaning model includes:
[0044] The multi-platform account data is used as analysis data, high-quality multi-platform account data corresponding to G groups of analysis data are collected in advance, and the analysis data and the corresponding high-quality multi-platform account data are converted into a corresponding set of second feature vectors.
[0045] Each group of second eigenvectors is used as the input of the abnormal data cleaning model. The abnormal data cleaning model uses a group of high-quality multi-platform account data corresponding to each group of analysis data as output, and uses the actual high-quality multi-platform account data corresponding to each group of analysis data as the prediction target. The actual high-quality multi-platform account data is the pre-collected high-quality multi-platform account data corresponding to the analysis data. Minimizing the sum of the prediction errors of all analysis data is used as the training target. The calculation formula of the prediction error is: ,in is the prediction error, K is the group number of the second eigenvector corresponding to the analysis data, The high-quality multi-platform account data corresponding to the Kth group of analysis data, The actual high-quality multi-platform account data corresponding to the Kth group of analysis data; the abnormal data cleaning model is trained until the sum of the prediction errors reaches convergence and the training is stopped; the abnormal data cleaning model is a lonely forest model.
[0046] The bill matching system for chain stores with cross-platform intelligent reconciliation includes:
[0047] Collection module: used to collect multi-platform account data and perform data preprocessing to obtain high-quality multi-platform account data;
[0048] Monitoring and cleaning module: monitors the high-quality multi-platform account data, inputs the monitored multi-platform account data into the abnormal data cleaning model, and outputs high-quality multi-platform account data;
[0049] Data on-chain module: used to back up and process high-quality multi-platform account data on the chain, and store the backed-up high-quality multi-platform transaction data in a distributed database;
[0050] Time prediction module: used to input high-quality multi-platform account data into the pre-built dynamic feedback time prediction model, output the estimated feedback time, and use the estimated feedback time as the trigger condition for the smart contract to automatically reconcile accounts. When the smart contract is triggered, a distributed ledger is formed;
[0051] Detection and Error Correction Module: used to input the distributed ledger into the pre-built anomaly detection and automatic error correction model, and output the anomaly detection results and corrected multi-platform account data;
[0052] Report generation module: used to receive anomaly detection results, corrected multi-platform account data and backed-up multi-platform transaction data, and generate reconciliation reports based on the anomaly detection results, corrected multi-platform account data and backed-up high-quality multi-platform account data.
[0053] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the bill matching method for cross-platform intelligent reconciliation of chain stores is implemented.
[0054] The technical effects and advantages of the bill matching method and system for cross-platform intelligent reconciliation of chain stores provided by the present invention are as follows:
[0055] The present invention introduces a dynamic feedback time prediction model to use the time period (feedback time) affected by the determined abnormal impact as the trigger condition of the smart contract. It can dynamically adjust the reconciliation trigger time according to the actual situation, avoid reconciliation failures caused by setting static deadlines, greatly improve reconciliation efficiency and success rate, and cleverly realize automatic triggered reconciliation through blockchain technology, saving manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a flow chart of the bill matching method for cross-platform intelligent reconciliation of chain stores in Example 1;
[0057] Figure 2 It is a schematic diagram of the principle in Example 1;
[0058] Figure 3 This is a flow chart of the bill matching method for cross-platform intelligent reconciliation of chain stores in Example 2;
[0059] Figure 4 A connection diagram of the bill matching system for cross-platform intelligent reconciliation of chain stores. DETAILED DESCRIPTION
[0060] 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 only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] Embodiment 1:
[0062] See also Figure 1 As shown, the bill matching method for cross-platform intelligent reconciliation of chain stores in this embodiment includes:
[0063] Collect multi-platform account data and perform data preprocessing to obtain high-quality multi-platform account data;
[0064] Back up and upload excellent multi-platform account data to the blockchain, and store the backup of excellent multi-platform account data in a distributed database;
[0065] Input high-quality multi-platform account data into the pre-built dynamic feedback time prediction model, output the estimated feedback time, and use the estimated feedback time as the trigger condition for the smart contract to automatically reconcile accounts. When the smart contract is triggered, a distributed ledger is formed;
[0066] Input the distributed ledger into the pre-built anomaly detection and automatic error correction model, and output the anomaly detection results and corrected multi-platform account data;
[0067] Receive the anomaly detection results, the corrected multi-platform account data and the backed-up high-quality multi-platform account data, and generate a reconciliation report based on the anomaly detection results, the corrected multi-platform account data and the backed-up high-quality multi-platform account data.
[0068] The present invention introduces a dynamic feedback time prediction model to use the time period (feedback time) affected by the determined abnormal impact as the trigger condition of the smart contract. It can dynamically adjust the reconciliation trigger time according to the actual situation, avoid reconciliation failures caused by setting static deadlines, greatly improve reconciliation efficiency and success rate, and cleverly realize automatic triggered reconciliation through blockchain technology, saving manpower and material resources.
[0069] The following is a detailed description of an embodiment of the present application. In the embodiment of the present application, the inputting of excellent multi-platform account data into a pre-built dynamic feedback time prediction model includes:
[0070] Taking a preset number of hours as the time window length, sliding on the historical data of the chain stores in units of hours to obtain the first time window of each sliding;
[0071] Taking a preset number of days as the time window length, sliding on the historical data of the chain stores in units of days to obtain a second time window for each sliding;
[0072] When it is detected that the difference between the business volume of the first time window and the business volume of the reference time window of the corresponding number of days before is higher than a first set threshold, all second time windows having time overlap with the first time window are extracted; the reference time window is the first time window of the same date in previous years with normal business volume;
[0073] All excellent multi-platform account data of the second time window with time overlap are input into the dynamic feedback time prediction model.
[0074] In this embodiment, two time windows of different time levels are first set. The first time window moves in hours, and each first time window includes multiple hours of business data. The second time window moves in days, and each second time window includes multiple days of business data. At this time, if the business of one hour is abnormal, since the date of the hour is included in multiple second time windows, multiple second time windows are involved. For example, if the time length of the second time window is 7 days, the abnormal data of one hour involves 7 second time windows. At the same time, the appearance of abnormal data may be caused by errors at some time earlier. Based on this, the present application extracts all the second time windows involved by the above-mentioned window sliding method, and then inputs all the excellent multi-platform account data of the second time windows with time overlap into the dynamic feedback time prediction model, so that all the triggered data sources and the subsequent impact-related time periods are input into the model.
[0075] The following is a detailed description of the dynamic feedback time prediction model of the present application. It should be noted that the dynamic feedback time prediction model of the present application outputs a more accurate affected time interval. Specifically, the dynamic feedback time prediction model in the present application integrates an event impact knowledge graph, a similarity comparison plug-in, and a time calculation plug-in. The event impact knowledge graph includes multiple entities, each entity includes a business volume trend curve for each second time window involved in a type of emergency event, and the similarity comparison plug-in is used to compare the similarity of each entity with the multiple business volume trend curves input to the event impact knowledge graph model. The time calculation plug-in is used to retrieve all the involved second time windows in the determined entity, and determine the complete time period corresponding to all the involved second time windows as the feedback time. In this way, the present application uses the event impact knowledge graph to compare the actual business volume trend curve in the above-mentioned determined time period with each entity in the event impact knowledge graph for similarity, so that the most similar event type can be found only through data. At the same time, the time interval in the entity corresponding to the event type is not necessarily consistent with the actual time period determined above, thereby achieving the correction of the affected time period.
[0076] See also Figure 2 The principle diagram shown is as follows: Figure 2 As shown, the embodiment of the present application fixes the abnormal data by setting a first time window, and realizes the time period involved in the abnormal data by sliding the second time window. The corrected time period is then used as the feedback time, which triggers the response of the smart contract. As a result, the correction time is more accurate, which reduces the data processing volume of the blockchain network, and can be applied to simultaneous calculations of more chain stores.
[0077] It should be noted that, in general, business data will be abnormal in sudden situations and holidays. Since the brand effect of the store has a fluctuating effect in the market, there may be anomalies caused by the fluctuation of the brand effect, and the fluctuation of the brand effect will be significantly amplified during holidays, especially major holidays. Based on this feature, the present application preferably has the second time window that can be dynamically adjusted. Specifically, each holiday period is taken as a time period. Outside the time period, the time length of the second time window is set to be higher than a preset value, such as higher than 15 days or 30 days. Within the time period, the second time window can be set to the number of days of the holiday, such as 3 days or 5 days. In this way, since the impact of holidays is amplified, this feature can be used to reduce the number of second time windows, thereby reducing the amount of data processing.
[0078] Other preferred embodiments of the present application are described in detail below. The multi-platform account data includes transaction data, order information, inventory data, payment information, customer complaint records, platform information, customer information and environmental variables; the multi-platform account data is automatically collected in real time from the POS system, ERP system and third-party payment platform of the chain store by using an API interface or a data capture tool; transaction data includes all transaction records involving reconciliation, such as transaction time, transaction amount, transaction type, etc.; order information is the specific details of the order, such as order number, estimated payment amount of the order, type and quantity of goods, etc.; inventory data includes the current inventory level and historical changes; payment information is the actual payment amount provided by the payment platform; complaint data is collected from the customer service system to obtain complaints from complaining customers Records, customer complaint records include customer complaint information related to orders or transactions; customer information includes customers' historical transaction behavior and credit ratings; platform information includes processing efficiency and time zone differences of different platforms; environmental variables such as holidays, weekends and promotional activities affect feedback time; the excellent multi-platform account data is the data obtained after preprocessing of the multi-platform account data, so the overall data remains basically unchanged, and is only used as a reduction and optimization of data. The excellent multi-platform account data includes transaction data, order information, inventory data, payment information, customer complaint records, platform information, customer information and environmental variables; the distributed ledger includes transaction data, order information, inventory data, payment information and customer complaint records.
[0079] The preprocessing method includes operations such as data deduplication, formatting and missing value processing, which are all existing technologies.
[0080] The method for processing the excellent multi-platform account data on-chain includes:
[0081] Use symmetric encryption algorithms, such as AES, to encrypt the excellent multi-platform account data and generate symmetric encryption keys to ensure the security of the excellent multi-platform account data during transmission; use asymmetric encryption algorithms, such as RSA, to encrypt the symmetric encryption keys and generate encryption keys to protect the security of the keys; use hash algorithms such as SHA-256 to generate hash values of the excellent multi-platform account data to ensure the uniqueness and integrity of the excellent multi-platform account data; record the generated hash values in a distributed database for subsequent verification; format the excellent multi-platform account data into a structure suitable for blockchain storage, such as JSON format; encapsulate the excellent multi-platform account data, the hash values of the excellent multi-platform account data, and the secondary encrypted excellent multi-platform account data into a complete block.
[0082] It should be noted that: double encryption means that the encryption of excellent multi-platform account data is counted as one encryption, and the encryption of the encrypted key is counted as one encryption, which totals to double encryption; through the layers of protection of symmetric encryption and asymmetric encryption, it can effectively prevent the data from being stolen and tampered with during transmission, ensure the security of data, and avoid privacy risks; use the hash algorithm to calculate the hash value of the data and record it in the distributed ledger, which can effectively verify whether the data has been tampered with and ensure the integrity of the data; encapsulate the data into the blockchain standard data structure and storage format, and use the tamper-proof characteristics of the blockchain to store data for a long time and securely.
[0083] The estimated feedback time is used as a trigger condition for the smart contract to perform automatic reconciliation, wherein the automatic reconciliation of the smart contract refers to triggering the smart contract to verify and store the excellent multi-platform account data. The smart contract verification is to verify the hash value of the excellent multi-platform account data to ensure the integrity and consistency of the excellent multi-platform account data; the process of forming a distributed ledger after the smart contract is triggered is to package the verified excellent multi-platform account data through the blockchain consensus mechanism to generate a new block. The new block is distributedly stored through the blockchain network, and each node synchronizes the new block information to form a distributed ledger.
[0084] It is particularly noted that the estimated feedback time is real-time because it is obtained by a machine learning model. Combined with the characteristics of the distributed ledger and the real-time triggering mechanism of the smart contract, there is no need to re-initiate the entire on-chain application when the reconciliation fails. For example, when the reconciliation fails, according to the method of the present invention, the program should interrupt a small section of the entire on-chain application at this time. In this case, only this small section of the on-chain application needs to be reprocessed, or isolated, deleted, or re-verified, without starting the entire on-chain application from scratch, thereby reducing the complexity and time cost of the operation.
[0085] The anomaly detection and automatic error correction model is a single-class support vector machine model, including an input layer, a feature extraction layer, a feature selection layer, an encoding layer, an SVM classifier layer and an output layer; the number of input layer nodes in the input layer is 5, and the input layer nodes include transaction data input nodes, order data input nodes, payment data input nodes, inventory data input nodes and customer complaint record input nodes.
[0086] The number of feature extraction layer nodes of the feature extraction layer is 5, and the feature extraction layer nodes include transaction comparison node, order comparison node, inventory comparison node, payment comparison node and complaint analysis node.
[0087] The node calculation methods include:
[0088] Transaction comparison node: compares the same transaction amounts from different data sources, and calculates the transaction amount difference rate = |transaction amount A - transaction amount B| / (transaction amount A + transaction amount B) / 2. This feature can reflect the consistency of transaction amounts in different systems.
[0089] Order comparison node: Check the quantity of goods in the order information and the actual number of goods paid, calculate the matching degree = the actual number of goods paid / the number of goods in the order information, and evaluate whether the order information is consistent with the payment.
[0090] Inventory comparison node: Check whether the quantity of goods in the order information is actually supported by inventory by comparing with the current inventory level. The calculated out-of-stock rate = number of out-of-stock goods / total number of goods in the order reflects whether the order is placed from inventory as required.
[0091] Payment comparison node: compares the estimated payment amount of an order with the actual payment amount, and calculates the transaction amount difference rate = |estimated payment amount of the order - actual payment amount| / estimated payment amount of the order to determine whether the advance payment is consistent with the actual payment.
[0092] Complaint analysis node: Count customer complaint records with the same reason together, and calculate the ratio of customer complaint records with different reasons to the total number of customer complaint records. This can reflect common problems that may exist in transactions.
[0093] It should be noted that the output of the feature extraction layer is the data source of the anomaly detection results.
[0094] The number of feature selection layer nodes in the feature selection layer is 2, and the feature selection layer nodes include association analysis nodes and filtering nodes; association analysis nodes: use association rule mining algorithm to find frequent item sets and obtain association rules between various features. For example, the transaction amount difference rate has a high correlation with the number of customer complaint records, evaluate the support and trust of the association rules, rank the support × trust values of the association rules in reverse order, and select the top three rules; filtering nodes: filter out the best feature combination based on feature importance evaluation, and the feature importance evaluation uses the random forest algorithm.
[0095] The number of coding layer nodes in the coding layer is 2, and the coding layer nodes include One-Hot coding nodes and standardization nodes; One-Hot coding nodes: encode classification features, such as transaction type and order number; standardization nodes: standardize continuous value features such as transaction amount difference rate.
[0096] The number of nodes of the SVM classifier layer is 3, and the number of nodes of the SVM classifier layer includes RBF kernel operation nodes, maximum interval estimation nodes and classification prediction nodes.
[0097] RBF kernel operation node: maps the output values of the input layer, feature extraction layer, feature selection layer and encoding layer to high-dimensional space through the RBF kernel function. The RBF kernel function K( , ) form: K( , )=exp(-γ|| - || 2 ), where γ is the kernel parameter, which controls the degree of weakening of the kernel function. is the output value of the input layer, feature extraction layer, feature selection layer and encoding layer, for The category label of .
[0098] Maximum margin estimation node: learn the classification separation hyperplane, the calculation formula of the separation hyperplane is ×φ( )+ =0, where φ( ) Representatives will The new form after mapping to the high-dimensional feature space through the RBF kernel function, is the normal vector of the learned separation hyperplane in the high-dimensional feature space, The offset of the separating hyperplane is the location of the hyperplane in the feature space.
[0099] Classification prediction node: The output values of the input layer, feature extraction layer, feature selection layer, and encoding layer predict the classification results. The prediction method is to calculate The mapping φ( ), where φ( ) does not need to be explicitly calculated in the actual algorithm. , ) and insert the classification function sgn( ×φ( )+ ) is used for prediction. If it is greater than 0, it is predicted as a positive class, and if it is less than 0, it is predicted as a negative class. The number of output layer nodes in the output layer is 2, and the output value of the output layer node is the anomaly detection result and the corrected multi-platform account data.
[0100] It is particularly noted that the anomaly detection and automatic error correction model uses multi-source data input, and can combine multi-dimensional data such as transactions, orders, payments, and inventory to fully explore abnormal rules. The feature extraction layer compares and analyzes the input data from multiple angles by designing multiple nodes, and extracts feature representations at different levels; the feature selection layer selects high-quality features for model training through association analysis and feature importance evaluation to reduce the probability of problems. The classifier uses SVM to build a model with the maximum interval as the purpose. The dividing line between abnormal and normal data is clearer, the overall model structure is clear, and the functions of each layer are distinct. Compared with a single algorithm, it is more suitable for complex financial data mining. After detecting anomalies, it can automatically correct data errors through back propagation to improve data quality. At the same time, the single-class support vector machine model has the characteristic of only a small number of positive samples to establish a model, so it is quite suitable for anomaly detection and automatic error correction of sensitive financial data, and because the amount of training does not need to be particularly large, security and confidentiality will also be further enhanced.
[0101] The training method of the anomaly detection and automatic error correction model includes:
[0102] The anomaly detection and automatic error correction model uses the structural risk minimization method for model training. The training goal is to find the maximum margin hyperplane:
[0103] Optimize a problem with inequality constraints:
[0104] ;
[0105] ;
[0106] In the formula, is a slack variable, allowing part Outside the border, Indicates restriction, represents the penalty for training errors; Indicates the number, ≥1.
[0107] The conversion objective is in Lagrangian dual form, which becomes a convex quadratic programming problem:
[0108] ;
[0109] ;
[0110] In the formula, represents the dual function, express The corresponding Lagrange multiplier is, Indicates the number, and ≠ ≥1.
[0111] In the continuous training of the model, if and If convergence occurs, the model training is completed and the training stops immediately.
[0112] The reconciliation report includes anomaly detection results, revised multi-platform account data and backed-up multi-platform transaction data.
[0113] Example 2
[0114] like Figure 3 As shown, this embodiment further improves the design on the basis of embodiment 1. The difference is that, in the bill matching method for cross-platform intelligent reconciliation of chain stores provided in embodiment 1, although anomaly detection is performed at the end in actual operation, the anomaly detection here is for the distributed ledger, and the data source itself is trustworthy, and no data quality supervision is performed. If the data source itself has an error or the original data is destroyed after preprocessing, then the subsequent anomaly detection is completely meaningless, and the multi-platform account data for cross-platform data transmission is completely likely to have complete data disorder, and although the preprocessing means alleviates the problem of system performance bottleneck, it still has not broken through a certain level, and the redundancy is still insufficient. It is necessary to increase the filtering means that can adapt to a large amount of data. Based on this, the bill matching method for cross-platform intelligent reconciliation of chain stores provided by the present invention also includes:
[0115] Perform data monitoring on high-quality multi-platform account data, input the monitored multi-platform account data into the abnormal data cleaning model, and output high-quality multi-platform account data.
[0116] The monitoring tool for data monitoring is Great Expectations, which is a very successful open source data quality inspection tool in the current data monitoring field.
[0117] The method for constructing the abnormal data cleaning model includes:
[0118] The multi-platform account data is used as analysis data, high-quality multi-platform account data corresponding to G groups of analysis data are collected in advance, and the analysis data and the corresponding high-quality multi-platform account data are converted into a corresponding set of first feature vectors.
[0119] Each group of first feature vectors is used as the input of the abnormal data cleaning model. The abnormal data cleaning model uses a group of high-quality multi-platform account data corresponding to each group of analysis data as output, and uses the actual high-quality multi-platform account data corresponding to each group of analysis data as the prediction target. The actual high-quality multi-platform account data is the pre-collected high-quality multi-platform account data corresponding to the analysis data; the training goal is to minimize the sum of the prediction errors of all analysis data; wherein the calculation formula of the prediction error is: ,in is the prediction error, K is the group number of the first eigenvector corresponding to the analyzed data, The high-quality multi-platform account data corresponding to the Kth group of analysis data, The actual high-quality multi-platform account data corresponding to the Kth group of analysis data; the abnormal data cleaning model is trained until the sum of the prediction errors reaches convergence and the training is stopped.
[0120] The abnormal data cleaning model is the lonely forest model.
[0121] Example 3
[0122] like Figure 4 As shown in the figure, the bill matching system for chain stores with cross-platform intelligent reconciliation includes:
[0123] Collection module: used to collect multi-platform account data and perform data preprocessing to obtain high-quality multi-platform account data;
[0124] Monitoring and cleaning module: monitors the high-quality multi-platform account data, inputs the monitored multi-platform account data into the abnormal data cleaning model, and outputs high-quality multi-platform account data;
[0125] Data on-chain module: used to back up and process high-quality multi-platform account data on the chain, and store the backed-up high-quality multi-platform transaction data in a distributed database;
[0126] Time prediction module: used to input high-quality multi-platform account data into the pre-built dynamic feedback time prediction model, output the estimated feedback time, and use the estimated feedback time as the trigger condition for the smart contract to automatically reconcile accounts. When the smart contract is triggered, a distributed ledger is formed;
[0127] Detection and Error Correction Module: used to input the distributed ledger into the pre-built anomaly detection and automatic error correction model, and output the anomaly detection results and corrected multi-platform account data;
[0128] Report generation module: used to receive anomaly detection results, corrected multi-platform account data and backed up high-quality multi-platform transaction data, and generate reconciliation reports based on the anomaly detection results, corrected multi-platform account data and backed up high-quality multi-platform transaction data.
[0129] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0130] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A bill matching method for cross-platform intelligent reconciliation of chain stores, characterized in that: Methods include: Collect multi-platform account data and perform data preprocessing to obtain high-quality multi-platform account data; Back up and upload excellent multi-platform account data to the blockchain, and store the backup of excellent multi-platform account data in a distributed database; Input high-quality multi-platform account data into the pre-built dynamic feedback time prediction model, output the estimated feedback time, and use the estimated feedback time as the trigger condition for the smart contract to automatically reconcile accounts. When the smart contract is triggered, a distributed ledger is formed; Input the distributed ledger into the pre-built anomaly detection and automatic error correction model, and output the anomaly detection results and corrected multi-platform account data; Generate reconciliation reports based on anomaly detection results, corrected multi-platform account data and backed-up high-quality multi-platform account data.
2. The bill matching method for cross-platform intelligent reconciliation of chain stores according to claim 1 is characterized in that: The inputting of excellent multi-platform account data into a pre-built dynamic feedback time prediction model includes: Taking a preset number of hours as the time window length, sliding on the historical data of the chain stores in units of hours to obtain the first time window of each sliding; Taking a preset number of days as the time window length, sliding on the historical data of the chain stores in units of days to obtain a second time window for each sliding; When it is detected that the difference between the business volume of the first time window and the business volume of the reference time window of the corresponding number of days before is higher than a first set threshold, all second time windows having time overlap with the first time window are extracted; the reference time window is the first time window of the same date in previous years with normal business volume; All excellent multi-platform account data of the second time window with time overlap are input into the dynamic feedback time prediction model.
3. The bill matching method for cross-platform intelligent reconciliation of chain stores according to claim 2 is characterized in that: The dynamic feedback time prediction model integrates an event impact knowledge graph, a similarity comparison plug-in and a time calculation plug-in. The event impact knowledge graph includes multiple entities, each entity includes a business volume trend curve for each second time window involved in a type of emergency event, the similarity comparison plug-in is used to compare the similarity of each entity with multiple business volume trend curves input into the event impact knowledge graph model, and the time calculation plug-in is used to retrieve all the second time windows involved in the determined entity, and determine the complete time period corresponding to all the second time windows involved as the feedback time.
4. The bill matching method for cross-platform intelligent reconciliation of chain stores according to claim 1 is characterized in that: The multi-platform account data includes transaction data, order information, inventory data, payment information, customer complaint records, platform information, customer information and environmental variables; the method for processing the excellent multi-platform account data on the chain includes using a symmetric encryption algorithm to encrypt the excellent multi-platform account data and generate a symmetric encryption key; Encrypt the symmetric encryption key using an asymmetric encryption algorithm to generate an encryption key; use a hash algorithm to generate a hash value of the excellent multi-platform account data; and record the generated hash value in a distributed database; Format the excellent multi-platform account data into a structure suitable for blockchain storage; encapsulate the excellent multi-platform account data, the hash value of the excellent multi-platform account data and the twice-encrypted excellent multi-platform account data into a complete block.
5. The bill matching method for cross-platform intelligent reconciliation of chain stores according to claim 4 is characterized in that: The estimated feedback time is used as a trigger condition for the smart contract to perform automatic reconciliation, wherein the smart contract performs automatic reconciliation to trigger the smart contract to verify and store the excellent multi-platform account data, and the smart contract verification is to verify the hash value of the excellent multi-platform account data; when the smart contract is triggered, the process of forming a distributed ledger is to package the verified excellent multi-platform account data to generate a new block through the blockchain consensus mechanism, and the new block is distributedly stored through the blockchain network, and each node synchronizes the new block information to form a distributed ledger.
6. The bill matching method for cross-platform intelligent reconciliation of chain stores according to claim 5 is characterized in that: The anomaly detection and automatic error correction model is a single-class support vector machine model, including an input layer, a feature extraction layer, a feature selection layer, a coding layer, an SVM classifier layer and an output layer; the input layer nodes include transaction data input nodes, order data input nodes, payment data input nodes, inventory data input nodes and customer complaint record input nodes; the feature selection layer nodes include association analysis nodes and filtering nodes; the coding layer nodes include One-Hot coding nodes and standardization nodes; the SVM classifier layer nodes include RBF kernel operation nodes, maximum interval estimation nodes and classification prediction nodes; RBF kernel operation node: maps the output values of the input layer, feature extraction layer, feature selection layer and encoding layer to high-dimensional space through the RBF kernel function. The RBF kernel function K( , ) form: K( , )=exp(-γ|| - || 2 ), where γ is the kernel parameter, is the output value of the input layer, feature extraction layer, feature selection layer and encoding layer, for The category label of Maximum margin estimation node: learn the classification separation hyperplane, the calculation formula of the separation hyperplane is ×φ( )+ =0, where φ( ) Representatives will The new form after mapping to the high-dimensional feature space through the RBF kernel function, is the normal vector of the learned separation hyperplane in the high-dimensional feature space, is the offset of the separation hyperplane, that is, the location of the hyperplane in the feature space; Classification prediction node: predicts the classification result based on the output values of the input layer, feature extraction layer, feature selection layer, and encoding layer. The prediction method is to calculate The mapping φ( ), insert the classification function sgn( ×φ( )+ ) is used for prediction. If it is greater than 0, it is predicted as a positive class, and if it is less than 0, it is predicted as a negative class; The output values of the output layer nodes are the anomaly detection results and the corrected multi-platform account data.
7. The bill matching method for cross-platform intelligent reconciliation of chain stores according to claim 6 is characterized in that: The training method of the anomaly detection and automatic error correction model includes: The anomaly detection and automatic error correction model uses the structural risk minimization method for model training.
8. The bill matching method for cross-platform intelligent reconciliation of chain stores according to claim 1 is characterized in that: Also includes: Perform data monitoring on high-quality multi-platform account data, input the monitored multi-platform account data into the abnormal data cleaning model, and output high-quality multi-platform account data.
9. The bill matching method for cross-platform intelligent reconciliation of chain stores according to claim 8 is characterized in that: The method for constructing the abnormal data cleaning model includes: The multi-platform account data is used as analysis data, high-quality multi-platform account data corresponding to the G group of analysis data is collected in advance, and the analysis data and the corresponding high-quality multi-platform account data are converted into a corresponding set of second feature vectors; Each group of second eigenvectors is used as input of an abnormal data cleaning model, the abnormal data cleaning model uses a group of high-quality multi-platform account data corresponding to each group of analysis data as output, and uses actual high-quality multi-platform account data corresponding to each group of analysis data as a prediction target, where the actual high-quality multi-platform account data is pre-collected high-quality multi-platform account data corresponding to the analysis data; and minimizing the sum of prediction errors of all analysis data is used as a training target; The abnormal data cleaning model is trained until the sum of the prediction errors reaches convergence and the training is stopped; the abnormal data cleaning model is a lonely forest model.
10. The bill matching system for chain stores with cross-platform intelligent reconciliation is characterized by: The bill matching method for implementing cross-platform intelligent reconciliation of chain stores according to any one of claims 1 to 9 comprises: Collection module: used to collect multi-platform account data and perform data preprocessing to obtain high-quality multi-platform account data; Monitoring and cleaning module: monitors the high-quality multi-platform account data, inputs the monitored multi-platform account data into the abnormal data cleaning model, and outputs high-quality multi-platform account data; Data on-chain module: used to back up and process high-quality multi-platform account data on the chain, and store the backed-up high-quality multi-platform transaction data in a distributed database; Time prediction module: used to input high-quality multi-platform account data into the pre-built dynamic feedback time prediction model, output the estimated feedback time, and use the estimated feedback time as the trigger condition for the smart contract to automatically reconcile accounts. When the smart contract is triggered, a distributed ledger is formed; Detection and Error Correction Module: used to input the distributed ledger into the pre-built anomaly detection and automatic error correction model, and output the anomaly detection results and corrected multi-platform account data; Report generation module: used to generate reconciliation reports based on anomaly detection results, corrected multi-platform account data and backed up high-quality multi-platform account data.
Citation Information
Patent Citations
Account checking data chaining method based on block chain intelligent contract
CN112069262A
Real-time account checking method and device based on block chain and electronic device
CN109670924A
Reconciliation data processing method and device, computer equipment and storage medium
CN114612209A
Financial management system based on block chain
CN119151699A
Automatic flow account checking method and electronic equipment
CN119338607A
Cited By
Reconciliation and liquidation method and system based on intelligence
CN120374284A
Intelligent-based reconciliation method and system
CN120374284B
Transaction data real-time verification method and system based on multiple payment channels
CN120725685A