CN110009338B - Accounting method and device based on block chain and electronic equipment - Google Patents

Accounting method and device based on block chain and electronic equipment Download PDF

Info

Publication number
CN110009338B
CN110009338B CN201811589616.1A CN201811589616A CN110009338B CN 110009338 B CN110009338 B CN 110009338B CN 201811589616 A CN201811589616 A CN 201811589616A CN 110009338 B CN110009338 B CN 110009338B
Authority
CN
China
Prior art keywords
accounting
account
transaction
node
block chain
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.)
Active
Application number
CN201811589616.1A
Other languages
Chinese (zh)
Other versions
CN110009338A (en
Inventor
刘悦斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201811589616.1A priority Critical patent/CN110009338B/en
Publication of CN110009338A publication Critical patent/CN110009338A/en
Priority to TW108136534A priority patent/TWI724574B/en
Priority to PCT/CN2019/122535 priority patent/WO2020134895A1/en
Application granted granted Critical
Publication of CN110009338B publication Critical patent/CN110009338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a block chain-based accounting method and device and a machine-readable storage medium. In this application, the blockchain includes at least one general account billing node and a plurality of branch account billing nodes as member nodes of the blockchain, and the method includes: the account-based accounting node receives an accounting transaction initiated by a transaction initiator; the accounting transaction comprises account detail records related to accounting business corresponding to the account-dividing accounting nodes; synchronizing the accounting transaction to other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction; and responding to the notification message that the bookkeeping transaction consensus passes, and recording the sub-account detail in the distributed account book of the block chain for storage so that the general account bookkeeping node performs sub-account summarization based on the distributed account book of the block chain to generate a general account, thereby realizing that the general account bookkeeping node can complete general account statistics without checking with the sub-account bookkeeping node.

Description

Accounting method and device based on block chain and electronic equipment
Technical Field
One or more embodiments of the present disclosure relate to the field of block chain technologies, and in particular, to a block chain-based accounting method and apparatus, and an electronic device.
Background
The block chain technology, also called distributed ledger technology, is an emerging technology in which several computing devices participate in "accounting" together, and a complete distributed database is maintained together. The blockchain technology has been widely used in many fields due to its characteristics of decentralization, transparency, participation of each computing device in database records, and rapid data synchronization between computing devices.
Disclosure of Invention
The description provides an accounting method based on a block chain, wherein the block chain comprises at least one general account accounting node and a plurality of branch account accounting nodes which are taken as member nodes of the block chain; wherein, each account node corresponds to different types of accounting service, the method comprises:
the account-based accounting node receives an accounting transaction initiated by a transaction initiator; the accounting transaction comprises account detail records related to accounting business corresponding to the account-dividing accounting nodes;
synchronizing the accounting transaction to other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction;
and responding to the notification message that the bookkeeping transaction consensus passes, recording the sub-account detail in the distributed account book of the block chain for storage, so that the general account node performs sub-account collection based on the distributed account book of the block chain to generate a general account.
Optionally, the accounting transaction includes a service identifier indicating a type of an accounting service corresponding to the accounting transaction; before synchronizing the accounting transaction with other accounting nodes in the blockchain, the method further comprises:
and if the service identification is different from the accounting service type corresponding to the account-keeping node, the account-keeping node does not accept and process the transaction, and broadcasts the accounting transaction in the block chain.
Optionally, the method further includes:
and if the block chain fails to agree with the accounting transaction, returning a notification message of accounting failure to the transaction initiator.
Optionally, the block chain is a federation chain.
Optionally, the consensus algorithm carried by the block chain is a PBFT algorithm.
The application also provides an accounting device based on the block chain, wherein the block chain comprises at least one general account accounting node and a plurality of branch account accounting nodes which are taken as member nodes of the block chain; wherein, each account book node of branch account book corresponds the account book business of different grade type respectively, the device includes:
the acquisition module is used for receiving the accounting transaction initiated by the transaction initiator by the account-based accounting node; the accounting transaction comprises account detail records related to accounting business corresponding to the account-dividing accounting nodes;
the accounting module is used for synchronizing the accounting transaction with other accounting nodes in the block chain so as to initiate consensus processing for the accounting transaction; and the sub-account detail record is stored in the distributed account book of the block chain in response to the notification message that the bookkeeping transaction consensus passes, so that the general account node performs sub-account collection based on the distributed account book of the block chain to generate a general account.
Optionally, the obtaining module further:
and if the service identification is different from the accounting service type corresponding to the account-keeping node, the account-keeping node does not accept and process the transaction, and broadcasts the accounting transaction in the block chain.
Optionally, the apparatus further comprises:
and the return module is used for returning a notification message of accounting failure to the transaction initiator if the block chain fails to identify the accounting transaction together.
Optionally, the block chain is a federation chain.
Optionally, the consensus algorithm carried by the block chain is a PBFT algorithm.
This specification also proposes an electronic device including:
a processor;
a memory for storing machine executable instructions;
wherein the processor is caused to:
the account-based accounting node receives an accounting transaction initiated by a transaction initiator; the accounting transaction comprises account detail records related to accounting business corresponding to the account-dividing accounting nodes;
synchronizing the accounting transaction to other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction;
and responding to the notification message that the bookkeeping transaction consensus passes, recording the sub-account detail in the distributed account book of the block chain for storage, so that the general account node performs sub-account collection based on the distributed account book of the block chain to generate a general account.
With the above embodiment, since the accounting transactions of the account-splitting accounts of different service types are stored in the blockchain, the accounting transactions include account-splitting account detail records related to the accounting service corresponding to the account-splitting account accounting node; in addition, in the accounting transaction process of the account accounts of different service types, synchronous accounting of the accounting information of the account accounts of the different service types stored in the block chain is introduced; therefore, the general ledger node and a plurality of sub-account ledger nodes of different service types share one set of sub-account ledger book, and the general ledger node is based on the locally stored copies of the sub-account ledger book, so that the problems of low speed, poor timeliness and inconsistent data when the general ledger is checked with the plurality of sub-account ledgers of different service types can be fundamentally solved, and single-point data loss or malicious tampering can be avoided due to multi-node distributed storage of the sub-account ledger book.
Drawings
Fig. 1 is a flowchart of a block chain-based billing method according to an exemplary embodiment.
FIG. 2 is an architecture diagram of a federation chain provided by an exemplary embodiment.
Fig. 3 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
Fig. 4 is a block diagram of an apparatus for block chain based billing according to an exemplary embodiment.
Detailed Description
In some scenes of accounting, when a user summarizes the general ledger, the general ledger is generally obtained based on detail data generated by the detail ledger, wherein the general ledger is also called a general ledger and is an account book classified and registered according to the state-specified accounting subjects, and the general ledger can comprehensively and comprehensively reflect and record capital movement and financial balance caused by economic business and provide data support for compiling accounting statements.
The itemized account in general practice uses an account-based account. The account-splitting account is one of the detailed accounts, is a detailed record of each subject of the general account, and is also a basis for checking accounts with units. Since the general ledger contains a plurality of subjects, the general ledger data summarized by the general ledger node may be derived from a plurality of types of branch ledger nodes.
In one scenario, when a sub-account node of a certain type generates a detail flow, it is notified to the general ledger node in an asynchronous message. In the actual transmission process of the message, due to the fact that the network environment is abnormal, the situations of delay, loss, disorder and the like can occur in the process of the message reaching the general ledger node, and therefore general ledger summary errors are caused; in another scenario, when some type of sub-account data is tampered maliciously, the general account summary error is caused, and the general account (the general account and various types of sub-account data) check data is inconsistent.
Based on this, in this specification, a technical solution is provided, in which different types of accounting transaction requests are processed and synchronized on a blockchain based on a general ledger accounting node and different types of individual ledger accounting nodes, and an accounted transaction including different types of individual ledger particulars is recorded in a distributed ledger of the blockchain and stored, so that the general ledger accounting node generates a general ledger based on the collection of the distributed ledger, thereby avoiding a traditional single-point fault of the individual ledger and inconsistency of general ledger checking data.
In implementation, the general ledger accounting node may no longer be only a single node, but be composed of a general ledger cluster composed of a plurality of nodes. The account-based accounting node can be no longer only a single node supporting a certain service type, but also a group of account-based accounting nodes consisting of a plurality of devices supporting the service type, and the devices in the group can share the same private key or each device can independently maintain a private key, and the private key is used for encrypting the accounting transaction. The service type cluster is responsible for receiving an accounting transaction which is initiated by a transaction initiator and corresponds to the service type, wherein the accounting transaction comprises account detail records related to the accounting service corresponding to the account detail records; in a blockchain network, there are multiple split-account clusters that support different traffic types.
For example, the ledger accounting node is actually a ledger cluster consisting of 3 devices. The account-dividing accounting node supporting the deposit business type is a deposit account-dividing cluster consisting of 5 devices; the sub-account accounting node supporting the loan service type is a loan sub-account cluster consisting of 7 devices; the account-based accounting node supporting the virtual account service type is a virtual account-based accounting cluster formed by 9 devices. The account node for supporting the deposit service account is responsible for receiving an account transaction of the deposit service initiated by a transaction initiator, wherein the account transaction comprises at least one deposit detail record, such as: deposit account name, deposit amount, account balance.
When the deposit business account-dividing and accounting node receives the storage accounting transaction, the accounting transaction is synchronized with other accounting nodes in the block chain, and the other accounting nodes may be a general account accounting node and an account-dividing and accounting node supporting other business types, for example: the loan account division and accounting node and the virtual account division and accounting node are connected; in this scenario, the other accounting nodes decrypt the storage accounting transaction based on the public key corresponding to the private key of the deposit accounting node, obtain the storage accounting transaction, initiate consensus processing on the storage accounting transaction, and determine the effectiveness of the accounting transaction. The consensus algorithm and the specific consensus process used are not described in detail in this specification, and those skilled in the art can refer to the description in the related art when implementing the technical solutions described in this specification. For example, for a federation chain, an algorithm such as the PBFT algorithm, or other similar consensus algorithm, may be employed.
And after the other accounting nodes recognize the deposit accounting transaction, sending a notification message to the deposit service account splitting and accounting node. Based on the requirement of the adopted consensus algorithm, if the consensus passes, the deposit business account and keeping node records the deposit account and keeping transaction details contained in the deposit account and keeping transaction institute in the distributed account book of the block chain for storage. And after the deposit sub-account details are stored in the distributed account book of the block chain, the general account node performs sub-account book collection based on the distributed account book to generate a general account.
For example: the distributed account book of the block chain records deposit sub-account details, loan sub-account details and virtual account sub-account details; and the general ledger accounting node summarizes the three branch account details to generate the general ledger.
In the above technical solution, since the accounting transactions of the account-splitting accounts of different service types are stored in the blockchain, the accounting transactions include account-splitting account detail records related to the accounting service corresponding to the account-splitting account accounting node; in addition, in the accounting transaction process of the account accounts of different service types, synchronous accounting of the accounting information of the account accounts of the different service types stored in the block chain is introduced; therefore, the general ledger node and a plurality of sub-account ledger nodes of different service types share one set of sub-account ledger book, and the general ledger node is based on the locally stored copies of the sub-account ledger book, so that the problems of low speed, poor timeliness and inconsistent data when the general ledger is checked with the plurality of sub-account ledgers of different service types can be fundamentally solved, and single-point data loss or malicious tampering can be avoided due to multi-node distributed storage of the sub-account ledger book.
The present specification is described below with reference to specific embodiments and specific application scenarios.
Referring to fig. 1, fig. 1 is a block chain-based accounting method applied to a separate account accounting node according to an embodiment of the present disclosure; the block chain comprises at least one general account and accounting node and a plurality of branch account and accounting nodes which are taken as member nodes of the block chain; wherein, each account node corresponds to different types of accounting service, the method comprises the following steps:
102, receiving accounting transaction initiated by a transaction initiator; the accounting transaction comprises account detail records related to accounting business corresponding to the account-dividing accounting nodes;
step 104, synchronizing the accounting transaction with other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction;
and 106, responding to the notification message that the bookkeeping transaction consensus passes, recording the sub-account detail in the distributed account book of the block chain for storage, so that the general account node performs sub-account collection based on the distributed account book of the block chain to generate a general account.
The blockchain described in this specification may specifically include a private chain, a common chain, a federation chain, and the like, and is not particularly limited in this specification.
For example, in one scenario, the block chain may specifically be a federation chain formed by a plurality of account-based accounting nodes and general-account accounting nodes of different service types as federation members; the operator of the alliance chain can rely on the alliance chain to deploy the accounting business aiming at the accounting transaction initiated by the transaction initiator; and the above-described multiple sub-accounting nodes and general accounting nodes supporting different service types as coalition members can be used as one service node of the above-described accounting service. When the sub-account accounting node of a certain service type initiates synchronization to the accounting transaction of the service type in the block chain, if other accounting nodes achieve consensus to the accounting transaction, the other accounting nodes respond to the sub-account accounting node initiating the accounting transaction with the consensus success message, the sub-account accounting node corresponding to the accounting transaction initiates a distributed database in the alliance chain to store, and the uplink accounting of the accounting transaction is completed.
The sub-account bookkeeping nodes of different service types can only receive and process bookkeeping transactions of the service types, if the bookkeeping transactions are different from the bookkeeping service types corresponding to the sub-account bookkeeping nodes, the sub-account bookkeeping nodes do not accept and process the transactions, namely, the bookkeeping transactions correspond to the sub-account bookkeeping nodes, only have bookkeeping authority for the bookkeeping transactions of the service types, only can synchronously acquire and commonly identify the bookkeeping transactions of other service types for the bookkeeping transactions of other service types, and cannot initiate the operation of writing the first account into the distributed account book, and the general bookkeeping node cannot directly receive and process the bookkeeping transactions of any service type.
For example, in one embodiment shown, if the transaction type is different from the accounting type corresponding to the account-splitting accounting node, the account-splitting accounting node does not admit processing of the transaction, but broadcasts the accounting transaction in the blockchain. And if the account-based accounting node corresponding to the transaction type receives the transaction type, the account-based accounting node performs accounting service processing according to the methods described in the steps 102 to 106.
If the block chain fails to identify the accounting transaction together, the account-based accounting node returns an accounting failure notification message to the transaction initiator.
For example, in one embodiment shown, the blockchain is a federation chain, there are 3f +1 accounting nodes, where f is a positive integer; the consensus algorithm used for this blockchain piggybacking is PBFT. If the transaction agrees for less than 2f +1 nodes of the accounting transaction, which indicates that the transaction agrees is not passed, the account-splitting accounting node returns a notification message of accounting failure to the transaction initiator.
It should be noted that the accounting transaction described in this specification refers to a piece of data that is created by a transaction initiator of a certain type of account-based account through a client of a blockchain and needs to be finally issued to a distributed database of the blockchain, where the piece of data includes: accounting business type and individual account detail record.
Transactions in a blockchain, generally have a narrow sense of transaction and a broad sense of transaction score. A narrowly defined transaction refers to a transfer of value issued by a user to a blockchain; for example, in a conventional bitcoin blockchain network, the transaction may be a transfer initiated by the user in the blockchain. The broad transaction refers to a piece of business data with business intention, which is issued to the blockchain by a user; for example, an operator may build a federation chain based on actual business requirements, relying on the federation chain to deploy some other types of online businesses unrelated to value transfer (e.g., anti-counterfeiting business, house renting business, vehicle scheduling business, insurance claim settlement business, credit service, medical service, etc.), and in such federation chain, a transaction may be a business message or business request with a business intent issued by a user in the federation chain.
The following block chains are taken as union chains and comprise: taking the account-based accounting nodes and the general accounting nodes of a plurality of service types as examples, the technical scheme of the specification is explained in detail;
it should be emphasized that the above-mentioned account-based accounting nodes and general accounting nodes of multiple service types are only exemplary.
Referring to fig. 2, fig. 2 is an architecture diagram of a federation chain shown in this specification.
As shown in fig. 2, there are three service types of account-based accounting nodes and general accounting nodes, which can be joined into the federation chain as federation members, and issue accounting transactions generated by respective corresponding service types to the federation chain in the form of transactions, and after the transactions are processed by consensus of consensus nodes in the federation chain, store the transactions in a distributed database in the federation chain, and complete "uplink" storage of the accounting transactions.
With continued reference to fig. 2, in the present specification, the accounting transaction stored in the federation chain may specifically include three parts, namely, an account detail record of the accounting transaction, an accounting transaction type, and an accounting transaction summary.
In one embodiment shown, a type 1 account-splitting accounting node receives an accounting transaction of type 1 initiated by a transaction initiator; wherein the billing transaction comprises: the accounting transaction type is type 1, type 1 account detail record and the note account transaction abstract; the account node of the account book transaction summary of type 1 carries out signature acquisition based on the held private key; the type 1 account accounting node synchronizes the accounting transaction to other accounting nodes in the blockchain, such as: the type 2 and type 3 account-based accounting nodes and the general account accounting node are used for initiating consensus processing for the accounting transaction;
and if the other accounting nodes pass the consensus on the accounting transaction, the consensus passing notification message is sent to the accounting nodes of the type 1. Taking the block chain as a federation chain and the consensus algorithm used by the block chain piggyback as PBFT, there are 3f +1 accounting nodes, where f is a positive integer. If less than 2f +1 nodes agree on the transaction for the booked transaction, it is said that the agreement did not pass for the transaction. Such as: if the type 1 account-based node receives the notification message that the consensus of 2f +1 nodes is passed or exceeded, the consensus is passed for the transaction.
The sub-account book keeping node of type 1 records the sub-account details in the distributed account book of the block chain for storage, as shown in fig. 2, the sub-account book of type 1 is stored in the block chain, so that the general account keeping node carries out sub-account book collection based on the sub-account book of type 1 to generate a general account.
In one embodiment shown, a type 2 ledger accounting node receives type 2 accounting transactions initiated by a transaction initiator; wherein the billing transaction comprises: the accounting transaction type is type 2, type 2 account detail record and the note account transaction abstract; the account node of the account book transaction summary of type 2 carries out signature acquisition based on the held private key; the type 2 account accounting node synchronizes the accounting transaction to other accounting nodes in the blockchain, such as: the type 1 and type 3 account-based accounting nodes and the general account accounting node are used for initiating consensus processing for the accounting transaction;
taking the block chain as a federation chain and the consensus algorithm used by the block chain piggyback as PBFT, there are 3f +1 accounting nodes, where f is a positive integer. If less than 2f +1 nodes agree on the transaction for the booked transaction, it is said that the agreement did not pass for the transaction. Such as: if the type 2 account-based node does not receive the notification message that the 2f +1 node consensus is passed, the transaction consensus is not passed. And the type 2 account-making node returns a notification message of accounting failure to the transaction initiator.
In one embodiment shown, a type 3 ledger accounting node receives type 2 accounting transactions initiated by a transaction initiator; wherein the billing transaction comprises: the accounting transaction type is type 2 and type 2 account detail records; before synchronizing the accounting transaction with other accounting nodes in the block chain, the type 3 account accounting node acquires the transaction service type, which is service type 2, and is different from the accounting service type, i.e. type 3, corresponding to the type 3 account accounting node, so that the type 3 account accounting node does not accept and process the transaction, but broadcasts the accounting transaction in the block chain. If the type 2 sub-accounting node receives the transaction broadcast by the type 3 sub-accounting node, the type 2 sub-accounting node performs accounting service processing according to the method described in steps 102 to 106.
In one embodiment shown, the ledger accounting node receives type 3 accounting transactions initiated by the transaction initiator; wherein the billing transaction comprises: the accounting transaction type is type 3 and type 3 account detail records; the general ledger accounting node does not admit processing of the transaction, but broadcasts the accounting transaction in the blockchain. If the type 3 sub-accounting billing node receives the transaction broadcast by the general-account billing node, the type 3 sub-accounting billing node performs the billing service processing according to the method described in the steps 102 to 106.
In one embodiment, please refer to fig. 2, the distributed database in the blockchain stores: the type 1 sub-account book, the type 2 sub-account book and the type 3 sub-account book; the general ledger accounting node is used for summarizing the general ledger according to the accounting rules of the general ledger based on the type 1, type 2 and type 3 sub-account book copies of the local storage, and the accounting rules are not detailed one by one.
As can be seen from the above embodiments, in this specification, the accounting transactions corresponding to a certain service type and stored in the blockchain are stored in a distributed manner in a plurality of account nodes of the sub-accounts, and the general account node is in the blockchain, so that centralized and centralized storage of the account nodes of the sub-accounts of a single service type is not used, and a single-point failure of the service is avoided; changes of the branch account of any business type are synchronized to the distributed database of the block chain, and the data of the general account accounting node can quickly acquire the update of the branch account. The general ledger node and a plurality of sub-account ledger nodes of different business types share one set of sub-account ledger book, and the general ledger node is based on the locally stored copies of the sub-account ledger books, so that the problems of low speed, poor timeliness and inconsistent data when the general ledger is checked with the plurality of sub-account ledgers of different business types can be fundamentally solved, and single-point data loss or malicious tampering can be avoided due to multi-node distributed storage of the sub-account ledger books.
Corresponding to the above method embodiments, the present specification also provides an embodiment of a block chain based accounting device. The embodiment of the block chain based accounting device in the present specification can be applied to an electronic device. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 3, the hardware structure diagram of the electronic device where the block chain based accounting device of this specification is located is shown in fig. 3, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 3, the electronic device where the device is located in the embodiment may also include other hardware according to an actual function of the electronic device, which is not described again.
Fig. 4 is a block diagram of a block chain based billing apparatus according to an exemplary embodiment of the present disclosure.
Referring to fig. 4, the block chain based accounting device 40 may be applied to the electronic device shown in fig. 3; the block chain comprises at least one general account and accounting node and a plurality of branch account and accounting nodes which are taken as member nodes of the block chain; wherein, each account node corresponds to different types of accounting services; the device 40 comprises: an acquisition module 401, a billing module 402 and a return module 403.
An obtaining module 401, configured to receive, by an account-based accounting node, an accounting transaction initiated by a transaction initiator; the accounting transaction comprises account detail records related to accounting business corresponding to the account-dividing accounting nodes;
a billing module 402 for synchronizing the billing transaction to other billing nodes in the blockchain to initiate consensus processing for the billing transaction; and the sub-account detail record is stored in the distributed account book of the block chain in response to the notification message that the bookkeeping transaction consensus passes, so that the general account node performs sub-account collection based on the distributed account book of the block chain to generate a general account.
In this embodiment, the accounting transaction includes a service identifier indicating a type of an accounting service corresponding to the accounting transaction; before synchronizing the accounting transactions to other accounting nodes in the blockchain, the obtaining module 401 further:
and if the service identification is different from the accounting service type corresponding to the account-keeping node, the account-keeping node does not accept and process the transaction, and broadcasts the accounting transaction in the block chain.
In this embodiment, the apparatus 40 further includes:
a returning module 403, configured to return a notification message of the accounting failure to the transaction initiator if the block chain fails to agree with the accounting transaction.
In this embodiment, the block chain is a federation chain.
In this embodiment, the consensus algorithm carried by the block chain is a PBFT algorithm.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or modules illustrated in the above embodiments may be implemented by a computer chip or an entity, or by an article of manufacture with certain functionality. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
Corresponding to the method embodiment, the present specification also provides an embodiment of an electronic device. The electronic device includes: a processor and a memory for storing machine executable instructions; wherein the processor and the memory are typically interconnected by an internal bus. In other possible implementations, the device may also include an external interface to enable communication with other devices or components.
In this embodiment, the processor is caused to, by reading and executing machine executable instructions stored by the memory corresponding to control logic for blockchain based accounting:
the account-based accounting node receives an accounting transaction initiated by a transaction initiator; the accounting transaction comprises account detail records related to accounting business corresponding to the account-dividing accounting nodes; the block chain comprises at least one general account and accounting node and a plurality of branch account and accounting nodes which are taken as member nodes of the block chain; wherein, each account node corresponds to different types of accounting services;
synchronizing the accounting transaction to other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction;
and responding to the notification message that the bookkeeping transaction consensus passes, recording the sub-account detail in the distributed account book of the block chain for storage, so that the general account node performs sub-account collection based on the distributed account book of the block chain to generate a general account.
In this embodiment, the accounting transaction includes a service identifier indicating a type of an accounting service corresponding to the accounting transaction; before synchronizing the accounting transaction with other accounting nodes in the blockchain, the method further comprises:
and if the service identification is different from the accounting service type corresponding to the account-keeping node, the account-keeping node does not accept and process the transaction, and broadcasts the accounting transaction in the block chain.
In this embodiment, the processor is caused to, by reading and executing machine executable instructions stored by the memory corresponding to control logic for blockchain based accounting:
and if the block chain fails to agree with the accounting transaction, returning a notification message of accounting failure to the transaction initiator.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (7)

1. The accounting method based on the block chain is characterized in that the block chain comprises at least one general account accounting node and a plurality of branch account accounting nodes which are member nodes of the block chain; wherein, each account node corresponds to different types of accounting service, the method comprises:
the account-based accounting node receives an accounting transaction initiated by a transaction initiator; the accounting transaction comprises account detail records related to accounting services corresponding to the account-dividing accounting nodes and service identifications indicating types of the accounting services corresponding to the accounting transactions;
if the service identification is different from the accounting service type corresponding to the account-keeping node, the account-keeping node does not accept and process the transaction, and broadcasts the accounting transaction in the block chain;
synchronizing the accounting transaction with other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction and validity verification of the accounting transaction by the other accounting nodes; the other accounting nodes comprise other sub-account accounting and accounting nodes with accounting service types the same as the service identifications and the general account accounting and accounting node;
responding to the notification message that the bookkeeping transaction consensus passes and storing the sub-account detail records with different bookkeeping business types in the block chain into sub-account accounts corresponding to different bookkeeping business types after the legality verification of the bookkeeping transaction passes, so that the general account node performs sub-account summary to generate a general account based on locally stored sub-account book copies with different bookkeeping business types in the distributed accounts of the block chain.
2. The method of claim 1, further comprising:
and if the block chain fails to agree with the accounting transaction, returning a notification message of accounting failure to the transaction initiator.
3. The method of claim 1, wherein the blockchain is a federation chain.
4. The block chain-based accounting device is characterized in that the block chain comprises at least one general account accounting node and a plurality of branch account accounting nodes which are member nodes of the block chain; wherein, each account book node of branch account book corresponds the account book business of different grade type respectively, the device includes:
the acquisition module is used for receiving the accounting transaction initiated by the transaction initiator by the account-based accounting node; the accounting transaction comprises account detail records related to accounting services corresponding to the account-dividing accounting nodes and service identifications indicating types of the accounting services corresponding to the accounting transactions;
if the service identification is different from the accounting service type corresponding to the account-keeping node, the account-keeping node does not accept and process the transaction, and broadcasts the accounting transaction in the block chain;
the accounting module is used for synchronizing the accounting transaction with other accounting nodes in the block chain so as to initiate the legitimacy verification of the accounting transaction by the other accounting nodes aiming at the consensus processing of the accounting transaction; the other accounting nodes comprise other sub-account accounting and accounting nodes with accounting service types the same as the service identifications and the general account accounting and accounting node;
the accounting module is further used for responding to the notification message that the accounting transaction consensus passes and storing the sub-account details with different accounting service types in the distributed account book of the block chain into the sub-account book respectively corresponding to different accounting service types after the validity verification of the accounting transaction passes, so that the general account node performs sub-account collection to generate the general account based on locally stored sub-account book copies with different accounting service types in the distributed account book of the block chain.
5. The apparatus of claim 4, further comprising:
and the return module is used for returning a notification message of accounting failure to the transaction initiator if the block chain fails to identify the accounting transaction together.
6. The apparatus of claim 4, wherein the blockchain is a federation chain.
7. An electronic device, comprising:
a processor;
a memory for storing machine executable instructions;
the block chain comprises at least one general account and accounting node and a plurality of branch account and accounting nodes which are used as member nodes of the block chain; wherein, each account node corresponds to different types of accounting services; by reading and executing machine-executable instructions stored by the memory that correspond to control logic for blockchain-based accounting, the processor is caused to:
the account-based accounting node receives an accounting transaction initiated by a transaction initiator; the accounting transaction comprises account detail records related to accounting services corresponding to the account-dividing accounting nodes and service identifications indicating types of the accounting services corresponding to the accounting transactions;
if the service identification is different from the accounting service type corresponding to the account-keeping node, the account-keeping node does not accept and process the transaction, and broadcasts the accounting transaction in the block chain;
synchronizing the accounting transaction with other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction and validity verification of the accounting transaction by the other accounting nodes; the other accounting nodes comprise other sub-account accounting and accounting nodes with accounting service types the same as the service identifications and the general account accounting and accounting node;
responding to the notification message that the bookkeeping transaction consensus passes and storing the sub-account detail records with different bookkeeping business types in the block chain into sub-account accounts corresponding to different bookkeeping business types after the legality verification of the bookkeeping transaction passes, so that the general account node performs sub-account summary to generate a general account based on locally stored sub-account book copies with different bookkeeping business types in the distributed accounts of the block chain.
CN201811589616.1A 2018-12-25 2018-12-25 Accounting method and device based on block chain and electronic equipment Active CN110009338B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201811589616.1A CN110009338B (en) 2018-12-25 2018-12-25 Accounting method and device based on block chain and electronic equipment
TW108136534A TWI724574B (en) 2018-12-25 2019-10-09 Block chain-based accounting method and device, and electronic equipment
PCT/CN2019/122535 WO2020134895A1 (en) 2018-12-25 2019-12-03 Blockchain-based accounting method and apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811589616.1A CN110009338B (en) 2018-12-25 2018-12-25 Accounting method and device based on block chain and electronic equipment

Publications (2)

Publication Number Publication Date
CN110009338A CN110009338A (en) 2019-07-12
CN110009338B true CN110009338B (en) 2020-10-23

Family

ID=67165233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811589616.1A Active CN110009338B (en) 2018-12-25 2018-12-25 Accounting method and device based on block chain and electronic equipment

Country Status (3)

Country Link
CN (1) CN110009338B (en)
TW (1) TWI724574B (en)
WO (1) WO2020134895A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009338B (en) * 2018-12-25 2020-10-23 创新先进技术有限公司 Accounting method and device based on block chain and electronic equipment
CN110473106A (en) * 2019-08-21 2019-11-19 腾讯科技(深圳)有限公司 A kind of method and relevant apparatus of trading processing
CN110502927A (en) * 2019-08-27 2019-11-26 腾讯科技(深圳)有限公司 A kind of information processing method and relevant apparatus
CN110532270A (en) * 2019-08-30 2019-12-03 南京荣链科技有限公司 The associated data managing method of account book and its system
CN111191294B (en) * 2019-12-27 2022-05-24 诚镌科技(广州)有限公司 Single-node accounting method, system, equipment and storage medium based on block chain
CN111523988A (en) * 2020-03-20 2020-08-11 福建省农村信用社联合社 Method for realizing safe storage and whole-course trace retention of rural three-information by using block chain
CN111415160B (en) * 2020-04-27 2024-05-28 中国银行股份有限公司 Bill-off business processing method and system based on blockchain and relevant nodes
CN112020018B (en) * 2020-08-26 2022-05-17 山东浪潮科学研究院有限公司 Block chain accounting group generation method, consensus method and block chain system
CN112685412A (en) * 2020-12-28 2021-04-20 任涵 Material electronic standing book
CN113556405B (en) * 2021-09-18 2021-12-07 深圳时空云科技有限公司 Distributed management method and device for private information
CN114511321B (en) * 2022-01-14 2022-09-23 北京第五力科技有限公司 Point-to-point based data processing method, system, computing device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790431A (en) * 2016-12-05 2017-05-31 同济大学 Cloud manufacturing service Transaction Information record system and method based on block chain
CN106934611A (en) * 2017-03-21 2017-07-07 北京汇通金财信息科技有限公司 Data processing method and device

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101122991A (en) * 2006-10-09 2008-02-13 高新生 The fourth generation finance core business system systematic structure and intelligent financial accounting method
CN101882266A (en) * 2010-06-22 2010-11-10 方志忠 Account making system for medium-sized and small enterprises
CN105956923B (en) * 2016-04-20 2022-04-29 上海如鸽投资有限公司 Asset transaction system and digital authentication and transaction method of assets
CN106097050A (en) * 2016-06-07 2016-11-09 杭州笛佛软件有限公司 Ecommerce financial management method and system
CN106203988A (en) * 2016-07-26 2016-12-07 通联支付网络服务股份有限公司 A kind of aggregate payment core system
US10417217B2 (en) * 2016-08-05 2019-09-17 Chicago Mercantile Exchange Inc. Systems and methods for blockchain rule synchronization
WO2018049358A1 (en) * 2016-09-12 2018-03-15 Baton Systems, Inc. Financial management systems and methods
JP6298517B1 (en) * 2016-11-16 2018-03-20 PwCあらた有限責任監査法人 Data structure, information processing apparatus, program, information processing method, and transaction system
US20180218176A1 (en) * 2017-01-30 2018-08-02 SALT Lending Holdings, Inc. System and method of creating an asset based automated secure agreement
CN107124460A (en) * 2017-04-28 2017-09-01 北京汇通金财信息科技有限公司 A kind of alliance's catenary system, the method and apparatus of alliance's chain accounting nodes communication
US10783600B2 (en) * 2017-05-25 2020-09-22 GM Global Technology Operations LLC Method and system using a blockchain database for data exchange between vehicles and entities
CN108596426A (en) * 2018-03-09 2018-09-28 广州天维信息技术股份有限公司 A kind of recalculation method and system of performance appraisal
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
TWM566363U (en) * 2018-04-13 2018-09-01 苗華斌 Intermediary system for lending consumption based on blockchain
CN108711006B (en) * 2018-05-15 2021-05-07 腾讯科技(深圳)有限公司 Income management method, management node, system and storage equipment
CN108769173B (en) * 2018-05-21 2021-11-09 阿里体育有限公司 Block chain implementation method and equipment for running intelligent contracts
CN108711099A (en) * 2018-06-07 2018-10-26 深圳鑫宏图工业设计有限公司 A kind of financial system management method, electronic equipment and storage medium
CN112491551B (en) * 2018-06-29 2023-01-20 创新先进技术有限公司 Data verification method and device based on block chain and electronic equipment
CN110009338B (en) * 2018-12-25 2020-10-23 创新先进技术有限公司 Accounting method and device based on block chain and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790431A (en) * 2016-12-05 2017-05-31 同济大学 Cloud manufacturing service Transaction Information record system and method based on block chain
CN106934611A (en) * 2017-03-21 2017-07-07 北京汇通金财信息科技有限公司 Data processing method and device

Also Published As

Publication number Publication date
TWI724574B (en) 2021-04-11
CN110009338A (en) 2019-07-12
TW202036420A (en) 2020-10-01
WO2020134895A1 (en) 2020-07-02

Similar Documents

Publication Publication Date Title
CN110009338B (en) Accounting method and device based on block chain and electronic equipment
TWI679874B (en) Cross-blockchain authentication method and device, and electronic equipment
CN109327528B (en) Node management method and device based on block chain
TWI694390B (en) Blockchain-based transaction processing method and device, and electronic equipment
US11669811B2 (en) Blockchain-based digital token utilization
US20200364700A1 (en) Event processing method, apparatus and electronic device based on blockchain technology
US20190172026A1 (en) Cross blockchain secure transactions
EP3816910B1 (en) Blockchain-based transaction processing method and apparatus, and electronic device
TW201943250A (en) Cross-blockchain authentication method and apparatus, and electronic device
WO2020082887A1 (en) Block chain transaction method and apparatus
EP3816922A1 (en) Blockchain-based transaction processing method and apparatus, and electronic device
CN109493223B (en) Accounting method and device
CN112767158A (en) Transaction execution method and device based on block chain and electronic equipment
EP4332870A1 (en) Transaction data processing method and apparatus, computer device and storage medium
WO2020088074A1 (en) Privacy transaction method and apparatus based on blockchain, and application method and apparatus therefor
CN109460405A (en) For the block generation method of block chain network, synchronous method, storage medium, calculate equipment
CN112037057B (en) Correction method and device for block chain data
CN112612856B (en) Block chain-based data processing method and device
US20230275771A1 (en) Pre-execution of block chain transaction in parallel during block consensus
CN111552991A (en) Block chain transaction method and device
CN113112344B (en) Service processing method, device, storage medium and computer program product
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
CN115701078B (en) Cross-chain transaction processing method, device, electronic equipment and storage medium
CN113987566B (en) HYPERLEDGER FABRIC-based internal bridging cross-chain method, device, equipment and medium
CN111915313B (en) Digital asset transfer control method, device and communication system for blockchain

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40010401

Country of ref document: HK

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200927

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200927

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant