CN111192147A - Block chain-based fund checking method and device, electronic equipment and medium - Google Patents

Block chain-based fund checking method and device, electronic equipment and medium Download PDF

Info

Publication number
CN111192147A
CN111192147A CN202010281296.4A CN202010281296A CN111192147A CN 111192147 A CN111192147 A CN 111192147A CN 202010281296 A CN202010281296 A CN 202010281296A CN 111192147 A CN111192147 A CN 111192147A
Authority
CN
China
Prior art keywords
target
balance
transaction
account
external
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.)
Pending
Application number
CN202010281296.4A
Other languages
Chinese (zh)
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010281296.4A priority Critical patent/CN111192147A/en
Publication of CN111192147A publication Critical patent/CN111192147A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the specification discloses a fund checking method based on a block chain, which comprises the steps of obtaining a balance inquiry request of a target account in a set time period; according to the balance inquiry request, acquiring target transaction running data of the target account in the set time period and the balance of the target account from a target block in a block chain; acquiring external transaction running data of the target account in the set time period and external account balance from an external transaction database; and performing fund checking by using the target transaction flow data, the target account balance, the external transaction flow data and the external account balance.

Description

Block chain-based fund checking method and device, electronic equipment and medium
Technical Field
The embodiment of the specification relates to the technical field of block chain processing, in particular to a fund checking method and device based on a block chain, electronic equipment and a medium.
Background
With the rapid development of the internet technology, the payment field and the internet are deeply integrated, so that third-party network payment is promoted to be increasingly popularized, for example, in the online payment field, a user can complete payment through a smart phone, and the use of the user is facilitated.
In the prior art, in a business scene related to fund flow, fund checking is an indispensable link, and various reconciliation modes are adopted in items of cross-over remittance, supply chain finance and block chain integration at present, for example, fund flow is stored in an Excel form for block-by-block pulling checking.
Disclosure of Invention
The embodiment of the specification provides a fund checking method, a fund checking device, electronic equipment and a fund checking medium based on a block chain, and the fund checking accuracy can be improved.
A first aspect of an embodiment of the present specification provides a fund checking method based on a block chain, including:
acquiring a balance inquiry request of a target account in a set time period;
according to the balance inquiry request, acquiring target transaction running data of the target account in the set time period and the balance of the target account from a target block in a block chain;
acquiring external transaction running data of the target account in the set time period and external account balance from an external transaction database;
and performing fund checking by using the target transaction flow data, the target account balance, the external transaction flow data and the external account balance.
A second aspect of the embodiments of the present specification provides a fund checking apparatus based on a block chain, including:
the request acquisition unit is used for acquiring a balance inquiry request of a target account in a set time period;
the target transaction flow acquiring unit is used for acquiring target transaction flow data of the target account in the set time period and the balance of the target account from a target block in a block chain according to the balance inquiry request;
the external transaction flow acquisition unit is used for acquiring external transaction flow data of the target account in the set time period and external account balance from an external transaction database;
and the fund checking unit is used for performing fund checking by utilizing the target transaction flow data, the target account balance, the external transaction flow data and the external account balance.
The third aspect of the embodiments of the present specification further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the above fund checking method based on a block chain when executing the program.
The fourth aspect of the embodiments of the present specification also provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, performs the steps of the above-described block chain-based fund checking method.
The beneficial effects of the embodiment of the specification are as follows:
based on the technical scheme, a balance inquiry request of a target account in a set time period is obtained, then target transaction running data and a target account balance of the target account in the set time period are obtained from a target block in a block chain according to the balance inquiry request, external transaction running data and an external account balance are obtained from an external transaction database according to the balance inquiry request, and then account checking is carried out by utilizing the target transaction running data, the external transaction running data, the target account balance and the external account balance, so that the transaction running data of the target account is recorded through the block chain, when account checking is required, the target transaction running data and the target account balance are read from the block chain, the external transaction running data and the external account balance are obtained for account checking, and due to the fact that the block chain has the characteristic of being not capable of being tampered, account checking is carried out by utilizing the target transaction running data and the target account balance in the block chain, the accuracy of account checking can be effectively ensured.
Drawings
FIG. 1 is a flow chart of a method of a blockchain-based fund checking method in an embodiment of the present disclosure;
FIG. 2 is a flow chart of an embodiment of the present disclosure for obtaining target transaction flow data from a target block;
FIG. 3 is a schematic structural diagram of a fund checking apparatus based on a blockchain in an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of this specification.
Detailed Description
In order to better understand the technical solutions, the technical solutions of the embodiments of the present specification are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features of the embodiments and embodiments of the present specification are detailed descriptions of the technical solutions of the embodiments of the present specification, and are not limitations of the technical solutions of the present specification, and the technical features of the embodiments and embodiments of the present specification may be combined with each other without conflict.
The technical scheme adopted by the embodiment of the specification is as follows: firstly, acquiring a balance inquiry request of a target account in a set time period, acquiring target transaction running data and a target account balance of the target account in the set time period from a target block in a block chain according to the balance inquiry request, acquiring external transaction running data and an external account balance from an external transaction database according to the balance inquiry request, and checking account by using the target transaction running data, the external transaction running data, the target account balance and the external account balance, so that the transaction running data of the target account is recorded through the block chain, when checking account is required, the target transaction running data and the target account balance are read from the block chain, the external transaction running data and the external account balance are acquired for checking account, and due to the fact that the block chain has the characteristic of being not capable of being tampered, the target transaction running data and the target account balance in the block chain are used for checking account, the accuracy of account checking can be effectively ensured; and the whole account checking process completely uses electronic equipment for automatic account checking, so that the account checking efficiency can be greatly improved.
In a first aspect, as shown in fig. 1, an embodiment of the present specification provides a fund checking method based on a blockchain, including:
s102, acquiring a balance inquiry request of a target account in a set time period;
s104, acquiring target transaction running data of a target account in a set time period and the balance of the target account from a target block in a block chain according to the balance inquiry request;
s106, acquiring external transaction running data of the target account in a set time period and external account balance from an external transaction database;
and S108, checking funds by using the target transaction flow data, the target account balance, the external transaction flow data and the external account balance.
The fund checking method based on the block chain provided by the specification is applied to the block chain, and the block chain technology generally has the following 4 characteristics, namely, decentralization; secondly, as the block chain is a distributed network architecture, no central node can be attacked or attacked, so that the block chain has stronger stability, reliability and continuity in the aspect of overall technical arrangement; thirdly, a strong safety and consensus mechanism does not need the intervention of a third party; and fourthly, the public transparency and the non-tamper property of the transaction are realized, so that the reliability of target transaction running data and target account balance stored in the block chain is higher.
The blockchain in the embodiment of the present specification may generally be a federation chain, where the federation chain generally corresponds to a plurality of federation parties, and the federation chain is commonly maintained by the plurality of federation parties, so that data stored on the federation chain can be prevented from being tampered. Of course, the blockchain may also be a public blockchain and a private blockchain, and this specification is not particularly limited.
For example, when the fund checking method is applied to an advertisement system, a plurality of alliance parties of an alliance chain include an advertiser party, an advertisement platform party and a media party, wherein the advertiser party is used for sending advertisements to the advertisement platform party, so that the advertisement platform party promotes the advertisements on media resources provided by the media party, and the advertiser party, the advertisement platform party and the media party link each transaction data of the advertiser party, the advertisement platform party and the media party to the alliance chain.
For another example, when the method of the golden check is applied to an e-commerce platform, the plurality of alliance parties of the alliance chain include an e-commerce platform party and a merchant party, wherein the merchant party is used for selling goods, and the e-commerce platform party is used for displaying goods of the merchant party and goods of the platform and providing a payment function when a user purchases the goods, so that the merchant party and the e-commerce platform party link each transaction data of the merchant party and the platform to the alliance chain.
And if the consensus algorithm in the alliance chain is a Byzantine fault-tolerant algorithm, at the moment, when each transaction data is uplinked to the alliance chain, after an uplink request of the transaction data is sent to a node on the alliance chain, broadcasting the uplink request on the alliance chain, and if the number of confirmation requests corresponding to the uplink request received by the alliance chain reaches a set number, uplinking the transaction data to the alliance; the total number of nodes in the federation chain is N, and N is ensured to be greater than or equal to 3F +1, F is the maximum number of nodes with problems in the federation chain, and the set number may be set according to N and F, for example, may be 2F and 2F +1, and the like, and this specification is not limited specifically.
In step S102, a query operation for the target account may be obtained, and a balance query request of the target account in a set time period is obtained according to the query operation.
In this embodiment of the present description, the set time period may be set by a user, where the set time period includes a start time and an end time, and may also include the start time and the end time, and may also include the start time, the end time, and the like, and this description is not limited in particular.
For example, if the starting time and the ending time in the set time period are T and T + H, the duration of the set time period = T + H-T = H, and H may be in units of day, week, hour, minute, month, and the like, and if H =1, the time difference between the ending time and the starting time is 1 day.
In this embodiment of the present specification, in order to perform reconciliation more quickly and accurately, the set time period may be a time period corresponding to 1 or more storage blocks in the block chain.
Specifically, after a user is connected to a block chain through electronic equipment, query data input by the user are used for generating query operation, wherein the query data carry a set time period and a target account; according to the query operation, a balance query request is obtained, wherein the balance query request carries a target account and a set time period, the balance query request is used for querying target transaction data of the target account in the set time period, the target transaction data comprises target transaction running data and a target account balance, and the target account balance is the balance of the target account after the last transaction is completed in the set time period.
For example, after a certain user a connects to the block chain B by using a notebook computer, a target account to be queried is firstly input and is represented by a1 for the account of the user a, and the set time period is from 24 days 2 months and 12 months in 2019 (2019.2.12: 24) to 24 days 13 months and 2 months in 2019 (2019.2.13: 24), then a balance query button is clicked, so that the notebook computer receives a balance query operation, and then the balance query operation is responded, and a balance query request is generated; and then sending the balance inquiry request to a server so that the server acquires the balance inquiry request, wherein the target account carried by the balance inquiry request is A1, and the set time period carried by the balance inquiry request is 2019.2.12:24-2019.2.13: 24.
In this embodiment of the present specification, a target user corresponding to a target account may send a balance inquiry request, or other users related to the target user may send balance inquiry requests, where the other users related to the target user may be users having a transaction with the target user, or users having an affinity with the target user, and the affinity may be, for example, friends, classmates, relatives, and the like, and this specification is not limited specifically.
After the balance inquiry request is obtained, step S104 is executed, a storage block for storing the target transaction running data may be determined from the block chain according to the target account and the set time period carried in the balance inquiry request, and the determined storage block is used as the target block; and acquiring target transaction flow data from the target block.
If the block chain stores the balance of the target account after each transaction, the balance of the target account after the last transaction is completed in a set time period can be directly obtained from the block chain, and the obtained balance is used as the balance of the target account; if the balance of the target account after each transaction is stored in the block chain, the balance of the target account can be determined according to the data of the target account after the previous account checking and the target transaction flow data.
Specifically, the balance inquiry request may be analyzed to obtain a target account and a set time period carried in the balance inquiry request; determining a storage block for storing the target transaction running data from the block chain according to the target account and the set time period, and taking the determined storage block as a target block; the target transaction pipeline data is then read from the target block.
Specifically, in the process of determining a storage block for storing target transaction running data from a block chain according to a target account and a set time period, firstly, a unique identifier of the target account in the block chain can be obtained, and a storage block set of all transaction data of the target account is determined according to the unique identifier; determining a target block from the storage block set according to a set time period; and finally, reading target transaction flow data from the target block.
In the embodiment of the present specification, the target block may include 1 or more memory blocks, and a plurality in the embodiment of the present specification means 2 or more, for example, integers greater than 1, such as 2, 4, 10, and 20.
For example, referring to fig. 2, a balance inquiry request is obtained, where a unique identifier corresponding to a target account user1 carried in the balance inquiry request is 1001, and according to 1001, a block set for storing all transaction data of 1001 is determined from a block chain and includes block0, block1, block2, block3, block4, block5 and block n, and then according to a set time period in the balance inquiry request, since the start time of the set time period is the time of the last transaction data stored 1001 of block2, and the end time is the time of the last transaction data stored of 1001 in block5, it can be known that the target blocks are block3, block4 and block5, and all transaction running data of 1001 are obtained from block3, block4 and block5 as target transaction running data, specifically, data in texts tx31, tx41 and tx 51. Wherein the arrows of the one-way arrow 20 in fig. 2 point to characterize that data is written into the corresponding blocks sequentially over time.
And if the block chain stores the balance data of each transaction of the user1, directly reading 1001 the balance after the last transaction in the block5 from the block chain as the balance of the target account, and expressing the balance in balance 1; if the balance data of each transaction of the user1 is not stored in the block chain, the target account balance can be determined through the balance after the previous account checking of the user1 and the target transaction flow data, the data after the previous account checking of the user1 is the data after account checking is performed on the transaction data of the user1 stored in the block2 and is represented by last1, and the balance after the previous account checking of the user1 is obtained from last 1.
The method comprises the following steps that block3, block4 and block5 further store transaction data of a user2 and transaction data of a user3, the unique identifier corresponding to the user2 is 1002, and the unique identifier corresponding to the user3 is 1003; in this way, when the target account is user2, the data in tx32, tx42 and tx52 are also acquired from block3, block4 and block5 as target transaction running data; when the target account is user3, obtaining data in tx33, tx43 and tx53 from block3, block4 and block5 as target transaction running data; and then, acquiring the balance of the target account by adopting the method.
After the target transaction flow data is acquired, step S106 is executed to first determine an external transaction database for storing the transaction flow data of the target account, then acquire all transaction flow data of the target user in a set time period from the external transaction database as external transaction flow data, and acquire a balance of the target account after the last transaction is completed in the set time period from the external transaction database as an external account balance.
In this embodiment of the present specification, step S106 may be executed simultaneously with step S104, or may be executed before step S104 is executed, and this specification is not particularly limited.
Specifically, an external transaction database for storing transaction data of the target account is determined according to the target account, and then external transaction running data and external account balance are obtained from the external transaction database.
For example, a balance inquiry request is obtained, wherein a target account user1 carried in the balance inquiry request obtains an external transaction database db1 for storing transaction data of ues1 according to user1, then obtains all transaction flow data of the user1 in a set time period from db1 according to the set time period, and writes the transaction flow data into tx1, and obtains the balance of the external account represented by balance 2.
After the target transaction running data, the target account balance, the external transaction running data, and the external account balance are acquired, step S108 is executed, and a fund check is performed using the target transaction running data, the target account balance, the external transaction running data, and the external account balance.
Specifically, the target transaction running water data and the external transaction running water data can be compared to obtain a transaction comparison result; comparing the balance of the target account with the balance of the external account to obtain a balance comparison result; and checking the fund according to the transaction comparison result and the balance comparison result.
Specifically, after fund checking is performed according to the transaction comparison result and the balance comparison result, if the transaction comparison result represents that the target transaction flow data is consistent with the external transaction flow data, and the balance comparison result represents that the target balance is consistent with the external balance, the fund checking is judged to be successful; otherwise, the fund check is judged to be wrong.
Specifically, if the target balance is consistent with the external balance and the target transaction running water data is inconsistent with the external transaction running water data, it may be determined that the running water is abnormal, and at this time, the transaction running water data may be manually audited; if the target balance is inconsistent with the external balance and the target transaction running water data is consistent with the external transaction running water data, judging that the block chain has a leak, and adjusting the block chain again according to the leak; if the target balance is inconsistent with the external balance and the target transaction flow data is inconsistent with the external transaction flow data, the situation may be caused by reasons that the business of the target account is incomplete, the transaction flow falls in the previous or next reconciliation interval, and the like, at this time, manual reconciliation may be performed, and a specific solution thereof may be that if the reconciliation is not flat due to actual loopholes and other business misalignment, the account needs to be leveled after the business logic needs to be modified; and if the missing running water problem exists, analyzing the missing running water, and submitting the upper chain again, and if the excessive running water exists, generating a reverse transaction by the running water, and submitting the upper chain.
For example, if the unique identifier corresponding to the target account user1 carried in the balance inquiry request is 1001, all transaction flow data of 1001 are acquired from block3, block4 and block5 and serve as target transaction flow data, specifically data in texts tx31, tx41 and tx 51; and obtaining target account balance as balance 1; acquiring all transaction flow data of a user1 in a set time period from db1, writing the transaction flow data into tx1, and acquiring the balance of an external account as balance 2; comparing the data in tx31, tx41 and tx51 with the data in tx1 to obtain a transaction comparison result; comparing balance1 with balance2 to obtain a balance comparison result; and then, checking the fund according to the transaction comparison result and the balance comparison result.
And in the process of fund checking, if the balance in balance1 and balance2 is the same and the target transaction pipelining data and the external transaction pipelining data are consistent, the successful fund checking can be judged; if the balance in balance1 and balance2 is the same and the target transaction running water data is inconsistent with the external transaction running water data, it may be determined that the running water is abnormal, at this time, multiple transaction running water different from the external transaction running water data may exist in the target transaction running water data, for example, compared with the external transaction running water data, two more transaction running water are added to the target transaction running water data, which are +10 and-10 respectively, and at this time, the balance in balance1 and balance2 is the same and the target transaction running water data is inconsistent with the external transaction running water data; at this time, it is necessary to audit a plurality of transaction streams in which the target transaction stream data is different from the external transaction stream data. And after the auditing is finished, if different multiple transactions are not generated, reverse transactions are required to be carried out according to different multiple transactions and the uplink is submitted. And after the reverse transaction uplink, re-checking the external account and the target account by using the steps S102 to S108. And after the auditing is finished, if different multi-transaction running flows occur, adding different multi-transaction running flows into the external transaction running flow data, and then checking account by using the external transaction running flow data added with different multi-transaction running flows.
If the balance in balance1 and balance2 is different and the target transaction flow data and the external transaction flow data are consistent, it can be determined that a block chain has a leak, at this time, it may be caused by an error in the mapping relationship between the external account and the target account, at this time, the block chain will re-determine the mapping relationship between the target account and the external account, and obtain the external transaction flow data and the balance of the external account according to the determined external account; and then checking account again by using the confirmed external account and the target account. Of course, it may also be that there is a part of the running water of the target account that is not submitted for uplink, re-analyzing all the transaction running water of the target account in a set time period, analyzing the missing running water and re-submitting the running water to uplink to the blockchain; and re-checking the external account and the target account by using the steps S102 to S108 after the missing serial chain is linked to the blockchain. Of course, there may be redundant flow in the target transaction flow data, that is, the target transaction flow data has some more flow than all the transaction flow of the target account in the set time period, for example, the target transaction flow data includes a1, a2, a3 and a4, while all the transaction flow of the target account in the set time period includes only a1, a2 and a3, and the redundant flow a4 is the redundant flow, and at this time, the reverse transaction needs to be generated and submitted according to the redundant flow. And after the reverse transaction uplink, re-checking the external account and the target account by using the steps S102 to S108.
And if the balances in balance1 and balance2 are different and the target transaction running water data and the external transaction running water data are not consistent, it may be determined that the fund reconciliation is incorrect, at this time, the running water in the set time period may be in the previous reconciliation time period or the next reconciliation time period, therefore, the blockchain may obtain the target transaction running water data and the target transaction balance from the blockchain again according to the set time period, so as to obtain the transaction running water which is not obtained last time and is in the set time period from the previous reconciliation time period or the next reconciliation time period, and obtain the re-obtained target transaction running water data, for example, there is an interval of 3 milliseconds between the set time period and the previous reconciliation time period, and there are 1 or more transactions in the interval of 3 milliseconds, and the re-obtained target transaction running water data may include 1 or more transaction running water in the interval of 3 milliseconds; and then, the obtained target transaction flow data and the target transaction balance are used for reconciliation. Of course, if the balances in balance1 and balance2 are different and the target transaction running water data and the external transaction running water data are not consistent, manual reconciliation can also be directly performed.
Since the blockchain technique generally has the following 4 features, one of which is decentralized; secondly, as the block chain is a distributed network architecture, no central node can be attacked or attacked, so that the block chain has stronger stability, reliability and continuity in the aspect of overall technical arrangement; thirdly, a strong safety and consensus mechanism does not need the intervention of a third party; fourthly, the public transparency and the non-tamper property of the transaction are achieved; therefore, the transaction flow data of the target account is stored in the block chain, the problems of non-falsification and traceability are solved in a decentralized mode, the accuracy of the transaction flow data stored in the block chain can be effectively ensured, and the transaction flow data stored in the block chain is used for checking account on the basis of ensuring the accuracy of the transaction flow data stored in the block chain, so that the accuracy of the account checking can be improved.
In addition, in the process of acquiring the target transaction running data and the target account balance from the target block, simple payment verification (SPV for short) can be performed on the target transaction running data and the target account balance, wherein in the process of performing SPV verification on each transaction running data in the target transaction running data, whether each transaction running data is verified or not is determined through SPV verification, and a verification confirmation number is obtained when verification is performed; for each transaction data, the SPV verification process specifically comprises the steps that the SPV node calculates the transaction hash value of the transaction data; the SPV node acquires and stores all block header information of the longest chain from the block chain and stores the information to the local; the SPV node acquires a Mercker tree hash authentication path corresponding to the transaction data from the block chain; calculating the root hash value of the Mercker tree according to the hash authentication path, comparing the calculation result with the root hash value of the Mercker tree in the local block head, and positioning to a block containing payment to be verified; and determining the number of confirmed blocks for which the payment is obtained according to the position of the block head.
Thus, through the above manner, SPV verification can be performed on each transaction pipeline data in the target transaction pipeline data, and if each transaction pipeline data in the target transaction pipeline data passes SPV verification, it can be ensured that each transaction pipeline data in the target transaction pipeline data really exists, and when each transaction pipeline data in the target transaction pipeline data is verified to really exist, reliability of the target transaction pipeline data can be ensured.
Correspondingly, the SPV verification method can be adopted to verify the balance of the target account, if the balance of the target account passes the SPV verification, the balance of the target account can be ensured to be truly existed, and the reliability of the balance of the target account can be ensured when the balance of the target account is verified to be truly existed.
Thus, under the condition that the reliability of the target transaction running data and the target account balance acquired from the target block is ensured, the checking accuracy can be effectively improved when the target transaction running data and the target account balance are used for checking accounts.
In this embodiment of the present description, in the process of performing fund checking by using the target transaction running data and the target account balance, the target transaction running data and the target account balance may be divided into a plurality of parts, and each divided part performs the fund checking in one node in the block chain, so that the fund checking is concurrently performed on the target transaction running data and the target account balance by using the plurality of nodes in the block chain, and the fund checking effect is improved.
For example, the target transaction running data and the target account balance may be divided into 4 parts of data, and the 4 parts of data are respectively subjected to reconciliation processing on 4 nodes in the block chain, so that the 4 parts of data can be subjected to concurrent reconciliation processing, and the fund checking efficiency is improved.
Of course, in the process of fund checking by using the target transaction flow data and the target account balance, fund checking can be performed on the target transaction flow data and the target account balance by using a distributed system connected with a block chain. Before the distributed system is used for fund checking on the target transaction running data and the target account balance, the blockchain can authenticate the distributed system in advance, so that the distributed system has the authority to perform data interaction with the blockchain, after the authentication of the distributed system is passed, the distributed system can read the target transaction running data and the target account balance from the blockchain, then divide the target transaction running data and the target account balance into a plurality of parts, send each divided part to different nodes in the distributed system for reconciliation, and improve the efficiency of fund checking in a concurrent reconciliation mode.
Of course, in the process of fund check by using the target transaction flow data and the target account balance, a plurality of electronic devices connected with the blockchain can be used for fund check on the target transaction flow data and the target account balance concurrently. Before the multiple electronic devices are used for fund checking on the target transaction running data and the target account balance, the blockchain can authenticate each electronic device in the multiple electronic devices in advance, so that each electronic device has the authority to perform data interaction with the blockchain, and thus after the authentication of each electronic device is passed, each electronic device can read corresponding partial target transaction running data and partial target account balance data from the blockchain, then the multiple electronic devices perform reconciliation on the corresponding partial target transaction running data and partial target account balance data concurrently, and the fund checking efficiency is improved in a manner of concurrent reconciliation.
In a second aspect, based on the same technical concept, embodiments of the present specification provide a fund checking apparatus based on a block chain, referring to fig. 3, including:
a request obtaining unit 301, configured to obtain a balance inquiry request of a target account in a set time period;
a target transaction flow acquiring unit 302, configured to acquire target transaction flow data of the target account in the set time period and a target account balance from a target block in a block chain according to the balance query request;
an external transaction flow acquiring unit 303, configured to acquire external transaction flow data of the target account in the set time period and an external account balance from an external transaction database;
a fund checking unit 304, configured to perform fund checking using the target transaction flow data, the target account balance, the external transaction flow data, and the external account balance.
In an optional implementation manner, the target transaction flow acquiring unit 302 is configured to determine, according to the target account and the set time period carried in the balance inquiry request, a storage block used for storing the target transaction flow data from the block chain, and use the determined storage block as the target block; and acquiring the target transaction flow data from the target block.
In an alternative embodiment, the set time period may be a time period corresponding to 1 or more memory blocks in the block chain.
In an optional embodiment, the fund checking unit 304 is configured to compare the target transaction flow data with the external transaction flow data to obtain a transaction comparison result; comparing the balance of the target account with the balance of the external account to obtain a balance comparison result; and checking funds according to the transaction comparison result and the balance comparison result.
In an alternative embodiment, the apparatus further comprises:
a checking result processing unit, configured to, after performing fund checking according to the transaction comparison result and the balance comparison result, determine that the fund checking is successful if the transaction comparison result represents that the target transaction flow data and the external transaction flow data are consistent, and the balance comparison result represents that the target balance and the external balance are consistent; otherwise, the fund check is judged to be wrong.
In a third aspect, based on the same inventive concept as the block chain based fund checking method in the foregoing embodiments, an embodiment of the present specification further provides an electronic device, as shown in fig. 4, including a memory 404, a processor 402, and a computer program stored on the memory 404 and operable on the processor 402, where the processor 402 implements the steps of any one of the block chain based fund checking methods described above when executing the program.
Where in fig. 4 a bus architecture (represented by bus 400) is shown, bus 400 may include any number of interconnected buses and bridges, and bus 400 links together various circuits including one or more processors, represented by processor 402, and memory, represented by memory 404. The bus 400 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 405 provides an interface between the bus 400 and the receiver 401 and transmitter 403. The receiver 401 and the transmitter 403 may be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 402 is responsible for managing the bus 400 and general processing, while the memory 404 may be used for storing data used by the processor 402 in performing operations.
In a fourth aspect, based on the inventive concept of the block chain based fund checking method in the foregoing embodiments, the present specification further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of any one of the block chain based fund checking methods described above.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present specification have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all changes and modifications that fall within the scope of the specification.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present specification without departing from the spirit and scope of the specification. Thus, if such modifications and variations of the present specification fall within the scope of the claims of the present specification and their equivalents, the specification is intended to include such modifications and variations.

Claims (12)

1. A blockchain-based fund checking method comprising:
acquiring a balance inquiry request of a target account in a set time period;
according to the balance inquiry request, acquiring target transaction running data of the target account in the set time period and the balance of the target account from a target block in a block chain;
acquiring external transaction running data of the target account in the set time period and external account balance from an external transaction database;
and performing fund checking by using the target transaction flow data, the target account balance, the external transaction flow data and the external account balance.
2. The method of claim 1, wherein the obtaining target transaction flow data for the target account for the set time period from a target block in a blockchain according to the balance inquiry request comprises:
determining a storage block for storing the target transaction running data from the block chain according to the target account and the set time period carried in the balance inquiry request, and taking the determined storage block as the target block;
and acquiring the target transaction flow data from the target block.
3. The method according to claim 1 or 2, wherein the set time period is a time period corresponding to one or more memory blocks in the block chain.
4. The method of claim 1, the reconciling funds with the target transaction flow data, the target account balance, the external transaction flow data, and the external account balance, comprising:
comparing the target transaction flow data with the external transaction flow data to obtain a transaction comparison result;
comparing the balance of the target account with the balance of the external account to obtain a balance comparison result;
and checking funds according to the transaction comparison result and the balance comparison result.
5. The method of claim 4, after a fund check is performed based on the transaction comparison and the balance comparison, the method further comprising:
if the transaction comparison result represents that the target transaction flow data is consistent with the external transaction flow data, and the balance comparison result represents that the target balance is consistent with the external balance, the fund check is judged to be successful; otherwise, the fund check is judged to be wrong.
6. A blockchain-based fund checking apparatus comprising:
the request acquisition unit is used for acquiring a balance inquiry request of a target account in a set time period;
the target transaction flow acquiring unit is used for acquiring target transaction flow data of the target account in the set time period and the balance of the target account from a target block in a block chain according to the balance inquiry request;
the external transaction flow acquisition unit is used for acquiring external transaction flow data of the target account in the set time period and external account balance from an external transaction database;
and the fund checking unit is used for performing fund checking by utilizing the target transaction flow data, the target account balance, the external transaction flow data and the external account balance.
7. The apparatus according to claim 6, wherein the target transaction flow acquiring unit is configured to determine, according to the target account and the set time period carried in the balance inquiry request, a storage block for storing the target transaction flow data from the block chain, and use the determined storage block as the target block; and acquiring the target transaction flow data from the target block.
8. The apparatus according to claim 6 or 7, wherein the set time period is a time period corresponding to one or more memory blocks in the block chain.
9. The apparatus according to claim 6, wherein the fund checking unit is configured to compare the target transaction flow data with the external transaction flow data to obtain a transaction comparison result; comparing the balance of the target account with the balance of the external account to obtain a balance comparison result; and checking funds according to the transaction comparison result and the balance comparison result.
10. The apparatus of claim 9, further comprising:
a checking result processing unit, configured to, after performing fund checking according to the transaction comparison result and the balance comparison result, determine that the fund checking is successful if the transaction comparison result represents that the target transaction flow data and the external transaction flow data are consistent, and the balance comparison result represents that the target balance and the external balance are consistent; otherwise, the fund check is judged to be wrong.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1-5 when executing the program.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010281296.4A 2020-04-10 2020-04-10 Block chain-based fund checking method and device, electronic equipment and medium Pending CN111192147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010281296.4A CN111192147A (en) 2020-04-10 2020-04-10 Block chain-based fund checking method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010281296.4A CN111192147A (en) 2020-04-10 2020-04-10 Block chain-based fund checking method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN111192147A true CN111192147A (en) 2020-05-22

Family

ID=70710321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010281296.4A Pending CN111192147A (en) 2020-04-10 2020-04-10 Block chain-based fund checking method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN111192147A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680064A (en) * 2020-05-25 2020-09-18 泰康保险集团股份有限公司 Annual fund balance information query method and device
CN111861481A (en) * 2020-09-22 2020-10-30 支付宝(杭州)信息技术有限公司 Block chain account checking method and system
CN112115498A (en) * 2020-09-28 2020-12-22 上海申铁信息工程有限公司 Block chain-based data access authority control method and device
WO2022127674A1 (en) * 2020-12-17 2022-06-23 网联清算有限公司 Method for checking account limit, device, checking system, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107798109A (en) * 2017-11-01 2018-03-13 深圳市牛鼎丰科技有限公司 Method, apparatus, computer equipment and the storage medium of reconciliation clearance
CN108074177A (en) * 2017-12-05 2018-05-25 深圳前海微众银行股份有限公司 Data account checking method, system and computer readable storage medium
CN108171489A (en) * 2017-12-18 2018-06-15 深圳前海微众银行股份有限公司 Data liquidation method, system and computer readable storage medium
CN108537522A (en) * 2018-04-19 2018-09-14 北京天德科技有限公司 Account balance computational methods in a kind of block chain block
CN110070359A (en) * 2019-03-19 2019-07-30 阿里巴巴集团控股有限公司 Verification of data system, method, calculating equipment and storage medium based on block chain
WO2020023422A1 (en) * 2018-07-23 2020-01-30 Capital One Services, Llc System and apparatus for encrypted data collection using rfid cards

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107798109A (en) * 2017-11-01 2018-03-13 深圳市牛鼎丰科技有限公司 Method, apparatus, computer equipment and the storage medium of reconciliation clearance
CN108074177A (en) * 2017-12-05 2018-05-25 深圳前海微众银行股份有限公司 Data account checking method, system and computer readable storage medium
CN108171489A (en) * 2017-12-18 2018-06-15 深圳前海微众银行股份有限公司 Data liquidation method, system and computer readable storage medium
CN108537522A (en) * 2018-04-19 2018-09-14 北京天德科技有限公司 Account balance computational methods in a kind of block chain block
WO2020023422A1 (en) * 2018-07-23 2020-01-30 Capital One Services, Llc System and apparatus for encrypted data collection using rfid cards
CN110070359A (en) * 2019-03-19 2019-07-30 阿里巴巴集团控股有限公司 Verification of data system, method, calculating equipment and storage medium based on block chain

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680064A (en) * 2020-05-25 2020-09-18 泰康保险集团股份有限公司 Annual fund balance information query method and device
CN111861481A (en) * 2020-09-22 2020-10-30 支付宝(杭州)信息技术有限公司 Block chain account checking method and system
CN112115498A (en) * 2020-09-28 2020-12-22 上海申铁信息工程有限公司 Block chain-based data access authority control method and device
CN112115498B (en) * 2020-09-28 2023-12-01 上海申铁信息工程有限公司 Data access authority control method and device based on blockchain
WO2022127674A1 (en) * 2020-12-17 2022-06-23 网联清算有限公司 Method for checking account limit, device, checking system, and storage medium

