CN111125785A - Account checking method based on block chain, account checking device and readable storage medium - Google Patents

Account checking method based on block chain, account checking device and readable storage medium Download PDF

Info

Publication number
CN111125785A
CN111125785A CN201911351575.7A CN201911351575A CN111125785A CN 111125785 A CN111125785 A CN 111125785A CN 201911351575 A CN201911351575 A CN 201911351575A CN 111125785 A CN111125785 A CN 111125785A
Authority
CN
China
Prior art keywords
record
account
reconciliation
supply
purchase
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
CN201911351575.7A
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.)
Shenzhen Qianhai Star Tonghui Technology Co Ltd
Original Assignee
Shenzhen Qianhai Star Tonghui 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 Shenzhen Qianhai Star Tonghui Technology Co Ltd filed Critical Shenzhen Qianhai Star Tonghui Technology Co Ltd
Priority to CN201911351575.7A priority Critical patent/CN111125785A/en
Publication of CN111125785A publication Critical patent/CN111125785A/en
Priority to PCT/CN2020/134674 priority patent/WO2021129384A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The invention discloses a reconciliation method based on a block chain, which comprises the following steps: when a first account record sent by a block chain node is received, a second account record is obtained; comparing the first account record with the second account record; and when the first account record and the second account record are consistent, generating a reconciliation record according to the first account record and the second account record, and storing the reconciliation record. The invention also discloses a reconciliation device and a computer readable storage medium, which achieve the effect of improving the reconciliation efficiency.

Description

Account checking method based on block chain, account checking device and readable storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a reconciliation method, a reconciliation apparatus, and a computer-readable storage medium based on a block chain.
Background
With the development of electronic commerce, more and more trade orders are made in the form of online trading. In the existing reconciliation method, the account of a supplier and the account of a buyer are generally received after transaction, and manual reconciliation is adopted for reconciliation processing. The manual account checking consumes longer time, so that the account checking is not timely, and the defect of low account checking efficiency exists; when receiving the account of the supplier and the account of the buyer, a data transmission error or a malicious attack may occur, which causes an account checking data error, and has a disadvantage of low accuracy of the account checking result.
Disclosure of Invention
The invention mainly aims to provide a reconciliation method, a reconciliation device and a computer-readable storage medium based on a block chain, aiming at achieving the effect of improving the reconciliation efficiency.
In order to achieve the above object, the present invention provides a tie-out method based on a block chain, which includes the following steps:
when a first account record sent by a block chain node is received, a second account record is obtained;
comparing the first account record with the second account record;
and when the first account record and the second account record are consistent, generating a reconciliation record according to the first account record and the second account record, and storing the reconciliation record.
Optionally, the first account record is a procurement account record, and the second account record is a supply account record.
Optionally, the block chain-based reconciliation method further includes:
when a supply account record sent by the block chain node is received, acquiring a public key corresponding to the block chain node;
verifying the data signature of the supply account record according to the public key;
and when the verification is passed, storing the supply account record on a supply account book.
Optionally, the block chain-based reconciliation method further includes:
when a purchase account record sent by the block chain node is received, acquiring a public key corresponding to the block chain node;
verifying the data signature of the purchase account record according to the public key;
and when the verification is passed, storing the supply account record on a supply account book.
Optionally, the block chain-based reconciliation method further includes:
when the supply account record and the purchase account record are inconsistent, generating a hanging account record according to the supply account record and the purchase account record and storing the hanging account record;
and sending the account hanging record to other nodes in the block chain.
Optionally, the posting records include a supply posting record and a purchase posting record, and the block chain-based reconciliation method further includes:
when the supply account record is inconsistent with the purchase account record, acquiring a pre-stored account hanging record consistent with the order number of the purchase account record;
and when the pre-stored account hanging record is not acquired, executing the step of generating and storing an account hanging record according to the supply account record and the purchase account record.
Optionally, the block chain-based reconciliation method further includes:
when the pre-stored account hanging record is obtained, generating a supply account checking record according to the supply account hanging record and the supply account record;
generating a purchase reconciliation record according to the purchase reconciliation record and the purchase account record;
comparing the supply reconciliation record with the purchase reconciliation record;
and when the supply reconciliation record is inconsistent with the purchase reconciliation record, generating the journal record according to the supply reconciliation record and the purchase reconciliation record, and deleting the pre-stored journal record.
Optionally, after the step of comparing the supply reconciliation record with the purchase reconciliation record, the block chain-based reconciliation method further includes:
deleting the pre-stored account checking record when the supply account checking record is consistent with the purchase account checking record;
and generating and storing the reconciliation record according to the supply reconciliation record and the purchase reconciliation record.
Optionally, after the step of comparing the supply reconciliation record with the purchase reconciliation record, the block chain-based reconciliation method further includes:
when the supply reconciliation record is partially consistent with the purchase reconciliation record, generating and storing the reconciliation record according to the consistent part of the supply reconciliation record and the purchase reconciliation record;
and generating the journal log according to the inconsistent parts of the supply account checking record and the purchase account checking record, and deleting the pre-stored journal log.
Optionally, after the step of sending the account log to other nodes in the block chain, the method further includes:
acquiring a supplier corresponding to the account registration record and contact information corresponding to a buyer;
and sending the account hanging record to a middle terminal corresponding to the contact information.
Optionally, the tie-out method based on the blockchain further includes:
receiving a query instruction of an account record, and outputting the account record corresponding to the query instruction, wherein the account record can be a supply account record, a purchase account record, a warehouse record and a financial record receiving and paying record and/or a positive and negative action record;
and/or receiving an inquiry instruction of the account checking record, and outputting the account checking record corresponding to the inquiry instruction.
In addition, in order to achieve the above object, the present invention further provides an account checking device, including: the system comprises a memory, a processor and a reconciliation program stored on the memory and capable of running on the processor, wherein the reconciliation program realizes the block chain based reconciliation method.
Furthermore, to achieve the above object, the present invention also provides a computer readable storage medium, which stores a reconciliation program, wherein the reconciliation program, when executed by a processor, implements the steps of the block chain based reconciliation method as described above.
According to the reconciliation method, the reconciliation device and the computer-readable storage medium based on the block chain, when a first account record sent by a node of the block chain is received, a second account record is obtained, then the first account record and the second account record are compared, and when the first account record and the second account record are consistent, the reconciliation record is generated according to the first account record and the second account record and is stored. After receiving the first account record, acquiring a second account record, then performing account checking according to preset account checking logic, and automatically performing account checking after receiving the first account record, thereby achieving the effect of improving the account checking efficiency; due to the fact that the block link data are not capable of being tampered, the account checking data are obtained through the block link nodes, the situation that the account checking data are wrong due to data transmission errors and malicious attacks is avoided, and therefore the effect of improving the correctness of the account checking result is achieved.
Drawings
FIG. 1 is a schematic diagram of a terminal hardware architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an embodiment of a block chain-based reconciliation method according to the present invention;
fig. 3 is a flowchart illustrating a reconciliation method based on a blockchain according to another embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The existing account checking method generally receives an account of a supplier and an account of a buyer after transaction, and adopts a manual account checking mode to perform account checking processing. The manual account checking consumes longer time, so that the account checking is not timely, and the defect of low account checking efficiency exists.
In order to solve the foregoing drawbacks, an embodiment of the present invention provides a tie-out method, a tie-out device and a computer-readable storage medium based on a block chain, where the tie-out method based on the block chain mainly includes the following steps:
when a first account record sent by a block chain node is received, a second account record is obtained;
comparing the first account record with the second account record;
and when the first account record and the second account record are consistent, generating a reconciliation record according to the first account record and the second account record, and storing the reconciliation record.
After the purchase account record is received, the supply account record is acquired, account checking processing is performed according to preset account checking logic, and the account checking processing is automatically performed after the first account record is received, so that the effect of improving the account checking efficiency is achieved; due to the fact that the block link data are not capable of being tampered, the account checking data are obtained through the block link nodes, the situation that the account checking data are wrong due to data transmission errors and malicious attacks is avoided, and therefore the effect of improving the correctness of the account checking result is achieved.
As shown in fig. 1, fig. 1 is a schematic diagram of a hardware architecture of a terminal according to an embodiment of the present invention.
The terminal is a terminal device corresponding to any node in the block chain, and the terminal can be a terminal device such as a PC.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a user interface 1003, a network interface 1004, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may comprise a Display screen (Display), an input unit such as a keyboard, etc., and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a reconciliation program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005 and perform the following operations:
when a first account record sent by a block chain node is received, a second account record is obtained;
comparing the first account record with the second account record;
and when the first account record and the second account record are consistent, generating a reconciliation record according to the first account record and the second account record, and storing the reconciliation record.
Further, the first account record is a procurement account record, and the second account record is a supply account record.
Further, the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005, and further perform the following operations:
when a supply account record sent by the block chain node is received, acquiring a public key corresponding to the block chain node;
verifying the data signature of the supply account record according to the public key;
and when the verification is passed, storing the supply account record on a supply account book.
Further, the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005, and further perform the following operations:
when a purchase account record sent by the block chain node is received, acquiring a public key corresponding to the block chain node;
verifying the data signature of the purchase account record according to the public key;
and when the verification is passed, storing the supply account record on a supply account book.
Further, the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005, and further perform the following operations:
when the supply account record and the purchase account record are inconsistent, generating a hanging account record according to the supply account record and the purchase account record and storing the hanging account record;
and sending the account hanging record to other nodes in the block chain.
Further, the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005, and further perform the following operations:
when the supply account record is inconsistent with the purchase account record, acquiring a pre-stored account hanging record consistent with the order number of the purchase account record;
and when the pre-stored account hanging record is not acquired, executing the step of generating and storing an account hanging record according to the supply account record and the purchase account record.
Further, the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005, and further perform the following operations:
when the pre-stored account hanging record is obtained, generating a supply account checking record according to the supply account hanging record and the supply account record;
generating a purchase reconciliation record according to the purchase reconciliation record and the purchase account record;
comparing the supply reconciliation record with the purchase reconciliation record;
and when the supply reconciliation record is inconsistent with the purchase reconciliation record, generating the journal record according to the supply reconciliation record and the purchase reconciliation record, and deleting the pre-stored journal record.
Further, the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005, and further perform the following operations:
deleting the pre-stored account checking record when the supply account checking record is consistent with the purchase account checking record;
and generating and storing the reconciliation record according to the supply reconciliation record and the purchase reconciliation record.
Further, the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005, and further perform the following operations:
when the supply reconciliation record is partially consistent with the purchase reconciliation record, generating and storing the reconciliation record according to the consistent part of the supply reconciliation record and the purchase reconciliation record;
and generating the journal log according to the inconsistent parts of the supply account checking record and the purchase account checking record, and deleting the pre-stored journal log.
Further, the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005, and further perform the following operations:
acquiring a supplier corresponding to the account registration record and contact information corresponding to a buyer;
and sending the account hanging record to a middle terminal corresponding to the contact information.
Further, the processor 1001 may be configured to invoke a reconciliation program stored in the memory 1005, and further perform the following operations:
receiving a query instruction of an account record, and outputting the account record corresponding to the query instruction, wherein the account record can be a supply account record, a purchase account record, a warehouse record and a financial record, a receipt and payment record and/or a positive and negative action record;
and/or receiving an inquiry instruction of the account checking record, and outputting the account checking record corresponding to the inquiry instruction.
Referring to fig. 2, in an embodiment of the block chain based reconciliation method of the present invention, the block chain based reconciliation method includes the following steps:
step S10, when a first account record sent by a block chain node is received, a second account record is obtained;
step S20, comparing the first account record with the second account record;
and step S30, when the first account record and the second account record are consistent, generating a reconciliation record according to the first account record and the second account record, and storing the reconciliation record.
In this embodiment, the blockchain node is a computer in a blockchain network where the node is located, for example, a smart phone or a desktop computer; the first account record may be any one of a procurement account record, a supply account record, a warehouse record, and a financial record; the second account record is any one of a procurement account record, a supply account record, a warehouse record, and a financial record that is different from the first account record.
The defined blockchain node may also generate the first account record and/or the second account record when receiving the first account record and/or the second account record sent by other nodes of the blockchain.
Limiting the node to send the first account record and/or the second account record to other nodes when the node generates the first account record and/or the second account record; and all nodes of the block chain network where the node is located execute account checking operation when receiving the first account record.
It should be noted that a block link point may connect multiple sub-nodes, where a block link point may be a terminal device corresponding to a certain company, and a block link sub-node may be a terminal device corresponding to a certain department in a certain company. When a first account record or a second account record is generated, the block chain sub-node uploads the relevant data of the account of the sub-node to the block chain network, and finally all the relevant data of the account are collected into the block chain link point to generate the first account record or the second account record. Illustratively, the purchasing department uploads the order number, commodity name, commodity unit price, commodity quantity, transaction amount, order status, etc. of the purchasing account record; the sales department uploads order number, commodity name, commodity unit price, commodity quantity, transaction amount, order state and the like recorded by a supply account; order number, commodity name, commodity quantity, commodity unit price, collected or paid amount, order state and the like of the financial records uploaded by the financial department; the warehouse management department uploads order numbers, commodity names, ex-warehouse quantity/in-warehouse quantity, commodity unit prices, transaction amount, order states and the like recorded by the warehouse.
When the first account record is a purchase account record and the second account record is a supply account record, the processor acquires the supply account record without account checking from the supply account book stored in the memory of the node when receiving the purchase account record sent by the blockchain node, and compares the supply account record with the purchase account record.
When comparing the supply account record with the purchase account record, the order number, commodity name, commodity quantity, commodity unit price, transaction amount, order state and other fields of the supply account record and the purchase account record can be compared one by one to determine whether the fields of the transaction information are consistent. When the supply account record and the purchase account record do not have inconsistent fields, judging that the supply account record and the purchase account record are consistent; and when the fields of the supply account record and the purchase account record are inconsistent, judging that the supply account record and the purchase account record are inconsistent.
And marking the account checking of the supply account record when the comparison of the supply account record and the purchase account record is finished.
When the supply account record and the purchase account record are consistent, acquiring comparison end time, and generating an account checking record according to the supply account record and the purchase account record, wherein the account checking record may include: and the reconciliation time, the order number, the commodity name, the commodity quantity, the commodity unit price, the transaction amount, the order state and other fields recording the transaction information are stored on the block chain.
In the technical scheme disclosed in this embodiment, after the purchase account record is received, the supply account record is acquired, account checking processing is performed according to preset account checking logic, and the account checking processing is automatically performed after the purchase account record is received, so that the effect of improving the account checking efficiency is achieved; due to the fact that the block link data are not capable of being tampered, the account checking data are obtained through the block link nodes, the situation that the account checking data are wrong due to data transmission errors and malicious attacks is avoided, and therefore the effect of improving the correctness of the account checking result is achieved; due to the characteristics of multi-party writing, common maintenance, account book disclosure and neutralization removal of the block chain, the node can be any node in the block chain, all nodes in the block chain network where the node is located keep the same account book, and the account book is disclosed for all nodes in the block chain, so that the block chain does not depend on a single trust center in the block chain network, trust among participants can be created by the block chain, and each node is a trust carrier.
Optionally, in this embodiment, since the first account record may be a purchase account record and the second account record may be a warehouse record, the reconciliation record is generated according to the comparison result between the purchase account record and the warehouse record, and is saved.
Illustratively, the order number A, the item name B, and the item quantity C recorded in the purchase account1Commodity unit price D and transaction amount E1Order status F, and warehouse recorded order number A, commodity name B, and warehousing quantity C2Commodity unit price D and amount of committed transaction E2And in the order state F, when fields which are inconsistent exist in the purchase account record and the warehouse record, the order number A, the commodity name B and the warehousing quantity C are recorded1-C2Commodity unit price D and amount of committed transaction E1-E2And the order state F is used as a reconciliation result.
And determining commodity data which are not received by the buyer through obtaining account checking results of the purchase account records and the warehouse records.
Optionally, in this embodiment, since the first account record may be a supply account record and the second account record may be a financial record, a reconciliation record is generated according to a comparison result between the supply account record and the financial record, and the reconciliation record is saved.
Illustratively, the order number A, the product name B, and the product quantity C recorded in the supply account1Commodity unit price D and transaction amount E1Order status F, and financial record order number A, product name B, and product quantity C2Commodity unit price D and received money E2When the order is in the order state F, the order number A, the commodity name B,Number of commodities C1-C2Commodity unit price D and amount of committed transaction E1-E2And the order state F is used as a reconciliation result.
Determining unpaid merchandise data of the buyer by obtaining reconciliation results of the supply account record and the financial record.
Optionally, in this embodiment, since the first account record may be a purchase account record and the second account record may be a financial record, a reconciliation record is generated according to a comparison result between the purchase account record and the financial record, and the reconciliation record is saved.
Illustratively, the order number A, the item name B, and the item quantity C recorded in the purchase account1Commodity unit price D and transaction amount E1Order status F, and financial record order number A, product name B, and product quantity C2Price per unit D, paid amount E2When the order is in the state of F, the order number A, the commodity name B and the commodity quantity C are set1-C2Commodity unit price D and amount of committed transaction E1-E2And the order state F is used as a reconciliation result.
And determining commodity data which are not supplied by the supplier by obtaining the reconciliation result of the purchase account record and the financial record.
Optionally, in this embodiment, when the first account record or the second account record is a supply account record, in order to improve reliability of the reconciliation result, the supply account record may further include a digital signature, where the digital signature is a section of digital string that cannot be forged and is used for verifying authenticity of the account record, a hash value is generated by performing a hash operation on the supply account record, and the hash value is encrypted by using a private key of a node that sends the supply account record to generate the digital signature.
Therefore, when a data packet of a supply account record sent by a blockchain node is received, the public key of the blockchain node stored in the memory of the node is read, the digital signature of the supply account record is decrypted through the public key of the blockchain node to obtain a decrypted hash value, meanwhile, the supply account record is subjected to hash operation to obtain the hash value of the supply account record, whether the decrypted hash value is consistent with the hash value of the supply account record or not is compared, when the decrypted hash value is consistent with the hash value of the supply account record, the fact that the supply account record passes verification is judged, and the supply account record is stored in a supply account book stored in the memory of the node. The supply account book is a data chain storing supply transaction information achieving consensus in the block chain.
By verifying the digital signature of the supply account record, the subsequent account checking step is executed only when the verification is passed, thereby achieving the result of improving the reliability of the account checking result.
Optionally, in this embodiment, when the first account record or the second account record is a purchase account record, in order to improve reliability of the reconciliation result, the purchase account record may further include a digital signature.
Therefore, when a data packet of a purchase account record sent by a blockchain node is received, the public key of the blockchain node stored in the memory of the node is read, the digital signature of the purchase account record is decrypted through the public key of the blockchain node to obtain a decrypted hash value, meanwhile, the purchase account record is subjected to hash operation to obtain a hash value of the purchase account record, whether the decrypted hash value is consistent with the hash value of the purchase account record or not is compared, when the decrypted hash value is consistent with the hash value of the purchase account record, the fact that the purchase account record passes verification is judged, and the purchase account record is saved in an account book stored in the memory of the node. The purchase book is a data chain in which the agreed purchase transaction information is stored in the block chain.
By verifying the digital signature of the purchase account record, the subsequent account checking step is executed only when the verification is passed, so that the result of improving the reliability of the account checking result is achieved.
Optionally, in this embodiment, when the first account record is a purchase account record and the second account record is a supply account record, because there is an inconsistency between the supply account record and the purchase account record, when the supply account record and the purchase account record are inconsistent, a supply pending account record is generated according to the supply account record, a purchase pending account record is generated according to the purchase account record, and the supply pending account record and the purchase pending account are saved in the local node memory as pending account record records.
The method comprises the steps of obtaining a hanging account record stored in a memory of a node, carrying out Hash operation on the hanging account record to obtain a Hash value, encrypting the Hash value of the hanging account record by using a private key of the node, obtaining a digital signature of the hanging account record, obtaining the Hash value of a terminal block of the hanging account record prestored in a block chain, obtaining time for generating the hanging account record, packaging the digital signature, the Hash value of the terminal block, the time for generating the block and the hanging account record into a data packet, and broadcasting the data packet in a block chain network.
In the technical scheme disclosed in the embodiment, when the supply account record and the purchase account record are inconsistent, the account hanging record is generated and stored, and the effect of recording the account checking failure result is achieved.
Optionally, in this embodiment, when the first account record is a purchase account record and the second account record is a supply account record, since there may be a pending account record in the blockchain that is flat with the purchase account record, when the supply account record and the purchase account record are inconsistent, a pre-stored pending account record consistent with the order number of the purchase account record is obtained, where the pre-stored pending account record may be the supply pending account record or the purchase pending account record. And generating a supply reconciliation record according to the supply ledger record and the supply account record, and generating a supply reconciliation record according to the supply ledger record and the supply account record.
For the step of generating a supply statement record according to the supply statement record and the supply account record, illustratively, the order number a and the commodity name B of the supply statement record can be obtained1Quantity of commodities C1Commodity unit price D1Transaction amount E1Order status F1Obtaining order number A and commodity name B of supply account record2Quantity of commodities C2Commodity unit price D2Transaction amount E2Order status F2. Under the name of commodity B1And B2When the order number A and the commodity name B are consistent with each other, the order number A and the commodity name B are combined1Quantity of commodities C1+C2Commodity unit price D1Transaction amount E1+E2Order status F1And F2As a supply reconciliation record; under the name of commodity B1And B2If they are not consistent, the order number A and the commodity name B are added1And B2Quantity of commodities C1And C2Commodity unit price D1And D2Transaction amount E1+E2Order status F1And F2As a supply reconciliation record.
And comparing whether the supply reconciliation record is consistent with the purchase reconciliation record. And when the inconsistent fields do not exist in the supply reconciliation record and the purchase reconciliation record, judging that the supply reconciliation record and the purchase reconciliation record are consistent. And when the supply reconciliation record is consistent with the purchase reconciliation record, acquiring comparison ending time, generating a reconciliation record according to the supply reconciliation record and the purchase reconciliation record, storing the reconciliation record on the block chain, and deleting the pre-stored reconciliation record of the local node memory.
The account checking processing is carried out according to the account hanging record, the material supply account record and the purchase account record which are pre-stored in the block chain, and the account hanging record is deleted when the pre-stored account hanging record, the material supply account record and the purchase account record are leveled, so that the effect of account cancellation is achieved.
Optionally, in this embodiment, when the first account record is a procurement account record and the second account record is a supply account record, since there may be no pre-stored account book in the block chain that is consistent with the order number of the account record, when no pre-stored account book is acquired that is consistent with the order number of the procurement account record, an account checking record is generated according to the part of the supply account record and the procurement account record that are successful in account checking, and the account checking record is stored on the block chain; and generating a journal log according to the part of the supply account record and the purchase account record which fail to account, and storing the journal log in a memory of the node.
Illustratively, the supply account record is: order number A, commodity name B, commodity number C1Commodity unit price D and transaction amount E1Order status F, purchase account record is: order number A,Name of commodity B, number of commodities C2Commodity unit price D and transaction amount E2And an order status F. Then the part of the supply account record and the first purchase account record which are successfully checked are: order number A, commodity name B, commodity number C1Commodity unit price D and transaction amount E1The order state F, the partial supply account record of account checking failure is: order number A, commodity name B, commodity number C2-C1Commodity unit price D and transaction amount E2-E1And an order status F.
By carrying out account checking processing on the account records with account checking failure, the account checking records can be carried out according to the account checking records when new account records are received, and the condition of account checking errors is reduced.
Optionally, in this embodiment, when the first account record is a purchase account record and the second account record is a supply account record, since there may be a case that the supply reconciliation record and the purchase reconciliation record are inconsistent, when there is no consistent field except for the order number in the supply reconciliation record and the purchase reconciliation record, it is determined that the supply reconciliation record and the purchase reconciliation record are inconsistent. And taking the supply reconciliation record as a supply posting record and storing the supply reconciliation record, taking the purchase reconciliation record as a purchase posting record and storing the purchase reconciliation record, and deleting the pre-stored posting record.
Illustratively, in the supply reconciliation record: order number A and commodity name B1Quantity of commodities C1Commodity unit price D1Transaction amount E1Order status F1And the purchasing account record is as follows: order number A and commodity name B2Quantity of commodities C2Commodity unit price D2Transaction amount E2Order status F2And judging that the supply reconciliation record is inconsistent with the purchase reconciliation record.
And updating the account hanging record stored in the block chain by deleting the pre-stored account hanging record, and storing the supply account checking record and the purchase account checking record.
Optionally, in this embodiment, when the first account record is a purchase account record and the second account record is a supply account record, since there may be a case that the supply reconciliation record and the purchase account record partially coincide, where the partial coincidence means that there is a non-uniform field in the supply reconciliation record and the purchase reconciliation record, when there is a non-uniform field in the supply reconciliation record and the purchase reconciliation record, it is determined that the supply reconciliation record and the purchase reconciliation record partially coincide. And saving the consistent part of the supply and reconciliation records in a supply and accounting book of a memory of the node, saving the consistent part of the purchase reconciliation records in a purchase accounting book of the memory of the node, taking the inconsistent part of the supply and reconciliation records and the inconsistent part of the purchase reconciliation records as the journal records, deleting the pre-stored journal records of the memory of the node, and saving the journal records in the memory of the node.
Illustratively, the supply reconciliation record is an order number A, a commodity name B1And B2Quantity of commodities C1And C2Commodity unit price D1And D2Transaction amount E1Order state F, purchase account checking record as order number A and commodity name B1Quantity of commodities C1Commodity unit price D1Transaction amount E2The order state F; the consistent partial supply and purchase reconciliation records are the order number A and the commodity name B1Quantity of commodities C1Commodity unit price D1Transaction amount E2The order state F; the inconsistent partial supply reconciliation records are an order number A and a commodity name B2Quantity of commodities C2Commodity unit price D2Transaction amount E1-E2And an order status F.
By storing the consistent partial account checking records, the inconsistent partial account checking records are stored as the account hanging records, and the effect of partial account cancellation is achieved.
Optionally, in this embodiment, when the first account record is a purchase account record and the second account record is a supply account record, in order to notify that the reconciliation results of the supplier and the buyer do not match, the node may be provided with a merchant contact information database, where the merchant contact information database may be a database in which contact manners such as a merchant name, a merchant code, an IP address, a mailbox address, and a telephone number are stored. In receiving the account record sent by the blockchain node, the supply account record may further include a supplier merchant code, and the purchase account record may further include a purchaser merchant code. After generating the account registration record, acquiring contact information of the supplier in a merchant contact information database according to a merchant code of the supplier, and acquiring contact information of the buyer in the merchant contact information database according to a merchant code of the buyer, wherein the contact information can be contact ways such as an IP address and a mailbox address. For example, when the contact information is an IP address, the accounting record is packaged into a data packet based on a network communication protocol, and the data packet is sent to the corresponding IP address.
By pre-storing the contact information, the contact information of the merchant is acquired when the account-hanging record is generated, and the account-hanging record is sent to the merchant, so that the condition of informing the supplier and the purchaser is achieved.
Optionally, referring to fig. 3, based on the foregoing embodiment, in another embodiment, the block chain-based reconciliation method further includes the following steps:
step S40, receiving an inquiry instruction of an account record, and outputting an account record corresponding to the inquiry instruction, wherein the account record can be a supply account record, a purchase account record, a warehouse record and a financial record, a receipt and payment record and/or a positive and negative action record;
and S50, receiving an inquiry command of the account checking record, and outputting the account checking record corresponding to the inquiry command.
In this embodiment, the query instruction is a query statement for controlling the reconciliation device to output data corresponding to the instruction according to the query instruction, and may be a query statement for querying account records, or a query statement for querying reconciliation records.
When receiving an inquiry command of an account record, outputting the account record corresponding to the inquiry command; and when an inquiry instruction of the account checking record is received, outputting the account checking record corresponding to the inquiry instruction, and displaying the account checking record in an inquiry page of the system.
Illustratively, when the query instruction is to query an account record with an order number of A in the supply account record, the order number, the commodity name, the commodity unit price, the commodity quantity, the transaction amount, the order state and the like of the supply account record with the order number of A are output. When the inquiry command is to inquire about the reconciliation record with the trade name B in the reconciliation record, the reconciliation time, the order number, the commodity name, the commodity unit price, the commodity quantity, the transaction amount, the order state and the like of the reconciliation record with the trade name B are output.
In the technical scheme disclosed in this embodiment, the reconciliation device is further provided with an inquiry function, and provides services for inquiring account records and reconciliation records.
In addition, an embodiment of the present invention further provides a reconciliation apparatus, where the reconciliation apparatus includes a memory, a processor, and a reconciliation program stored on the memory and executable on the processor, and when the reconciliation program is executed by the processor, the steps of the block chain-based reconciliation method according to the above embodiments are implemented.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a reconciliation program is stored, and when being executed by a processor, the reconciliation program implements the steps of the block chain-based reconciliation method according to the above embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above and includes several instructions for enabling a terminal device (e.g. PC, etc.) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (13)

1. A tie-out method based on a block chain is characterized by comprising the following steps:
when a first account record sent by a block chain node is received, a second account record is obtained;
comparing the first account record with the second account record;
and when the first account record and the second account record are consistent, generating a reconciliation record according to the first account record and the second account record, and storing the reconciliation record.
2. The blockchain-based reconciliation method of claim 1 wherein the first account record is a procurement account record and the second account record is a sourcing account record.
3. The blockchain based reconciliation method of claim 2 wherein the blockchain based reconciliation method further comprises:
when a supply account record sent by the block chain node is received, acquiring a public key corresponding to the block chain node;
verifying the data signature of the supply account record according to the public key;
and when the verification is passed, storing the supply account record on a supply account book.
4. The blockchain based reconciliation method of claim 2 wherein the blockchain based reconciliation method further comprises:
when a purchase account record sent by the block chain node is received, acquiring a public key corresponding to the block chain node;
verifying the data signature of the purchase account record according to the public key;
and when the verification is passed, storing the supply account record on a supply account book.
5. The blockchain based reconciliation method of claim 2 wherein the blockchain based reconciliation method further comprises:
when the supply account record and the purchase account record are inconsistent, generating a hanging account record according to the supply account record and the purchase account record and storing the hanging account record;
and sending the account hanging record to other nodes in the block chain.
6. The blockchain-based reconciliation method of claim 5 wherein the journal record comprises a sourcing journal record and a purchasing journal record, the blockchain-based reconciliation method further comprising:
when the supply account record is inconsistent with the purchase account record, acquiring a pre-stored account hanging record consistent with the order number of the purchase account record;
and when the pre-stored account hanging record is not acquired, executing the step of generating and storing an account hanging record according to the supply account record and the purchase account record.
7. The blockchain based reconciliation method of claim 6 further comprising:
when the pre-stored account hanging record is obtained, generating a supply account checking record according to the supply account hanging record and the supply account record;
generating a purchase reconciliation record according to the purchase reconciliation record and the purchase account record;
comparing the supply reconciliation record with the purchase reconciliation record;
and when the supply reconciliation record is inconsistent with the purchase reconciliation record, generating the journal record according to the supply reconciliation record and the purchase reconciliation record, and deleting the pre-stored journal record.
8. The blockchain-based reconciliation method of claim 7 wherein after the step of comparing the sourcing reconciliation record to the purchasing reconciliation record, the blockchain-based reconciliation method further comprises:
deleting the pre-stored account checking record when the supply account checking record is consistent with the purchase account checking record;
and generating and storing the reconciliation record according to the supply reconciliation record and the purchase reconciliation record.
9. The blockchain-based reconciliation method of claim 7 wherein after the step of comparing the sourcing reconciliation record to the purchasing reconciliation record, the blockchain-based reconciliation method further comprises:
when the supply reconciliation record is partially consistent with the purchase reconciliation record, generating and storing the reconciliation record according to the consistent part of the supply reconciliation record and the purchase reconciliation record;
and generating the journal log according to the inconsistent parts of the supply account checking record and the purchase account checking record, and deleting the pre-stored journal log.
10. The blockchain-based reconciliation method of claim 5 wherein the step of sending the accounting record to other nodes in the blockchain is followed by further comprising:
acquiring a supplier corresponding to the account registration record and contact information corresponding to a buyer;
and sending the account hanging record to a middle terminal corresponding to the contact information.
11. The blockchain-based reconciliation method of claim 1 further comprising:
receiving a query instruction of an account record, and outputting the account record corresponding to the query instruction, wherein the account record can be a supply account record, a purchase account record, a warehouse record and a financial record, a receipt and payment record and/or a positive and negative action record;
and/or receiving an inquiry instruction of the account checking record, and outputting the account checking record corresponding to the inquiry instruction.
12. A reconciliation apparatus, comprising: a memory, a processor, and a tie-out program stored on the memory and executable on the processor, the tie-out program when executed by the processor implementing the steps of the blockchain based tie-out method of any of claims 1 to 11.
13. A computer-readable storage medium, having stored thereon a reconciliation program which, when executed by a processor, implements the steps of the blockchain based reconciliation method of any one of claims 1 to 11.
CN201911351575.7A 2019-12-23 2019-12-23 Account checking method based on block chain, account checking device and readable storage medium Pending CN111125785A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911351575.7A CN111125785A (en) 2019-12-23 2019-12-23 Account checking method based on block chain, account checking device and readable storage medium
PCT/CN2020/134674 WO2021129384A1 (en) 2019-12-23 2020-12-08 Account checking method based on blockchain, account checking apparatus, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911351575.7A CN111125785A (en) 2019-12-23 2019-12-23 Account checking method based on block chain, account checking device and readable storage medium

