Movatterモバイル変換


[0]ホーム

URL:


CN114266578A - A transaction reconciliation method and system based on Merkle tree - Google Patents

A transaction reconciliation method and system based on Merkle tree
Download PDF

Info

Publication number
CN114266578A
CN114266578ACN202111402571.4ACN202111402571ACN114266578ACN 114266578 ACN114266578 ACN 114266578ACN 202111402571 ACN202111402571 ACN 202111402571ACN 114266578 ACN114266578 ACN 114266578A
Authority
CN
China
Prior art keywords
hash
transaction
reconciliation
node
hash value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111402571.4A
Other languages
Chinese (zh)
Other versions
CN114266578B (en
Inventor
孟祥乾
佛宇航
王惠平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino CorpfiledCriticalAisino Corp
Priority to CN202111402571.4ApriorityCriticalpatent/CN114266578B/en
Publication of CN114266578ApublicationCriticalpatent/CN114266578A/en
Application grantedgrantedCritical
Publication of CN114266578BpublicationCriticalpatent/CN114266578B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

The invention discloses a transaction reconciliation method and a system based on a Mercker tree, which comprises the following steps: the account checking parties generate a hash value corresponding to each transaction according to a preset hash algorithm, transaction data and account checking initiation time; the hash value is a leaf node of the Mercker tree corresponding to the transaction time period; carrying out hash operation on the hash values of the two leaf nodes to generate a hash value corresponding to a middle node of the Mercker tree, and carrying out hash operation on the hash values of the two middle nodes to generate a hash value corresponding to a root node of the Mercker tree; comparing the hash values corresponding to the nodes of the Mercker trees of the two reconciliation parties, and if the comparison result is consistent, the reconciliation result is a flat accounting; if the comparison result is inconsistent, acquiring the hash value of the leaf node with inconsistent comparison result; acquiring corresponding transaction data according to the leaf node hash value; and the account checking parties carry out transaction account checking according to the transaction data. The problem of current manual reconciliation mode, whether can't confirm both sides transaction information unanimously fast, lead to the inefficiency of reconciliation is solved.

Description

Mercker tree-based transaction reconciliation method and system
Technical Field
The application relates to the technical field of data processing, in particular to a transaction reconciliation method and a transaction reconciliation system based on a Mercker tree.
Background
Transaction reconciliation refers to the process of confirming transaction information or bill data in a certain period between two transaction parties or between the upstream and downstream of the transaction, wherein the two transaction parties include, but are not limited to, individuals or institutions such as consumers, sellers, three-party payment institutions, banks, unions and the like.
The current mainstream transaction reconciliation method comprises the following steps: the method comprises the steps of obtaining account checking files, analyzing the account checking files, performing account checking processing and performing error account processing. The general method for acquiring the account checking files is to upload or download the upstream account checking data files in a special network environment through a timing task. The obtained file is decoded and read into a computer memory through a file analysis program and then is transferred to a database or a data cache. In the account checking process, account checking rules are formulated according to dimensions such as payment states, transaction amounts, transaction time, transaction data standards and the like, and then the transaction information in the database or the data cache is subjected to data comparison line by line through the account checking rules. And after the error accounts such as multiple accounts, short accounts and the like are found in the data comparison, the automatic or manual form account balancing is carried out to solve the problem of transaction error accounts. The existing manual reconciliation mode can not quickly determine whether the transaction information of both parties is consistent, which causes low reconciliation efficiency.
Disclosure of Invention
In order to solve the above problem, the present application provides a transaction reconciliation method based on a mercker tree, including:
the account checking parties generate a hash value corresponding to each transaction according to a preset hash algorithm, transaction data and account checking initiation time; the hash value is a leaf node of the Mercker tree corresponding to the transaction time period;
carrying out hash operation on the hash values of the two leaf nodes to generate a hash value corresponding to a middle node of the Mercker tree, and carrying out hash operation on the hash values of the two middle nodes to generate a hash value corresponding to a root node of the Mercker tree;
comparing the hash values corresponding to the nodes of the Mercker trees generated by the two reconciliation parties, and if the comparison result is consistent, the reconciliation result is a flat accounting; if the comparison result is inconsistent, comparing the hash values of the leaf nodes corresponding to the Merckel trees of the account checking parties to obtain the hash values of the leaf nodes with inconsistent comparison results; acquiring corresponding transaction data according to the leaf node hash value; and the account checking parties carry out transaction account checking according to the transaction data.
Preferably, the two reconciliation parties generate a hash value corresponding to each transaction according to a preset hash algorithm, transaction data and reconciliation initiation time, and the method comprises the following steps:
selecting any one hash algorithm of MD5, sha1, sha256, crc32 and hash as a preset hash algorithm for both reconciliation parties;
and operating the transaction data and the account checking initiation time through the hash algorithm to generate a hash value corresponding to each transaction.
Preferably, the transaction data comprises: payee, payer, transaction amount, transaction status, transaction type, transaction time, transaction voucher number.
Preferably, the hash values of the two leaf nodes are subjected to hash operation to generate a hash value corresponding to an intermediate node of the mercker tree, and the hash values of the two intermediate nodes are subjected to hash operation to form a hash value corresponding to a root node of the mercker tree, including:
pairing two adjacent leaf nodes, and performing hash operation on the hash values of the two adjacent leaf nodes to generate a hash value corresponding to a middle node of the Mercker tree;
if the number of the intermediate nodes is more than two, the two adjacent intermediate nodes are paired, and hash values of the two adjacent intermediate nodes are subjected to hash operation to generate a hash value corresponding to a new intermediate node of the Mercker tree until the hash value generated by the intermediate node is unique; the node corresponding to the unique hash value is the root node of the merkel tree.
Preferably, the method further comprises the following steps:
and if the leaf nodes or the intermediate nodes cannot be matched, performing hash operation on the preset default hash value and the leaf nodes or the intermediate nodes.
Preferably, the reconciliation parties perform transaction reconciliation according to the transaction data, and the method comprises the following steps:
and the account checking party confirms and performs account checking processing on the place where the transaction data are inconsistent.
The application also provides a transaction reconciliation system based on the Mercker tree, which comprises:
the leaf node generation module is used for generating a hash value corresponding to each transaction by the account checking parties according to a preset hash algorithm, transaction data and account checking initiation time; the hash value is a leaf node of the Mercker tree corresponding to the transaction time period;
the merkel tree generation module is used for carrying out hash operation on the hash values of the two leaf nodes to generate a hash value corresponding to an intermediate node of the merkel tree, and carrying out hash operation on the hash values of the two intermediate nodes to generate a hash value corresponding to a root node of the merkel tree;
the reconciliation module is used for comparing the hash values corresponding to the nodes of the Mercker trees generated by the reconciliation parties, and if the comparison result is consistent, the reconciliation result is a flat ledger; if the comparison result is inconsistent, comparing the hash values of the leaf nodes corresponding to the Merckel trees of the account checking parties to obtain the hash values of the leaf nodes with inconsistent comparison results; acquiring corresponding transaction data according to the leaf node hash value; and the account checking parties carry out transaction account checking according to the transaction data.
Preferably, the mercker tree generating module includes:
the leaf node pairing submodule is used for pairing two adjacent leaf nodes and carrying out hash operation on the hash values of the two adjacent leaf nodes to generate a hash value corresponding to a middle node of the Mercker tree;
the intermediate node pairing submodule is used for pairing two adjacent intermediate nodes if the number of the intermediate nodes is more than two, and performing hash operation on the hash values of the two adjacent intermediate nodes to generate a hash value corresponding to a new intermediate node of the Mercker tree until the hash value generated by the intermediate node is unique; the node corresponding to the unique hash value is the root node of the merkel tree.
Preferably, the method further comprises the following steps:
and the default pairing submodule is used for carrying out hash operation on the leaf node or the intermediate node by a preset default hash value if the leaf node or the intermediate node cannot be paired.
Preferably, the reconciliation module comprises:
and the processing sub-module is used for confirming and reconciling the inconsistent place of the transaction data of the reconciliation parties.
Drawings
FIG. 1 is a flow chart of a Mercker tree-based transaction reconciliation method provided by the application;
FIG. 2 is a block diagram of the data structure and process of generation of a transaction-to-account Merckel tree to which the present application relates;
fig. 3 is a schematic structural diagram of a transaction reconciliation system based on the mercker tree provided in the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
Fig. 1 is a schematic flow chart of a transaction reconciliation method based on a mercker tree, which is described in detail below with reference to fig. 1.
Step S101, generating a hash value corresponding to each transaction by both reconciliation parties according to a preset hash algorithm, transaction data and reconciliation initiation time; the hash value is a leaf node of the Mercker tree corresponding to the transaction time period.
The Merck tree is also called Hash tree, and its essence is a tree-like data structure, consisting of data block, leaf node, intermediate node and root node, and its any father node is equal to the Hash result obtained by adding the data of left and right child nodes, and its top-most node is called Merck tree root, and is a binary tree, and has the characteristics of determinacy, irreversibility, uniform length and high-efficiency retrieval and comparison, etc. Hash (hash) is a function that maps data of arbitrary length to data of fixed length, including but not limited to MD5, sha1, sha256, crc32, hash, etc., and the hash value will change greatly if the original data changes arbitrarily.
Selecting any one hash algorithm of MD5, sha1, sha256, crc32 and hash by the two reconciliation parties as the two reconciliation parties according to a preset hash algorithm; and operating the transaction data and the account checking initiation time through the hash algorithm to generate a hash value corresponding to each transaction. The hash value is a leaf node of the Mercker tree corresponding to the transaction time period. Transaction data, comprising: payee, payer, transaction amount, transaction status, transaction type, transaction time, transaction voucher number.
And step S102, carrying out hash operation on the hash values of the two leaf nodes to generate a hash value corresponding to the intermediate node of the Mercker tree, and carrying out hash operation on the hash values of the two intermediate nodes to generate a hash value corresponding to the root node of the Mercker tree.
Pairing two adjacent leaf nodes, and performing hash operation on the hash values of the two adjacent leaf nodes to generate a hash value corresponding to a middle node of the Mercker tree; if the number of the intermediate nodes is more than two, the two adjacent intermediate nodes are paired, and hash values of the two adjacent intermediate nodes are subjected to hash operation to generate a hash value corresponding to a new intermediate node of the Mercker tree until the hash value generated by the intermediate node is unique; the node corresponding to the unique hash value is the root node of the merkel tree.
And if the leaf nodes or the intermediate nodes cannot be matched, performing hash operation on the preset default hash value and the leaf nodes or the intermediate nodes.
Step S103, comparing the hash values corresponding to the nodes of the Mercker trees generated by the two reconciliation parties, and if the comparison results are consistent, the reconciliation result is a flat ledger; if the comparison result is inconsistent, comparing the hash values of the leaf nodes corresponding to the Merckel trees of the account checking parties to obtain the hash values of the leaf nodes with inconsistent comparison results; acquiring corresponding transaction data according to the leaf node hash value; the account checking parties carry out transaction account checking according to the transaction data
And when the comparison result is inconsistent, confirming and reconciling the inconsistent place of the transaction data by the reconciliation parties according to the acquired corresponding transaction data.
Specific examples of applications are as follows:
the method has the main functions of account checking setting, hash generation, account checking hash tree generation and account checking execution. The reconciliation setting is used for setting transaction fields for generating the hash value, and comprises the settings of reconciliation types, field names, field sequences, dictionary value conversion, connectors, hash default values, reconciliation time and the like, and can be customized according to the dimensions of the transaction types, the transaction states, the reconciliation time and the like, so that the centralized standardized management of reconciliation of different services is realized. The hash generation module is triggered at the set reconciliation time point, and performs hash calculation on the corresponding transaction record according to the rules set for reconciliation to obtain the corresponding hash value of each transaction. And performing hash calculation on the generated hash values pairwise, pairing the transaction hashes which cannot be paired pairwise by using a hash default value set by the system, and finally generating a hash tree containing the whole account-checking transaction, namely the account-checking hash tree. And the downstream mechanism acquires the reconciliation hash tree generated by the upstream mechanism, firstly acquires the root node and judges whether the root node is consistent with the root node of the reconciliation hash tree generated by the mechanism. According to the certainty and irreversibility of the Mercker tree, if the two are consistent, the transaction information of the two parties is consistent, and the account checking work is finished. If the transaction information is inconsistent with the transaction information, inconsistent transaction information is indicated, and account balancing is required. And then performing subsequent traversal on the account checking hash trees of the two parties, comparing the traversal results, outputting leaf nodes corresponding to inconsistent hash values, further matching transaction information records corresponding to the leaf nodes hash, triggering a manual processing flow, and finishing the account checking work.
The account checking setting function flow specifically comprises the following steps:
and clicking a system function page to add a reconciliation setting record, and setting and storing the information such as the reconciliation type, the field name, the field sequence, the dictionary value conversion, the connector, the hash default value, the hash algorithm, the reconciliation time and the like. When the reconciliation record is selected and set to be effective, the system background records the setting and generates a timing task according to the recorded reconciliation time. And when the reconciliation record is selected and set to be invalid, the background of the system does not generate a timing task and only records the setting.
The hash generation functional process specifically comprises:
after a timing task generated by the reconciliation setting module is started at a specific reconciliation time point, selective and sequential splicing is carried out on transaction information according to field items set by the reconciliation, after the splicing is completed, batch processing is carried out through an agreed hash algorithm, a transaction hash value corresponding to each transaction is generated and stored in a computer, and the storage position comprises a memory, a cache, a database, a file and the like.
The generation functional flow of the account checking hash tree specifically comprises the following steps:
every two adjacent transaction hash values are paired, and the default hash value set by the account checking is paired when the two transaction hash values are not paired. And after pairing connection, performing hash again. And (4) taking the adjacent transaction hash as a leaf node, and taking the result obtained by the hash again as a parent node of the leaf node to create the Mercker tree. And pairwise matching and connecting the father nodes, and taking the result of the hash again as a new father node. And repeating the steps to finally obtain the reconciliation hash tree, which is detailed in an attached figure 2.
The account checking execution function flow specifically comprises the following steps:
and the downstream reconciliation mechanism acquires the data file or the character string containing the reconciliation hash tree in an online or offline mode through network requests, mailbox notifications and the like. Analyzing a reconciliation hash tree data file or a character string, converting the reconciliation hash tree data file or the character string into a program object of a tree structure, reading a root node, judging whether the reconciliation hash tree data file or the character string is consistent with the root node of the reconciliation hash tree generated by the mechanism, if so, outputting a reconciliation result as a tie account, and finishing the execution of the reconciliation; and if the two-dimensional account checking hash trees are inconsistent, traversing the account checking hash tree in a sequential traversal mode, comparing the account checking hash tree with the account checking hash tree of the mechanism, eliminating intermediate nodes, and outputting inconsistent leaf node transaction hashes in the account checking hash tree of the mechanism. And inquiring and summarizing the corresponding specific transaction detail record according to the transaction hash, outputting an account checking result and the corresponding detail record, and finishing the account checking execution.
According to the embodiment, when two transaction parties perform transactions, the transaction systems of the two transaction parties splice key transaction information such as a payee, a payer, a transaction amount, a transaction state, a transaction type, a transaction time, a transaction certificate number and the like according to a transaction data item and a data dictionary agreed in advance, and then perform hash operation in real time to obtain the unique hash value of the transaction. And then carrying out pairwise hash operation on the transaction hashes, and generating the Mercker tree of the transaction information hashes in a certain period according to the creating rule of the Mercker tree. If the transaction data of the two transaction parties are completely consistent in the transaction period, namely the hash value of each transaction data is consistent, the finally generated Mercker tree root of the time period is necessarily consistent. According to the certainty and irreversibility of the Mercker tree, if the finally generated Mercker tree roots are inconsistent, the transaction data of both transaction parties can be shown to have error account. Then, traversing the Mercker trees of both parties, retrieving and comparing branches with inconsistent transaction hashes, then traversing the branches, determining the specific transaction data hashes related to the branches, further locking a specific error transaction, and triggering the automatic or manual tie account to solve the occurring transaction error account.
According to the transaction reconciliation method, the complicated and huge transaction reconciliation files are converted into the compact and safe binary tree data format with unified format and open standard, the processes of transmission, analysis, comparison and the like are greatly improved, the network dependence is reduced, less computing resources are consumed, the standardized analysis enables the upstream and downstream docking to be more convenient, more convenient and more efficient, and due to the application of the certainty and the irreversibility of the hash value, the data is guaranteed not to be falsified, and the data reconciliation processing is safer and more accurate.
Based on the same inventive concept, the present application also provides a mercker tree-basedtransaction reconciliation system 300, as shown in fig. 3, comprising:
the leafnode generating module 310 is configured to generate a hash value corresponding to each transaction by the two reconciliation parties according to a preset hash algorithm, the transaction data and the reconciliation initiation time; the hash value is a leaf node of the Mercker tree corresponding to the transaction time period;
the merkeltree generating module 320 is configured to perform hash operation on the hash values of the two leaf nodes to generate a hash value corresponding to an intermediate node of the merkel tree, perform hash operation on the hash values of the two intermediate nodes to generate a hash value corresponding to a root node of the merkel tree;
thereconciliation module 330 is configured to compare hash values corresponding to the nodes of the tacler trees generated by the reconciliation parties, and if the comparison result is consistent, the reconciliation result is a flat accounting; if the comparison result is inconsistent, comparing the hash values of the leaf nodes corresponding to the Merckel trees of the account checking parties to obtain the hash values of the leaf nodes with inconsistent comparison results; acquiring corresponding transaction data according to the leaf node hash value; and the account checking parties carry out transaction account checking according to the transaction data.
Preferably, the mercker tree generating module includes:
the leaf node pairing submodule is used for pairing two adjacent leaf nodes and carrying out hash operation on the hash values of the two adjacent leaf nodes to generate a hash value corresponding to a middle node of the Mercker tree;
the intermediate node pairing submodule is used for pairing two adjacent intermediate nodes if the number of the intermediate nodes is more than two, and performing hash operation on the hash values of the two adjacent intermediate nodes to generate a hash value corresponding to a new intermediate node of the Mercker tree until the hash value generated by the intermediate node is unique; the node corresponding to the unique hash value is the root node of the merkel tree.
Preferably, the method further comprises the following steps:
and the default pairing submodule is used for carrying out hash operation on the leaf node or the intermediate node by a preset default hash value if the leaf node or the intermediate node cannot be paired.
Preferably, the reconciliation module comprises:
and the processing sub-module is used for confirming and reconciling the inconsistent place of the transaction data of the reconciliation parties.
Finally, it should be noted that: although the present invention has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the spirit and scope of the invention.

Claims (10)

Translated fromChinese
1.一种基于默克尔树的交易对账方法,其特征在于,包括:1. A transaction reconciliation method based on Merkle tree, characterized in that, comprising:对帐双方根据预设的hash算法、交易数据和对账发起时间,生成每笔交易对应的hash值;所述hash值为交易时间段对应的默克尔树的叶子节点;The two parties in the reconciliation generate a hash value corresponding to each transaction according to the preset hash algorithm, transaction data and reconciliation initiation time; the hash value is the leaf node of the Merkle tree corresponding to the transaction time period;将两个叶子节点的hash值进行哈希运算,生成默克尔树中间节点对应的hash值,将两个中间节点的hash值进行哈希运算,生成默克尔树根节点对应的hash值;Perform hash operation on the hash values of the two leaf nodes to generate the hash value corresponding to the intermediate node of the Merkle tree, and perform the hash operation on the hash values of the two intermediate nodes to generate the hash value corresponding to the root node of the Merkle tree;比较对帐双方生成的默克尔树根据节点对应的hash值,若比较结果为一致,则对帐结果为平帐;若比较结果为不一致,则将对账双方默克尔树对应的叶子节点hash值进行比较,获取比较结果不一致的叶子节点hash值;根据所述叶子节点hash值,获取对应的交易数据;对账双方根据所述交易数据进行交易对账。Compare the Merkle tree generated by the reconciliation parties according to the hash value corresponding to the node. If the comparison result is consistent, the reconciliation result is equal; if the comparison result is inconsistent, the leaf node corresponding to the Merkle tree of the reconciliation parties The hash values are compared, and the hash values of the leaf nodes whose comparison results are inconsistent are obtained; the corresponding transaction data is obtained according to the hash values of the leaf nodes; the reconciliation parties perform transaction reconciliation according to the transaction data.2.根据权利要求1所述的方法,其特征在于,对帐双方根据预设的hash算法、交易数据和对账发起时间,生成每笔交易对应的hash值,包括:2. method according to claim 1, is characterized in that, according to preset hash algorithm, transaction data and account reconciliation initiation time, both parties generate the corresponding hash value of each transaction, including:选取包括MD5、sha1、sha256、crc32、haval中任一种hash算法,作为对帐双方根据预设的hash算法;Select any hash algorithm including MD5, sha1, sha256, crc32, and haval as the preset hash algorithm for the reconciliation parties;将交易数据和对账发起时间,通过所述hash算法进行运行,生成每笔交易对应的hash值。The transaction data and the reconciliation initiation time are run through the hash algorithm to generate a hash value corresponding to each transaction.3.根据权利要求1所述的方法,其特征在于,交易数据,包括:收款方、付款方、交易金额、交易状态、交易类型、交易时间、交易凭证号。3 . The method according to claim 1 , wherein the transaction data includes: payee, payer, transaction amount, transaction status, transaction type, transaction time, and transaction voucher number. 4 .4.根据权利要求1所述的方法,其特征在于,将两个叶子节点的hash值进行哈希运算,生成默克尔树中间节点对应的hash值,将两个中间节点的hash值进行哈希运算,成默克尔树根节点对应的hash值,包括:4. The method according to claim 1, wherein the hash value of the two leaf nodes is subjected to hash operation, the hash value corresponding to the intermediate node of the Merkle tree is generated, and the hash value of the two intermediate nodes is hashed. The hash operation becomes the hash value corresponding to the root node of the Merkle tree, including:将两个相邻叶子节点配对,将所述两个相邻叶子节点的hash值进行哈希运算,生成默克尔树中间节点对应的hash值;Pairing two adjacent leaf nodes, hashing the hash values of the two adjacent leaf nodes to generate a hash value corresponding to the intermediate node of the Merkle tree;若所述中间节点为两个以上,则将两个相邻中间节点配对,将所述两个相邻中间节点hash值进行哈希运算,生成默克尔树新的中间节点对应的hash值,直至中间节点生成的hash值唯一;唯一的hash值对应的节点为默克尔树的根节点。If there are more than two intermediate nodes, pair two adjacent intermediate nodes, perform a hash operation on the hash values of the two adjacent intermediate nodes, and generate a hash value corresponding to a new intermediate node of the Merkle tree, The hash value generated by the intermediate node is unique; the node corresponding to the unique hash value is the root node of the Merkle tree.5.根据权利要求4所述的方法,其特征在于,还包括:5. The method of claim 4, further comprising:若所述叶子节点或所述中间节点,未能配对,则由预设的默认hash值与所述叶子节点或所述中间节点进行哈希运算。If the leaf node or the intermediate node fails to be paired, a preset default hash value is used to perform a hash operation with the leaf node or the intermediate node.6.根据权利要求1所述的方法,其特征在于,对账双方根据所述交易数据进行交易对账,包括:6. The method according to claim 1, characterized in that, the reconciliation parties perform transaction reconciliation according to the transaction data, comprising:对账双方将交易数据不一致的地方进行确认和平账处理。Both parties to the account reconciliation will confirm and settle the account where the transaction data is inconsistent.7.一种基于默克尔树的交易对账系统,其特征在于,包括:7. A Merkle tree-based transaction reconciliation system, comprising:叶子节点生成模块,用于对帐双方根据预设的hash算法、交易数据和对账发起时间,生成每笔交易对应的hash值;所述hash值为交易时间段对应的默克尔树的叶子节点;The leaf node generation module is used for the reconciliation parties to generate the hash value corresponding to each transaction according to the preset hash algorithm, transaction data and reconciliation initiation time; the hash value is the leaf of the Merkle tree corresponding to the transaction time period node;默克尔树生成模块,用于将两个叶子节点的hash值进行哈希运算,生成默克尔树中间节点对应的hash值,将两个中间节点的hash值进行哈希运算,生成默克尔树根节点对应的hash值;The Merkle tree generation module is used to hash the hash values of the two leaf nodes, generate the hash values corresponding to the intermediate nodes of the Merkle tree, and perform hash operations on the hash values of the two intermediate nodes to generate the Merkle tree. The hash value corresponding to the root node of the tree;对帐模块,用于比较对帐双方生成的默克尔树根据节点对应的hash值,若比较结果为一致,则对帐结果为平帐;若比较结果为不一致,则将对账双方默克尔树对应的叶子节点hash值进行比较,获取比较结果不一致的叶子节点hash值;根据所述叶子节点hash值,获取对应的交易数据;对账双方根据所述交易数据进行交易对账。The reconciliation module is used to compare the Merkle tree generated by the reconciliation parties according to the hash value corresponding to the node. If the comparison result is consistent, the reconciliation result is a flat account; if the comparison result is inconsistent, the reconciliation parties Merck Compare the hash values of the leaf nodes corresponding to the Er tree, and obtain the hash values of the leaf nodes whose comparison results are inconsistent; obtain the corresponding transaction data according to the hash values of the leaf nodes; and perform transaction reconciliation according to the transaction data.8.根据权利要求7所述的系统,其特征在于,默克尔树生成模块,包括:8. system according to claim 7, is characterized in that, Merkle tree generation module, comprises:叶子节点配对子模块,用于将两个相邻叶子节点配对,将所述两个相邻叶子节点的hash值进行哈希运算,生成默克尔树中间节点对应的hash值;The leaf node pairing submodule is used to pair two adjacent leaf nodes, and perform hash operation on the hash values of the two adjacent leaf nodes to generate the hash value corresponding to the intermediate node of the Merkle tree;中间节点配对子模块,用于若所述中间节点为两个以上,则将两个相邻中间节点配对,将所述两个相邻中间节点hash值进行哈希运算,生成默克尔树新的中间节点对应的hash值,直至中间节点生成的hash值唯一;唯一的hash值对应的节点为默克尔树的根节点。The intermediate node pairing submodule is used for pairing two adjacent intermediate nodes if there are more than two intermediate nodes, and performing hash operation on the hash values of the two adjacent intermediate nodes to generate a new Merkle tree. The hash value corresponding to the intermediate node of , until the hash value generated by the intermediate node is unique; the node corresponding to the unique hash value is the root node of the Merkle tree.9.根据权利要求8所述的系统,其特征在于,还包括:9. The system of claim 8, further comprising:默认配对子模块,用于若所述叶子节点或所述中间节点,未能配对,则由预设的默认hash值与所述叶子节点或所述中间节点进行哈希运算。The default pairing submodule is configured to perform a hash operation with the leaf node or the intermediate node by a preset default hash value if the leaf node or the intermediate node fails to be paired.10.根据权利要求7所述的系统,其特征在于,对帐模块,包括:10. The system according to claim 7, wherein the reconciliation module comprises:处理子模块,用于对账双方将交易数据不一致的地方进行确认和平账处理。The processing sub-module is used to confirm and reconcile the inconsistent transaction data between the two parties.
CN202111402571.4A2021-11-232021-11-23Transaction reconciliation method and system based on Merker treeActiveCN114266578B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111402571.4ACN114266578B (en)2021-11-232021-11-23Transaction reconciliation method and system based on Merker tree

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111402571.4ACN114266578B (en)2021-11-232021-11-23Transaction reconciliation method and system based on Merker tree

Publications (2)

Publication NumberPublication Date
CN114266578Atrue CN114266578A (en)2022-04-01
CN114266578B CN114266578B (en)2025-07-25

Family

ID=80825416

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111402571.4AActiveCN114266578B (en)2021-11-232021-11-23Transaction reconciliation method and system based on Merker tree

Country Status (1)

CountryLink
CN (1)CN114266578B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115393082A (en)*2022-08-152022-11-25中国工商银行股份有限公司 A blockchain-based transaction data reconciliation processing method and device
CN115564437A (en)*2022-11-072023-01-03中国邮政储蓄银行股份有限公司 Account reconciliation method, account reconciliation system, computer-readable storage medium and banking system
CN120508583A (en)*2025-07-182025-08-19杭州乒乓智能技术有限公司 Foreign exchange transaction exposure statistical method, electronic device and computer-readable medium
WO2025194911A1 (en)*2024-03-202025-09-25中国银联股份有限公司Carbon account data management system, method and apparatus, device, and medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106055597A (en)*2016-05-242016-10-26布比(北京)网络技术有限公司Digital transaction system, and account information query method therefor
CN108494775A (en)*2018-03-262018-09-04四川长虹电器股份有限公司It prevents from utilizing valid data or the method for distorting valid data progress network attack
CN109559234A (en)*2019-01-312019-04-02杭州复杂美科技有限公司A kind of storage method, equipment and the storage medium of block chain status data
KR20190050266A (en)*2017-11-022019-05-10단국대학교 산학협력단Method and apparatus for autheticating transaction using one time password
CN109919756A (en)*2019-02-222019-06-21西南财经大学Fund transfer system, checking method and method of commerce based on Merkle tree backtracking location technology
CN110825755A (en)*2019-10-302020-02-21北京海益同展信息科技有限公司 Consensus method, consensus node, electronic equipment, storage medium of blockchain
US20200167345A1 (en)*2019-07-312020-05-28Alibaba Group Holding LimitedMethod and apparatus for storing blockchain state data and electronic device
WO2020151635A1 (en)*2019-01-232020-07-30腾讯科技(深圳)有限公司Data processing method and apparatus, computer device, and storage medium
CN111861482A (en)*2020-09-222020-10-30支付宝(杭州)信息技术有限公司Block chain account checking method and system
WO2020259629A1 (en)*2019-06-242020-12-30深圳前海微众银行股份有限公司Block chain-based data inspection method and apparatus
US20210067321A1 (en)*2019-08-302021-03-04Alibaba Group Holding LimitedUpdating a state merkle tree
CN112560093A (en)*2020-12-172021-03-26杭州趣链科技有限公司File management method, device, equipment and storage medium based on block chain
WO2021068728A1 (en)*2019-10-102021-04-15深圳前海微众银行股份有限公司Methods and apparatus for generating state tree of block and validating on-chain data
CN112785408A (en)*2021-02-262021-05-11中国工商银行股份有限公司Account checking method and device based on Hash
CN113254450A (en)*2021-05-282021-08-13山大地纬软件股份有限公司Method and system for storing account state of incremental MPT (message passing through) tree based on block chain

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106055597A (en)*2016-05-242016-10-26布比(北京)网络技术有限公司Digital transaction system, and account information query method therefor
KR20190050266A (en)*2017-11-022019-05-10단국대학교 산학협력단Method and apparatus for autheticating transaction using one time password
CN108494775A (en)*2018-03-262018-09-04四川长虹电器股份有限公司It prevents from utilizing valid data or the method for distorting valid data progress network attack
WO2020151635A1 (en)*2019-01-232020-07-30腾讯科技(深圳)有限公司Data processing method and apparatus, computer device, and storage medium
CN109559234A (en)*2019-01-312019-04-02杭州复杂美科技有限公司A kind of storage method, equipment and the storage medium of block chain status data
CN109919756A (en)*2019-02-222019-06-21西南财经大学Fund transfer system, checking method and method of commerce based on Merkle tree backtracking location technology
WO2020259629A1 (en)*2019-06-242020-12-30深圳前海微众银行股份有限公司Block chain-based data inspection method and apparatus
US20200167345A1 (en)*2019-07-312020-05-28Alibaba Group Holding LimitedMethod and apparatus for storing blockchain state data and electronic device
US20210067321A1 (en)*2019-08-302021-03-04Alibaba Group Holding LimitedUpdating a state merkle tree
WO2021068728A1 (en)*2019-10-102021-04-15深圳前海微众银行股份有限公司Methods and apparatus for generating state tree of block and validating on-chain data
CN110825755A (en)*2019-10-302020-02-21北京海益同展信息科技有限公司 Consensus method, consensus node, electronic equipment, storage medium of blockchain
CN111861482A (en)*2020-09-222020-10-30支付宝(杭州)信息技术有限公司Block chain account checking method and system
CN112560093A (en)*2020-12-172021-03-26杭州趣链科技有限公司File management method, device, equipment and storage medium based on block chain
CN112785408A (en)*2021-02-262021-05-11中国工商银行股份有限公司Account checking method and device based on Hash
CN113254450A (en)*2021-05-282021-08-13山大地纬软件股份有限公司Method and system for storing account state of incremental MPT (message passing through) tree based on block chain

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"区块链技术在金融行业的应用模式研究", 《经济与管理科学》, no. 8, 1 June 2018 (2018-06-01)*
杨保华等: "《区块链原理、设计与应用 第2版》", vol. 2, 31 July 2020, 机械工业出版社, pages: 83 - 84*
江海峰: "区块链技术在金融行业的应用模式研究", 《经济与管理科学》, 15 August 2018 (2018-08-15)*

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115393082A (en)*2022-08-152022-11-25中国工商银行股份有限公司 A blockchain-based transaction data reconciliation processing method and device
CN115564437A (en)*2022-11-072023-01-03中国邮政储蓄银行股份有限公司 Account reconciliation method, account reconciliation system, computer-readable storage medium and banking system
WO2025194911A1 (en)*2024-03-202025-09-25中国银联股份有限公司Carbon account data management system, method and apparatus, device, and medium
CN120508583A (en)*2025-07-182025-08-19杭州乒乓智能技术有限公司 Foreign exchange transaction exposure statistical method, electronic device and computer-readable medium
CN120508583B (en)*2025-07-182025-09-30杭州乒乓智能技术有限公司Foreign exchange transaction open statistical method, electronic equipment and computer readable medium

Also Published As

Publication numberPublication date
CN114266578B (en)2025-07-25

Similar Documents

PublicationPublication DateTitle
CN114266578B (en)Transaction reconciliation method and system based on Merker tree
CN108846659B (en)Block chain-based transfer method and device and storage medium
JP6865851B2 (en) Blockchain World State Markle Patricia Tri Tree Subtree Construction
CN110651289B (en) Causes the bytecode of previous transactions to be injected into blockchain transactions
CN110622488B (en)System and method for managing user interaction with blockchains
US20180225640A1 (en)Systems and methods for issuing and tracking digital tokens within distributed network nodes
US20210064585A1 (en)Methods and devices for providing traversable key-value data storage on blockchain
CN112785408A (en)Account checking method and device based on Hash
CN111339743B (en)Account number generation method and device
CN111640018B (en) A method and device for verifying the existence of a blockchain transaction
Wang et al.Ess: An efficient storage scheme for improving the scalability of bitcoin network
CN110221956A (en)Method and apparatus for generating the test case of block chain intelligence contract
WO2023051308A1 (en)Data verification method and apparatus, device and storage medium
CN111309809A (en) A kind of block header preservation method and device thereof
CA2734207A1 (en)Electronic file comparator
CN110851343B (en) A test method and device based on decision tree
CN111866134B (en)Method and system for generating hash value and address of block chain transaction and storage medium
CN110362560A (en)A method of without business major key data at storing data library duplicate removal
US20210051021A1 (en)System for automated data verification
CN114595279B (en)Block chain data processing method and device
CN117130990A (en)Data processing method and device
CN117056297A (en)Decentralizing storage system, method, equipment and storage medium for multi-version files
KaandorpEasy and efficient querying of smart contract data while maintaining data integrity
CN111339574A (en)Block data processing method and device, computer equipment and storage medium
CN118585518B (en) A consortium chain slimming method and system based on smart contracts

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp