A financial management system based on blockchain
By introducing multiple consensus mechanisms, time series analysis, abnormality detection algorithm and 3 times standard deviation method into the financial management system, the problems of insufficient credibility, poor flexibility and insufficient intelligence capabilities of traditional systems in the data processing and reconciliation process are solved, and more efficient, more accurate and safer financial management is achieved.
Patent Information
- Application Number
- CN202411262913.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-09-10
AI Technical Summary
The traditional blockchain-based financial management system has insufficient credibility in the data processing and reconciliation process, lacks flexibility, cannot adapt to changes in different business models and transaction models, and lacks intelligence and adaptability in abnormal transaction identification and difference threshold setting.
A financial management system based on blockchain is designed, including data collection module, data processing module, intelligent reconciliation module and intelligent adjustment module. The system improves the credibility of data through multiple application consensus mechanisms, uses time series analysis to determine the most suitable reconciliation cycle, uses anomaly detection algorithm to identify and verify the reconciliation report results, and sets the difference threshold through the 3-fold standard deviation method to achieve intelligent diversion of automatic adjustment and manual review.
It significantly improves the credibility and security of financial data, improves the efficiency and accuracy of financial management, enhances the degree of automation and overall coordination of the system, and ensures the security, transparency and consistency of financial data.
Smart Images