Publications (1)

Publication Number Publication Date
CN111125785A true CN111125785A (en) 2020-05-08

Family

ID=70502184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911351575.7A Pending CN111125785A (en) 2019-12-23 2019-12-23 Account checking method based on block chain, account checking device and readable storage medium

Country Status (2)

Country Link
CN (1) CN111125785A (en)
WO (1) WO2021129384A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861481A (en) * 2020-09-22 2020-10-30 支付宝(杭州)信息技术有限公司 Block chain account checking method and system
WO2021129384A1 (en) * 2019-12-23 2021-07-01 深圳前海星际同辉科技有限公司 Account checking method based on blockchain, account checking apparatus, and readable storage medium
WO2022028621A1 (en) * 2020-08-07 2022-02-10 深圳前海星际同辉科技有限公司 Transaction information management method and apparatus, and device and computer-readable storage medium
CN117333184A (en) * 2023-09-20 2024-01-02 金网络(北京)数字科技有限公司 Supply chain reconciliation method, system and storage medium based on blockchain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596622A (en) * 2018-05-02 2018-09-28 北京链链信息技术有限公司 The shared system and method for Transaction Information
CN108776929A (en) * 2018-04-02 2018-11-09 成都云创智融科技有限公司 Bill processing method, system based on block chain database and readable storage medium storing program for executing
CN109003175A (en) * 2018-07-06 2018-12-14 国网汇通金财(北京)信息科技有限公司 A kind of account checking method and system based on block chain
CN110322348A (en) * 2019-06-03 2019-10-11 阿里巴巴集团控股有限公司 Reconciliation system, method, apparatus and electronic equipment based on block chain

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7653457B2 (en) * 2001-03-16 2010-01-26 Breakthrough Logistics Corporation Method and system for efficient package delivery and storage
CN111125785A (en) * 2019-12-23 2020-05-08 深圳前海星际同辉科技有限公司 Account checking method based on block chain, account checking device and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776929A (en) * 2018-04-02 2018-11-09 成都云创智融科技有限公司 Bill processing method, system based on block chain database and readable storage medium storing program for executing
CN108596622A (en) * 2018-05-02 2018-09-28 北京链链信息技术有限公司 The shared system and method for Transaction Information
CN109003175A (en) * 2018-07-06 2018-12-14 国网汇通金财(北京)信息科技有限公司 A kind of account checking method and system based on block chain
CN110322348A (en) * 2019-06-03 2019-10-11 阿里巴巴集团控股有限公司 Reconciliation system, method, apparatus and electronic equipment based on block chain

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021129384A1 (en) * 2019-12-23 2021-07-01 深圳前海星际同辉科技有限公司 Account checking method based on blockchain, account checking apparatus, and readable storage medium
WO2022028621A1 (en) * 2020-08-07 2022-02-10 深圳前海星际同辉科技有限公司 Transaction information management method and apparatus, and device and computer-readable storage medium
CN111861481A (en) * 2020-09-22 2020-10-30 支付宝(杭州)信息技术有限公司 Block chain account checking method and system
CN117333184A (en) * 2023-09-20 2024-01-02 金网络(北京)数字科技有限公司 Supply chain reconciliation method, system and storage medium based on blockchain