Similar Documents

Publication Publication Date Title
CN110263024B (en) Data processing method, terminal device and computer storage medium
CN111192147A (en) Block chain-based fund checking method and device, electronic equipment and medium
CN108389129B (en) Transaction execution method and device based on block chain and electronic equipment
US11004130B2 (en) Computer implemented method, an apparatus and a non transitory computer readable storage medium for verifying reviews on a blockchain
WO2020029630A1 (en) Transaction method and system based on centralized clearing and blockchain record keeping
CN110163755B (en) Block chain-based data compression and query method and device and electronic equipment
CN102855304A (en) Variable-clause electronic contract automatic generation method in business to customer (B2C) transaction
CN110060155B (en) Intelligent contract execution method and device of block chain and electronic equipment
US20230244656A1 (en) Blockchain-based systems and methods for communicating, storing and processing data over a blockchain network
TWI734217B (en) Block chain-based invoice redemption method and device and electronic equipment
US11841937B2 (en) Method and apparatus for a data confidence index
US10795882B2 (en) Blockchain-based data compression and searching
CN112561407B (en) Asset management method, system and device based on block chain
WO2018032982A1 (en) Method and device for detecting fund transaction route in electronic payment process
CN111506925A (en) Data processing system based on block chain
CN111125778A (en) Copyright transaction information processing method and device
WO2022199076A1 (en) Service processing method for multiple types of services, computer device, and storage medium
US20190295081A1 (en) System and Method for the Verification and Visualization of Subcomponents in a Product
KR20200000595A (en) Blockchain based certificate management method and device, server and system thereof
WO2022241945A1 (en) Data processing method and device, and computer-readable storage medium
CN113778950B (en) Method for acquiring trusted file, index server, query server and medium
Anderson et al. Standards and verification for fair-exchange and atomicity in e-commerce transactions
CN111724165A (en) Transaction evidence storage method and device based on block chain, electronic equipment and medium
US20240054484A1 (en) Reconciliation systems and methods for unbounded streams
CN115456778B (en) Bond block chain updating method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200522

RJ01 Rejection of invention patent application after publication