Figure CN119151699B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial management, and in particular to a financial management system based on blockchain. Background Art
[0002] Traditional blockchain-based financial management systems have many technical problems and limitations.
[0003] First, they often only apply the consensus mechanism in a single link, which cannot fully guarantee the credibility of the data processing and reconciliation process, and is prone to data tampering and errors.
[0004] Secondly, these systems usually use fixed reconciliation cycles, lack flexibility, and cannot adapt to changes in different business models and transaction models, resulting in low efficiency or insufficient accuracy. Furthermore, traditional systems lack intelligence and adaptive capabilities in abnormal transaction identification and difference threshold setting, and often require manual intervention, reducing the efficiency and accuracy of financial management.
[0005] In addition, although these systems utilize blockchain technology, they fail to fully leverage the advantages of its distributed ledgers. They are inefficient in data storage, query, and auditing, and it is difficult to achieve fully traceable and highly transparent financial management.
[0006] The above problems seriously restrict the application effect and value of traditional blockchain-based financial management systems. Summary of the invention
[0007] The purpose of the present invention is to provide a financial management system based on blockchain to solve the problems raised in the above background technology.
[0008] To achieve the above purpose, the present invention provides the following technical solution: a financial management system based on blockchain, including a data collection module, a data processing module, an intelligent reconciliation module and an intelligent adjustment module, wherein:
[0009] The data collection module obtains transaction data of each financial subsystem;
[0010] The data processing module performs data standardization and data verification on the transaction data, and packages the verified transaction data into blocks in time series order, and verifies the blocks by calculating hash values and using a block consensus mechanism, and uses the successfully verified blocks as a blockchain;
[0011] The intelligent reconciliation module uses time series analysis to derive a reconciliation cycle based on the transaction data in the blockchain; extracts the corresponding transaction data in the blockchain based on the reconciliation cycle, uses an anomaly detection algorithm to identify the reconciliation report results for the transaction data, and uses the reconciliation consensus mechanism to verify the reconciliation report results, and writes the verified reconciliation report results into the blockchain;
[0012] The intelligent adjustment module determines whether to automatically adjust the transaction data according to the reconciliation report result in the blockchain, specifically including: extracting the corresponding transaction data in the blockchain according to the reconciliation cycle, and using the 3 times standard deviation method to set the difference threshold according to the transaction data; comparing the reconciliation report result with the difference threshold, if the reconciliation report result is within the difference threshold range, automatically adjusting, and writing the adjusted result to the blockchain; otherwise, marking the transaction data corresponding to the reconciliation report result as manual assessment data, and writing it to the blockchain.
[0013] As a further improvement of the present technical solution, the transaction data in the data collection module includes but is not limited to transaction ID, transaction date and time, transaction amount, transaction type, source account, target account information, transaction status and data source system identifier.
[0014] As a further improvement of the technical solution, the data processing module packages the verified transaction data into blocks in time series order, verifies the blocks, calculates hash values and uses block consensus mechanism for verification, and uses the successfully verified blocks as a blockchain, specifically including:
[0015] Arrange the transaction data that have passed data verification in ascending order of transaction date and time; set a fixed time interval as the block size; group and package the sorted transaction data into blocks according to the set block size; assign a unique block ID to each block; record the start and end timestamps of the block;
[0016] Calculate the hash value of each block. The hash value is calculated by concatenating all transaction data in the block into a string and adding the hash value of the previous block to it, using the SHA-256 hash algorithm. SHA-256 is a cryptographic hash function used to generate block hash values;
[0017] After the creation is completed and the hash value calculation is completed, the node responsible for generating the new block serves as the master node. The master node broadcasts the complete content of the new block, the block hash value, and the hash value of the previous block to all verification nodes. The broadcast information includes but is not limited to the block header and transaction list;
[0018] After receiving the broadcast information from the master node, the verification node performs block structure verification to check the integrity and structural validity of the block, including the correctness of the block header, transaction list and timestamp; performs transaction legitimacy verification to verify the legitimacy of each transaction in the block one by one, including the uniqueness of the transaction ID, the validity of the date and time, the rationality of the amount, the legitimacy of the transaction type, the validity of the account information, the legitimacy of the transaction status and the authenticity of the data source; performs Merkle root verification to recalculate the Merkle root of the transaction in the block and compare it with the Merkle root value in the block header. The Merkle root is a tree-like data structure used to quickly and efficiently verify the integrity of the transaction data in the block; performs block hash verification. The verification node recalculates the block hash value using the same method and compares it with the block hash value sent by the master node; performs link verification to confirm whether the previous hash value of the current block matches the hash value of the latest block in the local blockchain;
[0019] After completing the above verification steps, the verification node will feedback the verification results to the master node. The feedback information includes the node ID and verification results. The master node collects the feedback results of all verification nodes and counts the number of nodes that have passed the verification. If more than 2 / 3 of the total number of nodes pass the verification, it is considered that a consensus has been reached. If a consensus is not reached, that is, less than 2 / 3 of the verification nodes pass the verification, the master node abandons the current block and restarts the block creation process, collecting transaction data, packaging, calculating hashes, and rebroadcasting.
[0020] The successfully verified blocks are linked in the order of the block timestamps. Each new block contains the hash value of the previous block to form a chain structure, which is called a blockchain. The blockchain includes but is not limited to transaction data and timestamps.
[0021] As a further improvement of the technical solution, the intelligent reconciliation module includes a reconciliation cycle analysis unit, which uses a time series analysis method to obtain a reconciliation cycle based on the transaction data in the blockchain. The time series analysis method specifically includes:
[0022] Extract all transaction data from the last 6 months from the blockchain and sort the transaction data by transaction date and time; count the transactions of each day to get the daily transaction volume; add up the transaction volume every 7 days to get the weekly transaction volume; add up the transaction volume by natural month to get the monthly transaction volume;
[0023] Calculate the coefficient of variation of daily, weekly and monthly trading volumes respectively. The coefficient of variation is the standard deviation of the corresponding trading volume divided by the average value of the corresponding trading volume. Select the time unit with the smallest coefficient of variation as the reconciliation period, where: if the coefficient of variation of daily trading volume is the smallest, select daily reconciliation; if the coefficient of variation of weekly trading volume is the smallest, select weekly reconciliation; if the coefficient of variation of monthly trading volume is the smallest, select monthly reconciliation.
[0024] As a further improvement of the technical solution, the intelligent reconciliation module includes a reconciliation report analysis unit, which extracts the corresponding transaction data in the blockchain according to the reconciliation cycle, uses an anomaly detection algorithm to perform anomaly detection on the transaction data, and generates a reconciliation report result, which specifically includes:
[0025] According to the determined reconciliation cycle, set the start and end time of this reconciliation; start from the latest block of the blockchain and traverse forward until a block with a time smaller than the start time is found; extract transaction data from all blocks within the time range;
[0026] Perform anomaly detection on the extracted transaction data to check whether there are multiple records with the same transaction ID; calculate the average and standard deviation of the transaction amount, and mark transactions that exceed the average by plus or minus 3 standard deviations as abnormal; calculate the transaction frequency per hour, and mark the period that exceeds 2 times the average frequency as abnormal; count the daily transaction patterns of each account, and mark transactions that are significantly different from the historical patterns; calculate the normal ratio of each transaction type, and mark the transaction types with abnormal ratios; generate an anomaly report, including detailed information on all transactions marked as abnormal;
[0027] Summarize normal transaction data, calculate the total number of transactions and total amount; summarize abnormal transaction data, calculate the number of abnormal transactions and total amount; generate reconciliation report results, including but not limited to reconciliation cycle, total number of transactions and total amount, normal transaction number and total amount, abnormal transaction number and total amount and detailed list of abnormal transactions.
[0028] As a further improvement of the technical solution, the reconciliation report analysis unit verifies the reconciliation report result using the reconciliation consensus mechanism, and writes the successfully verified reconciliation report result into the blockchain, specifically including:
[0029] The node responsible for generating the reconciliation report in the blockchain is used as the reconciliation node, and the reconciliation report result corresponding to the reconciliation node is broadcast to all audit nodes;
[0030] After receiving the broadcast information, the audit node extracts data and uses the same reconciliation cycle to independently extract transaction data from the blockchain. It performs the same anomaly detection and locally generated reconciliation report on the extracted transaction data. It uses the SHA-256 algorithm to calculate the hash value of the locally generated reconciliation report and compares the calculated local report hash value with the report hash value broadcast by the reconciliation node.
[0031] The audit node sends the comparison results back to the reconciliation node, and the feedback information includes the audit node ID and verification results. The reconciliation node collects the feedback results of all audit nodes and counts the number of audit nodes with matching results. If more than 2 / 3 of the total number of nodes match, consensus is considered to be reached.
[0032] If consensus is reached, the reconciliation node will write the verified reconciliation report results into the blockchain, including creating a reconciliation report block as the latest reconciliation report results.
[0033] As a further improvement of the technical solution, the intelligent adjustment module extracts the corresponding transaction data in the blockchain according to the reconciliation cycle, and uses the 3 times standard deviation method to set the difference threshold according to the transaction data, specifically including:
[0034] According to the reconciliation cycle, extract all reconciliation report results of the corresponding transaction data in the blockchain, perform statistical analysis on the normal transaction data in each reconciliation report, and calculate the average and standard deviation of the total transaction amount, the average and standard deviation of the single transaction amount, and the average and standard deviation of the number of transactions;
[0035] Use the 3 times standard deviation method in the statistical method to set the difference threshold, specifically: total amount difference threshold = 3*total transaction amount standard deviation ± total transaction amount average; single transaction amount difference threshold = 3*single transaction amount standard deviation ± single transaction amount average; transaction number difference threshold = 3*transaction number standard deviation ± transaction number average.
[0036] As a further improvement of the technical solution, the intelligent adjustment module compares the latest reconciliation report result with the difference threshold. If the latest reconciliation report result is within the difference threshold, it automatically adjusts and writes the adjusted result to the blockchain, specifically including:
[0037] Read the latest reconciliation report result from the blockchain, compare the transaction data in the reconciliation report with the set difference threshold, and compare whether the total amount of abnormal transactions is within the total amount difference threshold; compare whether the single amount of abnormal transactions is within the single amount difference threshold; and compare whether the number of abnormal transactions is within the transaction number difference threshold.
[0038] If all comparison results are within the difference threshold range, automatic adjustments are made. For transactions with abnormal amounts, they are adjusted to the nearest threshold boundary value. For transactions with abnormal frequencies, transaction records are retained and marked as automatic adjustment-frequency normalization. For transactions with abnormal patterns, if the amount is within the threshold, transaction records are retained but the abnormal mark is removed.
[0039] Create a new adjustment report, which includes but is not limited to a reference to the reconciliation report, a list of abnormal transactions before adjustment, a list of transactions after adjustment, and the difference threshold used, package the adjustment report into a block, add it to the blockchain, update the status of the relevant transactions, and mark them as automatically adjusted;
[0040] If any comparison result exceeds the difference threshold range, no automatic adjustment will be made and a manual assessment report will be created. The manual assessment report includes but is not limited to a reference to the reconciliation report, a list of abnormal transactions exceeding the threshold, and the difference threshold used; the manual assessment report is packaged into a special block, added to the blockchain, the status of the relevant transaction is updated, and marked as pending manual review.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] 1. This blockchain-based financial management system significantly improves the credibility and security of financial data through multiple application consensus mechanisms. In the data processing stage, the system uses the calculation of hash values and the block consensus mechanism to verify the newly generated blocks, ensuring that only blocks verified by the majority of nodes can be added to the blockchain. This method effectively prevents data tampering and single point failures. In the reconciliation stage, the system applies the reconciliation consensus mechanism again, requiring multiple audit nodes to independently verify the reconciliation report results, and only the results that reach a consensus will be written into the blockchain. This dual consensus mechanism not only ensures the integrity of the original transaction data, but also ensures the accuracy and fairness of the reconciliation process, greatly reducing the risk of financial errors and fraud.
[0043] 2. This blockchain-based financial management system greatly improves the efficiency and accuracy of financial management through multiple applications of reconciliation cycles. The system first uses time series analysis methods to intelligently determine the most suitable reconciliation cycle by calculating the coefficient of variation of daily, weekly and monthly transaction volumes. This method avoids the problems of inefficiency or insufficient precision that may be caused by fixed-cycle reconciliation. Then, the system extracts the corresponding transaction data from the blockchain according to the determined reconciliation cycle, and uses anomaly detection algorithms for analysis to effectively identify abnormal transactions. Finally, the system uses the reconciliation cycle again, combined with the 3-times standard deviation method to set the difference threshold, which provides a scientific standard for automatic adjustment and manual review, so that the threshold can automatically adapt to the current business model and changes in the reconciliation cycle, ensuring that the difference detection is more accurate and relevant, and effectively improving the overall coordination and accuracy of the system.
[0044] 3. The blockchain created by this blockchain-based financial management system plays a core role in the entire system and brings significant beneficial effects; first, the transaction data is packaged into blocks according to the time series through the data processing module, and the hash value calculation and consensus mechanism are used for verification, ensuring the immutability and traceability of the data; secondly, the intelligent reconciliation module uses time series analysis to determine the optimal reconciliation cycle, and uses anomaly detection algorithms for automatic reconciliation, which improves the efficiency and accuracy of reconciliation. Furthermore, the intelligent adjustment module uses the 3-times standard deviation method to set the difference threshold, realizing the intelligent diversion of automatic adjustment and manual review, greatly improving the automation of financial management; finally, the entire system ensures the security, transparency and consistency of financial data through the distributed storage and consensus mechanism of the blockchain, effectively preventing single point failures and malicious tampering, and providing reliable technical support for financial management. This blockchain-based method not only improves the efficiency and accuracy of financial management, but also enhances the security and credibility of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of the overall module of the present invention;
[0046] Figure 2 Schematic diagram of the intelligent reconciliation module unit of the present invention.
[0047] In the figure: 100, data collection module; 200, data processing module; 300, intelligent reconciliation module; 301, reconciliation cycle analysis unit; 302, reconciliation report analysis unit; 400, intelligent adjustment module. DETAILED DESCRIPTION
[0048] The following will be combined with the accompanying drawings in 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.
[0049] Unless otherwise specified, the terms (including technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0050] The following are some definitions of terms:
[0051] Block consensus mechanism: refers to the process and method by which each node in the system reaches a consensus on the newly generated block, including the verification of the block structure, transaction legitimacy, Merkle root, block hash and link by the verification node, and the rule that more than 2 / 3 of the nodes must pass the verification; this mechanism ensures the consistency and credibility of blockchain data;
[0052] Reconciliation cycle: The time interval for the system to conduct financial reconciliation. By analyzing the coefficient of variation (day, week, month) of transaction data in the last six months, the time unit with the smallest coefficient of variation (day, week or month) is selected as the reconciliation cycle. This method can dynamically adjust the reconciliation frequency according to the actual transaction pattern, thereby improving reconciliation efficiency and accuracy.
[0053] Reconciliation report results: The system generates a report after each reconciliation cycle, which includes the start and end time of the reconciliation cycle, the total number and amount of transactions, the number and amount of normal transactions, the number and amount of abnormal transactions, and a detailed list of abnormal transactions. After consensus verification, this report will be written into the blockchain as an important basis for financial management.
[0054] Reconciliation consensus mechanism: This system verifies the accuracy and consistency of reconciliation report results, including the reconciliation node generating and broadcasting the reconciliation report, the audit node independently generating a local report and comparing it with the broadcast report, and reaching a consensus when the results of more than 2 / 3 of the audit nodes match; this mechanism ensures the fairness of the reconciliation process and the credibility of the results;
[0055] Difference threshold: a standard used to determine whether a transaction requires automatic adjustment or manual review. It is calculated based on the 3-standard deviation method and includes the total amount difference threshold, the single transaction amount difference threshold, and the transaction number difference threshold. These thresholds help the system automatically identify and process abnormal transactions, thereby improving the automation and accuracy of financial management.
[0056] Next, see Figure 1-Figure 2 The present invention provides a technical solution: a financial management system based on blockchain, including a data collection module 100, a data processing module 200, an intelligent reconciliation module 300 and an intelligent adjustment module 400.
[0057] The data collection module 100 obtains transaction data from each financial subsystem and extracts transaction data from the financial subsystem using API, database connection or file interface, where the transaction data includes but is not limited to transaction ID (unique identifier), transaction date and time, transaction amount, transaction type (such as sales, purchase, transfer, etc.), source account and target account information, transaction status (such as completed, pending, etc.) and data source system identifier (indicating which financial subsystem the data comes from).
[0058] The data processing module 200 performs data standardization and data verification on the transaction data, and packages the verified transaction data into blocks in time series order, and verifies the blocks, verifies the blocks by calculating the hash value and using the consensus mechanism, and uses the successfully verified blocks as a blockchain, which specifically includes:
[0059] Data standardization: Unify the transaction date and time formats, such as converting all dates and times into a standard format such as 2024-08-15T07:53:55, which means 7:53:55 on August 15, 2024, where T is the separator between date and time; if the month, date, hour, minute, and second are single digits, they need to be padded with 0 in front to maintain the two-digit format; standardize transaction types by establishing a list of standard transaction types, such as sales, purchases, transfers, refunds, deposits, withdrawals, etc.; translate English transaction types into Chinese, such as converting "sale", "purchase", and "transfer" into "sales", "purchase", and "transfer" respectively; unify synonyms, such as unifying "sold" and "sold" into "sales"; unify the currency unit and decimal places of the amount; standardize the account information format to ensure the consistency of the source account and target account information; unify the transaction status description, such as unifying "completed" and "ended" into "completed";
[0060] Data verification: Check the uniqueness of the transaction ID to ensure that there are no duplicate records; verify the validity and rationality of the transaction date and time; ensure that the transaction amount is a valid value and not negative; verify whether the transaction type is in the predefined type list; check the validity of the source account and the target account; confirm that the transaction status is within the status range allowed by the system; verify whether the data source system identifier matches the known financial subsystem;
[0061] Block creation: Arrange the transaction data that has passed data verification in ascending order of transaction date and time; set a fixed time interval (such as 1 hour) or transaction quantity threshold (such as 1,000 transactions) as the block size; group and package the sorted transaction data into blocks according to the set block size; assign a unique block ID to each block; record the start and end timestamps of the block;
[0062] Block hash value calculation: The hash value of each block is calculated by concatenating all transaction data in the block into a string, adding the hash value of the previous block (except the first block) to it, and then using the SHA-256 hash algorithm. SHA-256 is a common cryptographic hash function used to generate a unique identifier (block hash value) for the block;
[0063] Block broadcast: After the creation is completed and the hash value calculation is completed, the master node (the node responsible for generating a new block) broadcasts the complete content of the new block, the block hash value, and the hash value of the previous block to all verification nodes. The broadcast information includes but is not limited to the block header (containing timestamp, pre-hash, Merkle root, etc.) and transaction list;
[0064] Block consensus mechanism verification: After receiving the broadcast information from the master node, the verification node (other nodes participating in the consensus verification process) performs block structure verification to check the integrity and structural validity of the block, including the correctness of the block header, transaction list and timestamp; performs transaction legitimacy verification to verify the legitimacy of each transaction in the block one by one, including the uniqueness of the transaction ID, the validity of the date and time, the rationality of the amount, the legitimacy of the transaction type, the validity of the account information, the legitimacy of the transaction status and the authenticity of the data source; performs Merkle root verification to recalculate the Merkle root of the transaction in the block and compare it with the Merkle root value in the block header. The Merkle root is a tree-like data structure used to quickly and efficiently verify the integrity of the transaction data in the block; performs block hash verification, and the verification node recalculates the block hash value using the same method and compares it with the block hash value sent by the master node to ensure that the information has not been tampered with; performs link verification: confirms that the pre-hash value of the current block matches the hash value of the latest block in the local blockchain to ensure the continuity of the blockchain;
[0065] Block verification result feedback: After completing the above consensus verification steps, the verification node will feedback the verification result (pass or fail) to the master node. The feedback information includes the node ID and verification result. The master node collects the feedback results of all verification nodes and counts the number of nodes that have passed the verification. If more than 2 / 3 of the total number of nodes (as required by most consensus mechanisms) pass the verification, it is considered that a consensus has been reached. At this time, the master node confirms that the new block is valid. If no consensus is reached, that is, less than 2 / 3 of the verification nodes pass the verification, the master node abandons the current block and restarts the block creation process, collecting transaction data, packaging, calculating hashes, and rebroadcasting.
[0066] Blockchain construction: The successfully verified blocks are linked in the order of the block timestamps. Each new block contains the hash value of the previous block to form a chain structure as a blockchain. The blockchain includes but is not limited to transaction data and timestamps.
[0067] The reconciliation cycle analysis unit 301 in the intelligent reconciliation module 300 uses a time series analysis method to obtain a reconciliation cycle based on the transaction data in the blockchain. The time series analysis method specifically includes:
[0068] Extract all transaction data from the last 6 months from the blockchain and sort the transaction data by transaction date and time; count the transactions of each day to get the daily transaction volume; add up the transaction volume every 7 days to get the weekly transaction volume; add up the transaction volume by natural month to get the monthly transaction volume;
[0069] Calculate the coefficient of variation (standard deviation divided by the mean) of daily, weekly, and monthly trading volumes respectively; select the time unit with the smallest coefficient of variation as the reconciliation period, where: if the coefficient of variation of daily trading volume is the smallest, select daily reconciliation; if the coefficient of variation of weekly trading volume is the smallest, select weekly reconciliation; if the coefficient of variation of monthly trading volume is the smallest, select monthly reconciliation.
[0070] The reconciliation report analysis unit 302 in the intelligent reconciliation module 300 extracts the corresponding transaction data in the blockchain according to the reconciliation cycle, uses the anomaly detection algorithm to detect anomalies on the transaction data, generates a reconciliation report result, and uses the consensus mechanism to verify the reconciliation report result, and writes the verified reconciliation report result into the blockchain, specifically including:
[0071] Data extraction: according to the determined reconciliation cycle (daily, weekly or monthly), set the start and end time of this reconciliation, for example, daily reconciliation is from 00:00:00 to 23:59:59 of the previous day; weekly reconciliation is from 00:00:00 last Monday to 23:59:59 on Sunday; monthly reconciliation is from 00:00:00 on the 1st of the previous month to 23:59:59 at the end of the month; start from the latest block of the blockchain and traverse forward until a block with a time less than the start time is found; extract transaction data from all blocks within the time range;
[0072] Anomaly detection: Perform anomaly detection on the extracted transaction data to check whether there are multiple records with the same transaction ID; calculate the average and standard deviation of the transaction amount, and mark transactions that exceed the average by plus or minus 3 standard deviations as abnormal; calculate the transaction frequency per hour, and mark the period that exceeds 2 times the average frequency as abnormal; count the daily transaction patterns of each account, and mark transactions that are significantly different from the historical patterns; calculate the normal ratio of each transaction type, and mark the transaction types with abnormal ratios; generate an anomaly report containing detailed information on all transactions marked as abnormal;
[0073] Reconciliation report generation: summarize normal transaction data, calculate the total number of transactions and total amount; summarize abnormal transaction data, calculate the number of abnormal transactions and total amount; generate reconciliation report results, including but not limited to the reconciliation period (start time and end time), total number of transactions and total amount, normal transaction number and total amount, abnormal transaction number and total amount and a detailed list of abnormal transactions;
[0074] Reconciliation node broadcast information: the reconciliation node (the node responsible for generating the reconciliation report in the blockchain) extracts the transaction data within the corresponding time range from the blockchain according to the reconciliation cycle (daily, weekly or monthly) determined by the reconciliation cycle analysis unit 301; the reconciliation node applies a predefined anomaly detection algorithm to identify potential abnormal transactions and generate a reconciliation report result; the reconciliation report result includes the reconciliation cycle (start time and end time), the total number of transactions and the total amount, the number of normal transactions and the total amount, the number of abnormal transactions and the total amount, and a detailed list of abnormal transactions; the reconciliation node uses the SHA-256 hash algorithm to calculate the hash value of the reconciliation report, which is used as the unique identifier of the reconciliation report for the subsequent verification process; the reconciliation node broadcasts the above information to all audit nodes (other nodes involved in verifying the reconciliation report), which includes but is not limited to the reconciliation cycle (start time and end time), the anomaly detection algorithm parameters used (such as the amount abnormality judgment standard, the transaction frequency abnormality judgment standard, etc.), the reconciliation report summary (including key statistical data, such as the total number of transactions, the total amount, etc.) and the reconciliation report hash value;
[0075] Verification of the reconciliation consensus mechanism: After receiving the broadcast information, the audit node extracts data and uses the same reconciliation cycle to independently extract transaction data from the blockchain; performs the same anomaly detection on the extracted transaction data; generates a local reconciliation report, including the same content structure (total number of transactions and total amount, number of normal transactions and total amount, number of abnormal transactions and total amount, and a detailed list of abnormal transactions); uses the SHA-256 algorithm to calculate the hash value of the locally generated reconciliation report, and compares the calculated local report hash value with the report hash value broadcast by the reconciliation node;
[0076] Feedback of verification results: The audit node sends the comparison results (match or mismatch) back to the reconciliation node. The feedback information includes the audit node ID and verification results. The reconciliation node collects the feedback results of all audit nodes and counts the number of audit nodes with matching results. If the number of matching results exceeds 2 / 3 of the total number of nodes (consistent with the block verification consensus requirements), consensus is considered to have been reached.
[0077] Writing the reconciliation report: If consensus is reached, the reconciliation node will write the verified reconciliation report results into the blockchain, including creating a reconciliation report block that contains the complete content of the reconciliation report, report hash value, verification results and other information as the latest reconciliation report results.
[0078] The intelligent adjustment module 400 uses a statistical method to set a difference threshold based on the transaction data, specifically including:
[0079] According to the reconciliation cycle, extract all reconciliation report results of the corresponding transaction data in the blockchain, perform statistical analysis on the normal transaction data in each reconciliation report, and calculate the average and standard deviation of the total transaction amount, the average and standard deviation of the single transaction amount, and the average and standard deviation of the number of transactions;
[0080] Use the 3 times standard deviation method in the statistical method to set the difference threshold, specifically: total amount difference threshold = 3*total transaction amount standard deviation ± total transaction amount average; single transaction amount difference threshold = 3*single transaction amount standard deviation ± single transaction amount average; transaction number difference threshold = 3*transaction number standard deviation ± transaction number average.
[0081] The intelligent adjustment module 400 compares the latest reconciliation report result with the difference threshold. If the latest reconciliation report result is within the difference threshold, it automatically adjusts and writes the adjusted result to the blockchain, specifically including:
[0082] Read the latest reconciliation report result from the blockchain, compare the transaction data in the reconciliation report with the set difference threshold, and compare whether the total amount of abnormal transactions is within the total amount difference threshold; compare whether the single amount of abnormal transactions is within the single amount difference threshold; and compare whether the number of abnormal transactions is within the transaction number difference threshold.
[0083] If all comparison results are within the difference threshold range, automatic adjustments are made. For transactions with abnormal amounts, they are adjusted to the nearest threshold boundary value. For transactions with abnormal frequencies, transaction records are retained but marked as "automatic adjustment-frequency normalization". For transactions with abnormal patterns, if the amount is within the threshold, transaction records are retained but the abnormal mark is removed.
[0084] Create a new adjustment report, which includes but is not limited to a reference to the reconciliation report (such as the hash value of the reconciliation report), a list of abnormal transactions before the adjustment, a list of transactions after the adjustment, and the difference threshold used, etc. The adjustment report is packaged into a special block, added to the blockchain, and the status of the relevant transactions is updated, marked as "automatically adjusted";
[0085] If any comparison result exceeds the difference threshold range, no automatic adjustment will be made and a manual assessment report will be created. The manual assessment report includes but is not limited to a reference to the reconciliation report, a list of abnormal transactions exceeding the threshold, and the difference threshold used; the manual assessment report is packaged into a special block, added to the blockchain, and the status of the relevant transaction is updated and marked as "pending manual review".
[0086] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A financial management system based on blockchain, characterized in that: It comprises a data collection module (100), a data processing module (200), an intelligent reconciliation module (300) and an intelligent adjustment module (400), wherein: The data collection module (100) acquires transaction data of each financial subsystem; The data processing module (200) performs data standardization and data verification on the transaction data, and packages the verified transaction data into blocks according to the time series order, and verifies the blocks by calculating hash values and using a block consensus mechanism, and the successfully verified blocks are collectively used as a blockchain; The intelligent reconciliation module (300) uses time series analysis to obtain a reconciliation cycle based on transaction data in the blockchain; extracts corresponding transaction data in the blockchain based on the reconciliation cycle, uses an anomaly detection algorithm to identify the reconciliation report result of the transaction data, and uses a reconciliation consensus mechanism to verify the reconciliation report result, and writes the verified reconciliation report result into the blockchain; the intelligent reconciliation module (300) includes a reconciliation cycle analysis unit (301), and the reconciliation cycle analysis unit (301) uses a time series analysis method to obtain a reconciliation cycle based on transaction data in the blockchain, and the time series analysis method specifically includes: Extract all transaction data from the last 6 months from the blockchain and sort the transaction data by transaction date and time; count the transactions of each day to get the daily transaction volume; add up the transaction volume every 7 days to get the weekly transaction volume; add up the transaction volume by natural month to get the monthly transaction volume; Calculate the coefficient of variation of daily, weekly and monthly trading volumes respectively. The coefficient of variation is the standard deviation of the corresponding trading volume divided by the average value of the corresponding trading volume. Select the time unit with the smallest coefficient of variation as the reconciliation period, where: if the coefficient of variation of daily trading volume is the smallest, select daily reconciliation; if the coefficient of variation of weekly trading volume is the smallest, select weekly reconciliation; if the coefficient of variation of monthly trading volume is the smallest, select monthly reconciliation; The intelligent adjustment module (400) determines whether to automatically adjust the transaction data according to the reconciliation report result in the blockchain, specifically comprising: extracting the corresponding transaction data in the blockchain according to the reconciliation cycle, and using the 3-times standard deviation method to set a difference threshold according to the transaction data; comparing the reconciliation report result with the difference threshold, and if the reconciliation report result is within the difference threshold range, automatically adjusting, and writing the adjusted result to the blockchain; otherwise, marking the transaction data corresponding to the reconciliation report result as manual assessment data, and writing it to the blockchain.
2. The blockchain-based financial management system according to claim 1, characterized in that: The transaction data in the data collection module (100) includes transaction ID, transaction date and time, transaction amount, transaction type, source account, target account information, transaction status and data source system identifier.
3. The blockchain-based financial management system according to claim 1, characterized in that: The data processing module (200) packages the verified transaction data into blocks in a time series order, verifies the blocks by calculating hash values and using a block consensus mechanism, and uses the successfully verified blocks as a blockchain, specifically including: Arrange the transaction data that have passed data verification in ascending order of transaction date and time; set a fixed time interval as the block size; group and package the sorted transaction data into blocks according to the set block size; assign a unique block ID to each block; record the start and end timestamps of the block; Calculate the hash value of each block. The hash value is calculated by concatenating all transaction data in the block into a string and adding the hash value of the previous block to it, using the SHA-256 hash algorithm. SHA-256 is a cryptographic hash function used to generate block hash values; After the creation is completed and the hash value calculation is completed, the node responsible for generating the new block serves as the master node. The master node broadcasts the complete content of the new block, the block hash value, and the hash value of the previous block to all verification nodes. The broadcast information includes the block header and transaction list; After receiving the broadcast information from the master node, the verification node performs block structure verification to check the integrity and structural validity of the block, including the correctness of the block header, transaction list and timestamp; performs transaction legitimacy verification to verify the legitimacy of each transaction in the block one by one, including the uniqueness of the transaction ID, the validity of the date and time, the rationality of the amount, the legitimacy of the transaction type, the validity of the account information, the legitimacy of the transaction status and the authenticity of the data source; performs Merkle root verification to recalculate the Merkle root of the transaction in the block and compare it with the Merkle root value in the block header. The Merkle root is a tree-like data structure used to quickly and efficiently verify the integrity of the transaction data in the block; performs block hash verification. The verification node recalculates the block hash value using the same method and compares it with the block hash value sent by the master node; performs link verification to confirm whether the previous hash value of the current block matches the hash value of the latest block in the local blockchain; After completing the above verification steps, the verification node will feedback the verification results to the master node. The feedback information includes the node ID and verification results. The master node collects the feedback results of all verification nodes and counts the number of nodes that have passed the verification. If more than 2 / 3 of the total number of nodes pass the verification, it is considered that a consensus has been reached. If a consensus is not reached, that is, less than 2 / 3 of the verification nodes pass the verification, the master node abandons the current block and restarts the block creation process, collecting transaction data, packaging, calculating hashes, and rebroadcasting. The successfully verified blocks are linked in the order of the block timestamps. Each new block contains the hash value of the previous block, forming a chain structure as a blockchain. The blockchain includes transaction data and timestamps.
4. The blockchain-based financial management system according to claim 1, characterized in that: The intelligent reconciliation module (300) comprises a reconciliation report analysis unit (302), wherein the reconciliation report analysis unit (302) extracts corresponding transaction data in the blockchain according to the reconciliation cycle, performs anomaly detection on the transaction data using an anomaly detection algorithm, and generates a reconciliation report result, specifically comprising: According to the determined reconciliation cycle, set the start and end time of this reconciliation; start from the latest block of the blockchain and traverse forward until a block with a time smaller than the start time is found; extract transaction data from all blocks within the time range; Perform anomaly detection on the extracted transaction data to check whether there are multiple records with the same transaction ID; calculate the average and standard deviation of the transaction amount, and mark transactions that exceed the average by plus or minus 3 standard deviations as abnormal; calculate the transaction frequency per hour, and mark the period that exceeds 2 times the average frequency as abnormal; count the daily transaction patterns of each account, and mark transactions that are significantly different from the historical patterns; calculate the normal ratio of each transaction type, and mark the transaction types with abnormal ratios; generate an anomaly report, including detailed information on all transactions marked as abnormal; Summarize normal transaction data, calculate the total number of transactions and total amount; summarize abnormal transaction data, calculate the number of abnormal transactions and total amount; generate reconciliation report results, including reconciliation cycle, total number of transactions and total amount, normal transaction number and total amount, abnormal transaction number and total amount and detailed list of abnormal transactions.
5. The blockchain-based financial management system according to claim 4, characterized in that: The reconciliation report analysis unit (302) verifies the reconciliation report result using the reconciliation consensus mechanism, and writes the verified reconciliation report result into the blockchain, specifically including: The node responsible for generating the reconciliation report in the blockchain is used as the reconciliation node, and the reconciliation report result corresponding to the reconciliation node is broadcast to all audit nodes; After receiving the broadcast information, the audit node extracts data and uses the same reconciliation cycle to independently extract transaction data from the blockchain. It performs the same anomaly detection and locally generated reconciliation report on the extracted transaction data. It uses the SHA-256 algorithm to calculate the hash value of the locally generated reconciliation report and compares the calculated local report hash value with the report hash value broadcast by the reconciliation node. The audit node sends the comparison results back to the reconciliation node, and the feedback information includes the audit node ID and verification results. The reconciliation node collects the feedback results of all audit nodes and counts the number of audit nodes with matching results. If more than 2 / 3 of the total number of nodes match, consensus is considered to be reached. If consensus is reached, the reconciliation node will write the verified reconciliation report results into the blockchain, including creating a reconciliation report block as the latest reconciliation report results.
6. The blockchain-based financial management system according to claim 1, characterized in that: The intelligent adjustment module (400) extracts the corresponding transaction data in the blockchain according to the reconciliation cycle, and uses the 3-times standard deviation method to set a difference threshold according to the transaction data, specifically including: According to the reconciliation cycle, extract all reconciliation report results of the corresponding transaction data in the blockchain, perform statistical analysis on the normal transaction data in each reconciliation report, and calculate the average and standard deviation of the total transaction amount, the average and standard deviation of the single transaction amount, and the average and standard deviation of the number of transactions; Use the 3 times standard deviation method in the statistical method to set the difference threshold, specifically: total amount difference threshold = 3*total transaction amount standard deviation ± total transaction amount average; single transaction amount difference threshold = 3*single transaction amount standard deviation ± single transaction amount average; transaction number difference threshold = 3*transaction number standard deviation ± transaction number average.
7. The blockchain-based financial management system according to claim 6, characterized in that: The intelligent adjustment module (400) compares the latest reconciliation report result with the difference threshold, and if the latest reconciliation report result is within the difference threshold range, automatically adjusts it and writes the adjusted result to the blockchain, specifically including: Read the latest reconciliation report result from the blockchain, compare the transaction data in the reconciliation report with the set difference threshold, and compare whether the total amount of abnormal transactions is within the total amount difference threshold; compare whether the single amount of abnormal transactions is within the single amount difference threshold; and compare whether the number of abnormal transactions is within the transaction number difference threshold. If all comparison results are within the difference threshold range, automatic adjustments are made. For transactions with abnormal amounts, they are adjusted to the nearest threshold boundary value. For transactions with abnormal frequencies, transaction records are retained and marked as automatic adjustment-frequency normalization. For transactions with abnormal patterns, if the amount is within the threshold, transaction records are retained but the abnormal mark is removed. Create a new adjustment report, which includes a reference to the reconciliation report, a list of abnormal transactions before adjustment, a list of transactions after adjustment, and the difference threshold used. Package the adjustment report into a block, add it to the blockchain, update the status of the relevant transactions, and mark them as automatically adjusted. If any comparison result exceeds the difference threshold range, no automatic adjustment will be made and a manual assessment report will be created. The manual assessment report includes a reference to the reconciliation report, a list of abnormal transactions exceeding the threshold, and the difference threshold used. The manual assessment report is packaged into a special block, added to the blockchain, and the status of the relevant transactions is updated and marked as pending manual review.
Citation Information
Patent Citations
Node device, block chain-based real-time reconciliation method and storage medium
CN109166042A
Data processing method, device and equipment based on block chain and readable storage medium
CN115730935A