Also Published As

Publication number Publication date
WO2021129384A1 (en) 2021-07-01

Similar Documents

Publication Publication Date Title
CN110945554B (en) Registry Blockchain Architecture
US11256799B2 (en) Device lifecycle distributed ledger
CN111125785A (en) Account checking method based on block chain, account checking device and readable storage medium
US20220311599A1 (en) Digital Ledger For Unique Item IDs With Ownership
US20050182684A1 (en) Method and system for economical e-commerce shopping token for validation of online transactions
US20130030823A1 (en) Electronic receipt management
WO2001088789A1 (en) Order processing system and method
JP4492914B2 (en) Transaction management method and program
US11907985B2 (en) Network, method, and non-transitory computer-readable medium for certification of vendors using distributed ledger technology
CN110599207A (en) Invoice verification method, invoice verification device, invoice verification server and storage medium
EP3485447A1 (en) System, device, and method for capturing and managing point of sale transaction related data
CN111680989A (en) Online transaction account system and online transaction method
CN110599273B (en) Data processing method, data processing device, node equipment and storage medium
JP4396490B2 (en) Name identification control method
CN110599322A (en) Data auditing method and device based on block chain network
US20230334609A1 (en) Information management method and non-transitory, computer readable, tangible storage medium storing information management program
JP2008310510A (en) Merchandise authentication system and merchandise authentication method
CN111311277A (en) Bill processing method and device based on block chain network and related equipment
JP2021536639A (en) Advanced methods, systems and devices for registering information in databases
US11694202B2 (en) Transaction certification management system, transaction certification management apparatus, and transaction certification processing method
TWI420410B (en) Consumer information processing device and method thereof, and computer program product for storing electronic invoice program
US11847136B2 (en) Systems and methods for distributed entity tracking
US20230267543A1 (en) Trackable product interest system and method
CN112418878B (en) Rights service data processing method, device, equipment and storage medium
CN113469758B (en) Billing method, device, equipment and storage medium of blockchain and tax system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508