WO2020134895A1 - 基于区块链的记账方法及装置、电子设备 - Google Patents

基于区块链的记账方法及装置、电子设备 Download PDF

Info

Publication number
WO2020134895A1
WO2020134895A1 PCT/CN2019/122535 CN2019122535W WO2020134895A1 WO 2020134895 A1 WO2020134895 A1 WO 2020134895A1 CN 2019122535 W CN2019122535 W CN 2019122535W WO 2020134895 A1 WO2020134895 A1 WO 2020134895A1
Authority
WO
WIPO (PCT)
Prior art keywords
accounting
transaction
blockchain
ledger
household
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.)
Ceased
Application number
PCT/CN2019/122535
Other languages
English (en)
French (fr)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2020134895A1 publication Critical patent/WO2020134895A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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]

Definitions

  • One or more embodiments of this specification relate to the field of blockchain technology, and in particular to a blockchain-based accounting method and device, and electronic equipment.
  • Blockchain technology also known as distributed ledger technology, is an emerging technology in which several computing devices jointly participate in "bookkeeping" and jointly maintain a complete distributed database.
  • Blockchain technology has the characteristics of decentralization, openness and transparency, each computing device can participate in database records, and data synchronization can be quickly performed between computing devices, making blockchain technology widely used in many fields. To apply.
  • the blockchain includes at least one general ledger bookkeeping node as a blockchain member node and a number of household account bookkeeping nodes; wherein, each household account bookkeeping The nodes respectively correspond to different types of accounting services.
  • the method includes:
  • the household accounting and accounting node receives the accounting transaction initiated by the transaction initiator; wherein, the accounting transaction includes detailed account records of the household account related to the accounting business corresponding to the household accounting and accounting node;
  • the accounting transaction includes a service identifier indicating the type of accounting service corresponding to the accounting transaction; before synchronizing the accounting transaction with other accounting nodes in the blockchain, include:
  • the household ledger accounting node does not accept to process the transaction, but broadcasts the accounting transaction in the blockchain .
  • the method further includes:
  • the blockchain is an alliance chain.
  • the consensus algorithm carried on the blockchain is the PBFT algorithm.
  • the present application also proposes a blockchain-based accounting device, the blockchain includes at least one general ledger accounting node and a number of household accounting accounting nodes as member nodes of the blockchain; wherein, each household accounting The accounting nodes respectively correspond to different types of accounting services.
  • the device includes:
  • the obtaining module is used for the household account bookkeeping node to receive the account book transaction initiated by the transaction initiator; wherein, the account book transaction includes the account book detail records related to the bookkeeping business corresponding to the house account bookkeeping node ;
  • the accounting module is used to synchronize the accounting transaction with other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction; in response to the notification that the accounting transaction consensus has passed Message, recording the details of the household accounts in the distributed ledger of the blockchain for storage, so that the general ledger accounting node performs the summary of the household accounts based on the distributed ledger of the blockchain to generate the general ledger.
  • the acquisition module further:
  • the household ledger accounting node does not accept to process the transaction, but broadcasts the accounting transaction in the blockchain .
  • the device further includes:
  • a return module is used to return a notification message of failed accounting to the initiator of the transaction if the blockchain fails to agree on the accounting transaction.
  • the blockchain is an alliance chain.
  • the consensus algorithm carried on the blockchain is the PBFT algorithm.
  • This manual also proposes an electronic device, including:
  • Memory for storing machine executable instructions
  • the household account bookkeeping node receives the account book transaction initiated by the transaction initiator; wherein, the account book transaction includes detailed account records of the household account related to the bookkeeping business corresponding to the household account bookkeeping node;
  • the accounting transaction since the bookkeeping transaction of the household account of different business types is stored in the blockchain, the accounting transaction includes the household account related to the accounting service corresponding to the household account accounting node Account detail records; and, in the accounting transaction process for different business types of household accounts, the introduction of synchronous accounting for the above multiple different business types of household account accounting information stored on the blockchain; therefore, the general ledger The node shares a set of household ledger accounts with multiple household ledger accounting nodes of different business types.
  • the general ledger node is based on a locally stored copy of the household ledger account book, which can fundamentally solve the division of the general ledger and multiple different business types.
  • the problems of slow speed, poor timeliness and inconsistent data appear in the account reconciliation, and because of the multi-node distributed storage of the account book of the household account, the single point of data loss or malicious tampering is avoided.
  • FIG. 1 is a flowchart of a blockchain-based accounting method provided by an exemplary embodiment.
  • FIG. 2 is an architectural diagram of an alliance chain provided by an exemplary embodiment.
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an exemplary embodiment.
  • FIG. 4 is a block diagram of a blockchain-based accounting device provided by an exemplary embodiment.
  • the general ledger when the user summarizes the general ledger, the general ledger is usually obtained based on the detailed data generated by the detailed ledger.
  • the general ledger is also called the general ledger, which is a book that is classified and registered according to the national accounting account.
  • the general ledger can comprehensively and comprehensively reflect and record the capital movements and financial income and expenditure caused by economic business, and provide data support for the preparation of accounting statements.
  • the detailed account uses a household account.
  • the sub-account is a kind of detailed account, a detailed record of each account of the general ledger, and a basis for reconciliation with the unit. Since the general ledger contains multiple accounts, the general ledger data summarized by the general ledger node may come from multiple types of household ledger nodes.
  • a certain type of household ledger node when a certain type of household ledger node generates detailed pipelines, it will notify the ledger node in an asynchronous message.
  • the message may be delayed, lost, out of order, etc. in the process of reaching the general ledger node, which leads to the error of the general ledger summary; in another scenario, when a certain type of The data of the household ledger is tampered with maliciously, which leads to the error of the general ledger summary, which leads to the inconsistency of the total score (general ledger and various types of household ledger data) verification data.
  • the general ledger accounting node can no longer be just a single node, but a general ledger cluster composed of multiple nodes.
  • the household account bookkeeping node can no longer be a single node that supports a certain business type, but is composed of a household account cluster composed of multiple devices supporting the business type, and the devices in the cluster can share the same private
  • the key or each device independently maintains a private key, which is used to encrypt accounting transactions.
  • the cluster of this business type is responsible for receiving the accounting transaction initiated by the transaction initiator corresponding to the business type, wherein the accounting transaction includes the detailed account records of the household account related to the accounting service corresponding to the household account accounting node;
  • the general ledger accounting node is actually a general ledger cluster consisting of 3 devices.
  • the sub-account accounting node supporting the deposit business type is actually a deposit sub-account cluster consisting of 5 devices;
  • the sub-account accounting node supporting the loan business type is actually a loan sub-account cluster consisting of 7 devices;
  • the account-accounting node supporting the virtual account service type is actually a virtual account-accounting cluster consisting of 9 devices.
  • the branch account bookkeeping node supporting the deposit business is responsible for receiving the bookkeeping transaction of the deposit business initiated by the transaction initiator.
  • the bookkeeping transaction includes at least one deposit detail record, such as: deposit account name, deposit amount, and account balance.
  • the deposit accounting node of the deposit business When the deposit accounting node of the deposit business receives the storage accounting transaction described above, it synchronizes the accounting transaction with other accounting nodes in the blockchain.
  • the other accounting node may specifically be a general accounting accounting node 2.
  • Account-accounting nodes that support other business types, such as loan account-accounting nodes and virtual account-accounting accounts. In this scenario, the other account-accounting nodes mentioned above are based on the private account-accounting node.
  • the public key corresponding to the key decrypts the stored accounting transaction, the stored accounting transaction is obtained and a consensus process is initiated to determine the validity of the accounting transaction.
  • the adopted consensus algorithm and specific consensus process will not be described in detail in this specification. Those skilled in the art can refer to the description in related technologies when implementing the technical solutions described in this specification. For example, for the alliance chain, such as PBFT algorithm, or other similar consensus algorithms can be used.
  • the deposit business accounting node After the above other accounting nodes process consensus on the deposit accounting transaction, a notification message will be sent to the deposit business account accounting node. Based on the requirements of the consensus algorithm used, if the consensus is passed, the deposit business accounting node will include the deposit accounting transaction details in the deposit accounting transaction and record it in the distributed ledger of the blockchain storage. After the deposit account details are stored in the distributed ledger of the blockchain, the general ledger bookkeeping node summarizes the ledger accounts based on the distributed ledger and generates the ledger.
  • the distributed ledger of the above blockchain records the details of deposit account, loan account, and virtual account;
  • the general ledger bookkeeping node summarizes the above three account details to generate a general ledger.
  • the accounting transactions include the points related to the accounting services corresponding to the household account accounting nodes Account detail records; and, in the accounting transaction process for the sub-accounts of different business types, synchronous accounting for the above-mentioned multiple business-type sub-account accounting information stored on the blockchain is introduced; therefore,
  • the general ledger node shares a set of household ledger accounts with multiple household ledger nodes of different business types.
  • the general ledger node is based on a locally stored copy of the household ledger account book, which can fundamentally solve the problems of the general ledger and multiple different business types.
  • FIG. 1 is a blockchain-based accounting method provided by an embodiment of this specification, which is applied to a household ledger accounting node; the blockchain includes at least one node that is a member of the blockchain The general ledger accounting node and several branch ledger accounting nodes; where each ledger accounting node corresponds to different types of accounting services, the method performs the following steps:
  • Step 102 Receive an accounting transaction initiated by a transaction initiator; wherein, the accounting transaction includes detailed account records of the household account related to the accounting service corresponding to the household account accounting node;
  • Step 104 Synchronize the accounting transaction with other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction;
  • Step 106 In response to the notification message that the accounting transaction consensus has passed, record the sub-account details in the distributed ledger of the blockchain for storage, so that the general ledger accounting node is based on the area
  • the distributed ledger of the block chain aggregates the household accounts to generate the general ledger.
  • the blockchain described in this specification may specifically include private chains, shared chains, and alliance chains, etc., and is not particularly limited in this specification.
  • the above-mentioned blockchain may specifically be a consortium chain composed of multiple household ledger accounting nodes and general ledger accounting nodes of different business types as alliance members; the operator of the alliance chain may rely on The alliance chain is used to deploy the accounting service for the accounting transactions initiated by the above-mentioned transaction initiators; and the multiple account accounting nodes and general ledger accounting nodes that support different business types described above as members of the alliance can be used as A business node of the above accounting service.
  • the sub-accounting and accounting nodes of different business types can only receive and process accounting transactions of this business type. If the accounting transaction and the account-accounting node of the sub-accounting and accounting nodes are different, the sub-accounting account
  • the accounting node does not accept to process the transaction, that is, the accounting transaction corresponds to the household account accounting node, and can only have accounting authority for the accounting transaction of the business type, and can only acquire other accounting transactions synchronously Business type accounting transactions and consensus, can not initiate the first write to the distributed ledger operation, the general ledger accounting node can not directly receive and process accounting transactions of any business type.
  • the household account bookkeeping node if the transaction service type is different from the accounting service type corresponding to the household account bookkeeping node, the household account bookkeeping node does not accept to process the transaction.
  • the accounting transaction is broadcast in the blockchain. If a branch account bookkeeping node corresponding to the transaction type is received, the branch account bookkeeping node performs the accounting service processing according to the method described in steps 102 to 106.
  • the household accounting node If the blockchain fails to agree on the accounting transaction, the household accounting node returns a notification message that the accounting failed to the transaction initiator.
  • the blockchain is a consortium chain, and there are 3f+1 accounting nodes, where f is a positive integer; the consensus algorithm used on the blockchain is PBFT. If there are less than 2f+1 nodes for the accounting transaction and the transaction reaches consensus, indicating that the consensus for the transaction has not passed, the household accounting node returns a notification message that the accounting failed to the transaction initiator.
  • the bookkeeping transaction described in this specification refers to the transaction initiator of a certain type of household account created by the client of the blockchain and needs to be finally released to the distributed database of the blockchain
  • a piece of data, the piece of data includes: the type of bookkeeping business, the record of account details of each household.
  • a narrow transaction refers to a value transfer issued by a user to the blockchain; for example, in a traditional Bitcoin blockchain network, a transaction can be a transfer initiated by the user in the blockchain.
  • the generalized transaction refers to a piece of business data with business intent published by the user to the blockchain; for example, the operator can build an alliance chain based on actual business needs, relying on the alliance chain to deploy some other types not related to value transfer Online services (for example, anti-counterfeiting services, rental services, vehicle scheduling services, insurance claims services, credit services, medical services, etc.), and in this type of alliance chain, transactions can be a sum of business issued by users in the alliance chain Intent business message or business request.
  • FIG. 2 is an architectural diagram of an alliance chain shown in this specification.
  • the bookkeeping transactions stored on the above alliance chain can be specifically composed of three parts: the account detail record of the bookkeeping transaction, the type of bookkeeping transaction, and the summary of the bookkeeping transaction.
  • a type 1 account bookkeeping node receives a type 1 accounting transaction initiated by a transaction initiator; wherein, the accounting transaction includes: type 1 and type 1 1 Detailed account record and summary of the transaction of the account book; the summary of the transaction of the account book is obtained by the type 1 account bookkeeping node based on the private key held; the type 1 account bookkeeping The node synchronizes the accounting transaction with other accounting nodes in the blockchain, such as: type 2, type 3 sub-account accounting nodes, general ledger accounting nodes to initiate consensus on the accounting transactions deal with;
  • the consensus passing notification message sent to the type 1 household accounting accounting node.
  • the consensus algorithm used in this blockchain is PBFT as an example.
  • PBFT the consensus algorithm used in this blockchain.
  • This type 1 sub-account accounting node records the details of the sub-account in the distributed ledger of the blockchain for storage, please refer to FIG. 2, the type 1 sub-account is stored in the blockchain A ledger, which causes the general ledger bookkeeping node to perform a summary of the household ledger based on the type 1 household ledger ledger.
  • a type 2 account bookkeeping node receives a type 2 accounting transaction initiated by a transaction initiator; wherein, the accounting transaction includes: the type of accounting transaction is type 2, type 2 Detailed account records of the household account and the transaction summary of the account book; where the summary of the transaction of the account book is obtained by the type 2 account bookkeeping node of the account based on the private key held; type 2 account bookkeeping The node synchronizes the accounting transaction with other accounting nodes in the blockchain, such as: type 1 and type 3 sub-account accounting nodes and general ledger accounting nodes to initiate consensus on the accounting transaction deal with;
  • the consensus algorithm used in this blockchain is PBFT as an example.
  • PBFT the consensus algorithm used in this blockchain.
  • a type 3 account bookkeeping node receives a type 2 accounting transaction initiated by a transaction initiator; wherein, the accounting transaction includes: the type of accounting transaction is type 2, type 2 Account detail records of the household; before synchronizing the accounting transaction with other accounting nodes in the blockchain, the household accounting node of type 3 obtains the transaction business type, which is business type 2, and type 3 The type of bookkeeping service corresponding to the household account bookkeeping node of is type 3, which is different, then the household account bookkeeping node of type 3 does not accept to process the transaction, but broadcasts the accounting transaction in the blockchain.
  • the type 2 sub-accounting and accounting node If the type 2 sub-accounting and accounting node receives the transaction broadcast by the type 3 sub-accounting and accounting node, the type 2 sub-accounting and accounting node performs the accounting business according to the method described in steps 102 to 106 deal with.
  • the general ledger accounting node receives a type 3 accounting transaction initiated by a transaction initiator; wherein, the accounting transaction includes: the type of accounting transaction is type 3, and the type 3 account details Record; the general ledger accounting node does not accept to process the transaction, but broadcasts the accounting transaction in the blockchain. If the type 3 sub-accounting and accounting node receives the transaction broadcasted by the general ledger and accounting node, the type 3 sub-accounting and accounting node performs the accounting business process according to the method described in steps 102 to 106.
  • the distributed database in the blockchain stores: type 1 account books, type 2 account books, and type 3 accounts Ledger;
  • the general ledger bookkeeping node summarizes the general ledger according to the accounting rules of the general ledger based on locally stored copies of type 1, type 2, and type 3 sub-ledger accounts.
  • the accounting rules will not be elaborated one by one.
  • the accounting transactions stored in the blockchain corresponding to a certain business type are distributed and stored in multiple sub-account accounting nodes, and the general ledger nodes are in the block
  • the centralized storage of the single business type account bookkeeping node is no longer used, avoiding a single point of business failure; changes in any business type account book will be synchronized to the distributed database of the blockchain, general ledger bookkeeping
  • the node data can quickly obtain the update of the household account.
  • the general ledger node Since the general ledger node shares a set of household ledger accounts with multiple household ledger accounting nodes of different business types, the general ledger node is based on a locally stored copy of the household ledger account book, which can fundamentally solve the general ledger and multiple different business types The problem of slow speed, poor timeliness and inconsistent data in the verification of the household account of the household account, and because of the multi-node distributed storage of the household account book, avoiding the loss of single points of data or malicious tampering.
  • this specification also provides an embodiment of a blockchain-based accounting device.
  • the embodiment of the blockchain-based accounting device of this specification can be applied to electronic devices.
  • the device embodiments may be implemented by software, or by hardware or a combination of hardware and software. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located and running.
  • FIG. 3 it is a hardware structure diagram of the electronic equipment where the blockchain-based accounting device is located in this specification, except for the processor, memory, network interface, and non-
  • the electronic device in which the device is located in the embodiment generally may include other hardware according to the actual function of the electronic device, which will not be repeated here.
  • Fig. 4 is a block diagram of a blockchain-based accounting device shown in an exemplary embodiment of this specification.
  • the blockchain-based accounting device 40 can be applied to the aforementioned electronic device shown in FIG. 3; the blockchain includes at least one general ledger accounting node and several A household account bookkeeping node; wherein each household account bookkeeping node corresponds to a different type of accounting service; the device 40 includes: an acquisition module 401, an accounting module 402, and a return module 403.
  • the obtaining module 401 is used for the household account bookkeeping node to receive the account book transaction initiated by the transaction initiator; wherein, the account book transaction includes account book details related to the account bookkeeping business corresponding to the account book account node recording;
  • the accounting module 402 is used to synchronize the accounting transaction with other accounting nodes in the blockchain to initiate consensus processing for the accounting transaction; for responding to the consensus of the accounting transaction Notification message, record the details of the household accounts in the distributed ledger of the blockchain for storage, so that the general ledger bookkeeping node performs the summary of the household ledger based on the distributed ledger of the blockchain to generate the general ledger .
  • the accounting transaction includes a service identifier indicating the type of accounting service corresponding to the accounting transaction; before synchronizing the accounting transaction with other accounting nodes in the blockchain ,
  • the acquisition module 401 further:
  • the household ledger accounting node does not accept to process the transaction, but broadcasts the accounting transaction in the blockchain .
  • the device 40 further includes:
  • the return module 403 is configured to return a notification message of failed accounting to the initiator of the transaction if the blockchain fails to agree on the accounting transaction.
  • the blockchain is an alliance chain.
  • the consensus algorithm carried on the blockchain is the PBFT algorithm.
  • the relevant part can be referred to the description of the method embodiment.
  • the device embodiments described above are only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, may be located One place, or can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solution in this specification. Those of ordinary skill in the art can understand and implement without paying creative labor.
  • the system, device, module or module explained in the above embodiments may be specifically implemented by a computer chip or entity, or by a product with a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or any combination of these devices.
  • the electronic device includes: a processor and a memory for storing machine-executable instructions; wherein the processor and the memory are usually connected to each other through an internal bus.
  • the device may further include an external interface to be able to communicate with other devices or components.
  • the household account bookkeeping node receives the account book transaction initiated by the transaction initiator; wherein, the account book transaction includes the account record details of the household account related to the bookkeeping business corresponding to the household account bookkeeping node; the block The chain includes at least one general ledger accounting node and several household ledger accounting nodes that are member members of the blockchain; where each ledger accounting node corresponds to a different type of accounting service;
  • the accounting transaction includes a service identifier indicating the type of accounting service corresponding to the accounting transaction; before synchronizing the accounting transaction with other accounting nodes in the blockchain ,Also includes:
  • the household ledger accounting node does not accept to process the transaction, but broadcasts the accounting transaction in the blockchain .

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

一种基于区块链的记账方法、装置及机器可读存储介质,所述区块链包括作为区块链成员节点的至少一总账记账节点和若干分户账记账节点,所述方法包括:分户账记账节点接收交易发起者发起的记账交易;其中,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录(102);将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理(104);响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账(106),实现了总账记账节点无需与分户账记账节点进行核对就能完成总账统计。

Description

基于区块链的记账方法及装置、电子设备 技术领域
本说明书一个或多个实施例涉及区块链技术领域,尤其涉及一种基于区块链的记账方法及装置、电子设备。
背景技术
区块链技术,也被称之为分布式账本技术,是一种由若干台计算设备共同参与“记账”,共同维护一份完整的分布式数据库的新兴技术。由于区块链技术具有去中心化、公开透明、每台计算设备可以参与数据库记录、并且各计算设备之间可以快速的进行数据同步的特性,使得区块链技术已在众多的领域中广泛的进行应用。
发明内容
本说明书提出一种基于区块链的记账方法,所述区块链包括作为区块链成员节点的至少一总账记账节点和若干分户账记账节点;其中,各分户账记账节点分别对应不同类型的记账业务,所述方法包括:
分户账记账节点接收交易发起者发起的记账交易;其中,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;
将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理;
响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账。
可选的,所述记账交易包括指示所述记账交易对应的记账业务的类型的业务标识;所述将所述记账交易同步所述区块链中的其它记账节点之前,还包括:
若所述业务标识与所述分户账记账节点对应的记账业务类型不同,则所述分户账记账节点不接纳处理该交易,而在所述区块链中广播该记账交易。
可选的,所述方法还包括:
若所述区块链对所述记账交易共识失败,则向所述交易发起者返回记账失败的通知消息。
可选的,所述区块链为联盟链。
可选的,所述区块链搭载的共识算法为PBFT算法。
本申请还提出一种基于区块链的记账装置,所述区块链包括作为区块链成员节点的至少一总账记账节点和若干分户账记账节点;其中,各分户账记账节点分别对应不同类型的记账业务,所述装置包括:
获取模块,用于分户账记账节点接收交易发起者发起的记账交易;其中,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;
记账模块,用于将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理;用于响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账。
可选的,所述获取模块进一步:
若所述业务标识与所述分户账记账节点对应的记账业务类型不同,则所述分户账记账节点不接纳处理该交易,而在所述区块链中广播该记账交易。
可选的,所述装置还包括:
返回模块,用于若所述区块链对所述记账交易共识失败,则向所述交易发起者返回记账失败的通知消息。
可选的,所述区块链为联盟链。
可选的,所述区块链搭载的共识算法为PBFT算法。
本说明书还提出一种电子设备,包括:
处理器;
用于存储机器可执行指令的存储器;
其中,通过读取并执行所述存储器存储的与基于区块链的记账的控制逻辑对应的机器可执行指令,所述处理器被促使:
分户账记账节点接收交易发起者发起的记账交易;其中,所述记账交易包括与所 述分户账记账节点对应的记账业务相关的分户账明细记录;
将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理;
响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账。
通过以上实施例,由于在区块链中存储的是不同业务类型的分户账的记账交易,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;并且,在针对不同业务类型的分户账的记账交易过程,引入了针对区块链上存储的上述多个不同业务类型分户账记账信息的同步记账;因此,总账节点与多个不同业务类型的分户账记账节点共享一套分户账账本,总账节点基于本地存储的分户账账本副本,从而可以从根本上解决了总账与多个不同业务类型的分户账核对时出现的速度慢、时效性差和数据不一致的问题,并且由于分户账账本的多节点分布式存储,避免了单点数据丢失或被恶意篡改。
附图说明
图1是一示例性实施例提供的一种基于区块链的记账方法的流程图。
图2是一示例性实施例提供的一种联盟链的架构图。
图3是一示例性实施例提供的一种电子设备的结构示意图。
图4是一示例性实施例提供的一种基于区块链的记账装置的框图。
具体实施方式
在会计核算的一些场景下,当用户对总账进行汇总时,通常会基于明细账产生的明细数据汇总获得总账,其中所述总账也称总分类账,是按国家规定会计科目进行分类登记的账簿,总账能全面、总括地反映和记录经济业务引起的资金运动和财务收支情况,并为编制会计报表提供数据支撑。
所述明细账在通常的实践中,使用的是分户账。所述分户账是明细账的一种,是总账各科目的详细记录,也是与单位对账的依据。由于总账包含多个科目,所以总账节点汇总的总账数据可能来源于多种类型的分户账节点。
在一种场景下,当某一类型的分户账节点产生明细流水时,会以异步消息的方式将其通知总账节点。在消息实际传输过程中,由于网络环境存在异常,导致消息到总账节点过程中可能出现延迟、丢失、乱序等情况,由此导致总账汇总错误;在另外一种场景下,当某一类型的分户账数据被恶意篡改,由此导致总账汇总错误,从而导致总分(总账和多种类型分户账数据)核对数据不一致。
基于此,在本说明书中,提出一种基于总账记账节点和不同类型的分户账记账节点在区块链上处理和同步不同类型的记账交易请求,并将所记账交易包括不同类型的分户账明细,记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述分布式账本汇总生成总账,来避免传统的分户账单点故障以及总分核对数据不一致的技术方案。
在实现时,总账记账节点可以不再仅是单个节点,而是由多个节点组成的总账集群组成。分户账记账节点,可以不再仅是支持某一业务类型的单个节点,而是由多个支持该业务类型的多个设备组成的分户账集群组成,该集群内设备可以共享同一私钥或者每台设备独立维护一个私钥,该私钥用于记账交易的加密。该业务类型的集群负责接收交易发起者发起的对应该业务类型的记账交易,其中,该记账交易包括与该分户账记账节点对应的记账业务相关的分户账明细记录;在区块链网络中,存在多个支持不同业务类型的分户账集群。
例如,总账记账节点实际是由3台设备组成的总账集群。支持存款业务类型的分户账记账节点实际是由5台设备组成的存款分户账集群;支持贷款业务类型的分户账记账节点实际是由7台设备组成的贷款分户账集群;支持虚拟账业务类型的分户账记账节点实际是由9台设备组成的虚拟账分户账集群。支持存款业务分户账记账节点负责接收交易发起者发起的存款业务的记账交易,该记账交易包括至少一条存款明细记录,比如:存款账户名、存入金额,账户余额。
当存款业务分户账记账节点,接收到上述存储记账交易后,将该记账交易同步所述区块链中的其它记账节点,所述其它记账节点具体可以是总账记账节点、支持其它业务类型的分户账记账节点,比如:贷款分户账记账节点、虚拟账分户账记账节点;在这种场景下,上述其它记账节点,基于存款记账节点私钥对应的公钥对该存储记账交易解密后,获得该存储记账交易并对其发起共识处理,并确定该记账交易有效性。所采用的共识算法以及具体的共识过程,在本说明书中不再进行详述,本领域技术人员在将本说明书记载的技术方案付诸实现时,可以参考相关技术中的记载。例如,对于联盟链而言, 可以采用诸如PBFT算法,或者其它类似的共识算法。
当上述其它记账节点针对该存款记账交易共识处理后,会向存款业务分户账记账节点发送通知消息。基于所采用的共识算法的要求,若共识通过,该存款业务分户账记账节点将所述存款记账交易所包含存款分户账明细,记录在所述区块链的分布式账本中进行存储。当上述存款分户账明细存储在区块链的分布式账本后,总账记账节点基于该分布式账本进行分户账汇总,生成总账。
例如:上述区块链的分布式账本中记录有存款分户账明细、贷款分户账明细、虚拟账分户账明细;总账记账节点汇总上述三种分户账明细,生成总账。
在以上技术方案中,由于在区块链中存储的是不同业务类型的分户账的记账交易,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;并且,在针对不同业务类型的分户账的记账交易过程,引入了针对区块链上存储的上述多个不同业务类型分户账记账信息的同步记账;因此,总账节点与多个不同业务类型的分户账记账节点共享一套分户账账本,总账节点基于本地存储的分户账账本副本,从而可以从根本上解决了总账与多个不同业务类型的分户账核对时出现的速度慢、时效性差和数据不一致的问题,并且由于分户账账本的多节点分布式存储,避免了单点数据丢失或被恶意篡改。
下面通过具体实施例并结合具体的应用场景对本说明书进行描述。
请参考图1,图1是本说明书一实施例提供的一种基于区块链的记账方法,应用于分户账记账节点;所述区块链包括作为区块链成员节点的至少一总账记账节点和若干分户账记账节点;其中,各分户账记账节点分别对应不同类型的记账业务,所述方法执行以下步骤:
步骤102、接收交易发起者发起的记账交易;其中,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;
步骤104、将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理;
步骤106、响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账。
在本说明书所描述的区块链,具体可以包括私有链、共有链以及联盟链等,在本 说明书中不进行特别限定。
例如,在一个场景中,上述区块链具体可以是由多个不同业务类型的分户账记账节点、总账记账节点作为联盟成员组成的一个联盟链;该联盟链的运营方可以依托于该联盟链,来部署针对上述交易发起者发起的记账交易的记账业务;而以上所描述的作为联盟成员的多个支持不同业务类型的分户账记账节点、总账记账节点可以作为上述记账业务的一个业务节点。当某一业务类型的分户账记账节点对此业务类型的记账交易在区块链内发起同步,若其它记账节点若对该记账交易达成共识,则会向发起该记账交易的的分户账记账节点回应共识成功消息,由该记账交易对应的分户账记账节点发起在联盟链中的分布式数据库进行存储,完成上述记账交易的“上链”记账。
不同业务类型的分户账记账节点只能接收处理该业务类型的记账交易,若该记账交易与该分户账记账节点对应的记账业务类型不同,则所述分户账记账节点不接纳处理该交易,即该记账交易对应分户账记账节点,只能对该业务类型的记账交易有记账权限,对其它业务类型记账交易,只能进行同步获取其它业务类型记账交易并进行共识,不能发起首次写入分布式账本操作,总账记账节点不能直接接收处理任何业务类型的记账交易。
例如,在示出的一种实施方式中,若该交易业务类型与分户账记账节点对应的记账业务类型不同,则该分户账记账节点不接纳处理该交易,而在所述区块链中广播该记账交易。若有与该交易类型相对应的分户账记账节点收到,则该分户账记账节点按步骤102至步骤106描述的方法进行记账业务处理。
若区块链对该记账交易共识失败,则该分户账记账节点向该交易发起者返回记账失败的通知消息。
例如,在示出的一种实施方式中,该区块链为联盟链,存在3f+1个记账节点,其中f为正整数;该区块链搭载使用的共识算法是PBFT。若针对该记账交易少于2f+1个节点对该交易达成共识,说明针对该交易共识未通过,则该分户账记账节点向该交易发起者返回记账失败的通知消息。
需要说明的是,在本说明书中所描述的记账交易,是指某一类型分户账的交易发起者通过区块链的客户端创建,并需要最终发布至区块链的分布式数据库中的一笔数据,所述该笔数据包括:记账业务类型、分户账明细记录。
区块链中的交易,通常存在狭义的交易以及广义的交易之分。狭义的交易是指用 户向区块链发布的一笔价值转移;例如,在传统的比特币区块链网络中,交易可以是用户在区块链中发起的一笔转账。而广义的交易是指用户向区块链发布的一笔具有业务意图的业务数据;例如,运营方可以基于实际的业务需求搭建一个联盟链,依托于联盟链部署一些与价值转移无关的其它类型的在线业务(比如,防伪业务、租房业务、车辆调度业务、保险理赔业务、信用服务、医疗服务等),而在这类联盟链中,交易可以是用户在联盟链中发布的一笔具有业务意图的业务消息或者业务请求。
以下以上述区块链为联盟链,包括:多个业务类型的分户账记账节点以及总账记账节点为例,对本说明书的技术方案进行详细说明;
其中,需要强调的是,以上述多个业务类型的分户账记账节点以及总账记账节点为例仅为示例性说明。
请参见图2,图2为本说明书示出的一种联盟链的架构图。
如图2所示,有三种业务类型的分户账记账节点以及总账记账节点,均可以作为联盟成员加入到联盟链,并将各自对应业务类型产生的记账交易,以交易的形式发布至联盟链,并在该交易经过联盟链中的共识节点的共识处理之后,在联盟链中的分布式数据库进行存储,完成上述记账交易的“上链”存储。
请继续参见图2,在本说明书中,在上述联盟链上存储的记账交易,具体可以由该记账交易的分户账明细记录、记账交易类型、记账交易摘要等三部分组成。
在示出的一种实施方式中,类型1的分户账记账节点接收交易发起者发起的类型1的记账交易;其中,所述记账交易包括:记账交易类型为类型1、类型1分户账明细记录、该笔记账交易摘要;其中,该笔记账交易摘要为类型1的分户账记账节点基于持有的私钥进行签名获得;类型1的分户账记账节点将所述记账交易同步所述区块链中的其它记账节点,比如:类型2、类型3的分户账记账节点、总账记账节点,以发起针对所述记账交易的共识处理;
如果上述其它记账节点,对所述记账交易共识通过,则向类型1的分户账记账节点发送的共识通过通知消息。以该区块链为联盟链,该区块链搭载使用的共识算法是PBFT为例,存在3f+1个记账节点,其中f为正整数。若针对该记账交易少于2f+1个节点对该交易达成共识,说明针对该交易共识未通过。比如:该类型1的分户账记账节点,若收到达到或超过2f+1个节点共识通过通知消息,则针对该交易共识通过。
该类型1的分户账记账节点,将所述分户账明细记录在所述区块链的分布式账本 中进行存储,请参见图2所示,区块链中存储类型1的分户账账本,其以使所述总账记账节点基于类型1的分户账账本进行分户账汇总生成总账。
在示出的一种实施方式中,类型2的分户账记账节点接收交易发起者发起的类型2的记账交易;其中,所述记账交易包括:记账交易类型为类型2、类型2分户账明细记录、该笔记账交易摘要;其中,该笔记账交易摘要为类型2的分户账记账节点基于持有的私钥进行签名获得;类型2的分户账记账节点将所述记账交易同步所述区块链中的其它记账节点,比如:类型1、类型3的分户账记账节点、总账记账节点,以发起针对所述记账交易的共识处理;
以该区块链为联盟链,该区块链搭载使用的共识算法是PBFT为例,存在3f+1个记账节点,其中f为正整数。若针对该记账交易少于2f+1个节点对该交易达成共识,说明针对该交易共识未通过。比如:该类型2的分户账记账节点,若未收到达到2f+1个节点共识通过通知消息,则针对该交易共识未通过。该类型2的分户账记账节点,则向该交易发起者返回记账失败的通知消息。
在示出的一种实施方式中,类型3的分户账记账节点接收交易发起者发起的类型2的记账交易;其中,所述记账交易包括:记账交易类型为类型2、类型2分户账明细记录;在将该记账交易同步所述区块链中的其它记账节点之前,类型3的分户账记账节点获取该交易业务类型,为业务类型2,与类型3的分户账记账节点对应的记账业务类型即类型3,不相同,则类型3的分户账记账节点不接纳处理该交易,而在所述区块链中广播该记账交易。假如类型2的分户账记账节点收到类型3的分户账记账节点广播的该交易,则该类型2的分户账记账节点按步骤102至步骤106描述的方法进行记账业务处理。
在示出的一种实施方式中,总账记账节点接收交易发起者发起的类型3的记账交易;其中,所述记账交易包括:记账交易类型为类型3、类型3分户账明细记录;总账记账节点不接纳处理该交易,而在所述区块链中广播该记账交易。假如类型3的分户账记账节点收到总账记账节点广播的该交易,则该类型3的分户账记账节点按步骤102至步骤106描述的方法进行记账业务处理。
在示出的一种实施方式中,请参见图2所示,区块链中的分布式数据库中存储有:类型1的分户账账本、类型2的分户账账本、类型3的分户账账本;总账记账节点基于本地存储的类型1、类型2、类型3分户账账本副本,按总账的会计核算规则进行总账的汇总,这里会计核算规则不再一一详述。
通过以上实施例可见,由于在本说明书中,在区块链中存储的与某一业务类型对应相关的记账交易,是分布式存储于多个分户账记账节点、总账节点在区块链上,不再采用单一业务类型分户账记账节点中心化集中存储,避免了业务单点故障;任何业务类型分户账的变化都会同步到区块链的分布式数据库中,总账记账节点数据可以快速获取该分户账的更新。由于总账节点与多个不同业务类型的分户账记账节点共享一套分户账账本,总账节点基于本地存储的分户账账本副本,从而可以从根本上解决了总账与多个不同业务类型的分户账核对时出现的速度慢、时效性差和数据不一致的问题,并且由于分户账账本的多节点分布式存储,避免了单点数据丢失或被恶意篡改。
与上述方法实施例相对应,本说明书还提供了一种基于区块链的记账装置的实施例。本说明书的基于区块链的记账装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图3所示,为本说明书的基于区块链的记账装置所在电子设备的一种硬件结构图,除了图3所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。
图4是本说明书一示例性实施例示出的一种基于区块链的记账装置的框图。
请参考图4,所述基于区块链的记账装置40可以应用在前述图3所示的电子设备中;所述区块链包括作为区块链成员节点的至少一总账记账节点和若干分户账记账节点;其中,各分户账记账节点分别对应不同类型的记账业务;所述装置40包括有:获取模块401、记账模块402和返回模块403。
获取模块401,用于分户账记账节点接收交易发起者发起的记账交易;其中,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;
记账模块402,用于将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理;用于响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账。
在本实施例中,所述记账交易包括指示所述记账交易对应的记账业务的类型的业务标识;所述将所述记账交易同步所述区块链中的其它记账节点之前,所述获取模块401 进一步:
若所述业务标识与所述分户账记账节点对应的记账业务类型不同,则所述分户账记账节点不接纳处理该交易,而在所述区块链中广播该记账交易。
在本实施例中,所述装置40还包括:
返回模块403,用于若所述区块链对所述记账交易共识失败,则向所述交易发起者返回记账失败的通知消息。
在本实施例中,所述区块链为联盟链。
在本实施例中,所述区块链搭载的共识算法为PBFT算法。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
上述实施例阐明的系统、装置、模块或模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
与上述方法实施例相对应,本说明书还提供了一种电子设备的实施例。该电子设备包括:处理器以及用于存储机器可执行指令的存储器;其中,处理器和存储器通常通过内部总线相互连接。在其他可能的实现方式中,所述设备还可能包括外部接口,以能够与其他设备或者部件进行通信。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的记账的控制逻辑对应的机器可执行指令,所述处理器被促使:
分户账记账节点接收交易发起者发起的记账交易;其中,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;所述区块链包括作为区块链成员节点的至少一总账记账节点和若干分户账记账节点;其中,各分户账记账节点分别 对应不同类型的记账业务;
将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理;
响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账。
在本实施例中,所述记账交易包括指示所述记账交易对应的记账业务的类型的业务标识;所述将所述记账交易同步所述区块链中的其它记账节点之前,还包括:
若所述业务标识与所述分户账记账节点对应的记账业务类型不同,则所述分户账记账节点不接纳处理该交易,而在所述区块链中广播该记账交易。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的记账的控制逻辑对应的机器可执行指令,所述处理器被促使:
若所述区块链对所述记账交易共识失败,则向所述交易发起者返回记账失败的通知消息。
本领域技术人员在考虑说明书及实践这里公开的申请后,将容易想到本说明书的其它实施方案。本说明书旨在涵盖本说明书的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本说明书的一般性原理并包括本说明书未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本说明书的真正范围和精神由下面的权利要求指出。
应当理解的是,本说明书并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本说明书的范围仅由所附的权利要求来限制。
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。

Claims (11)

  1. 一种基于区块链的记账方法,其特征在于,所述区块链包括作为区块链成员节点的至少一总账记账节点和若干分户账记账节点;其中,各分户账记账节点分别对应不同类型的记账业务,所述方法包括:
    分户账记账节点接收交易发起者发起的记账交易;其中,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;
    将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理;
    响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账。
  2. 根据权利要求1所述的方法,其特征在于,所述记账交易包括指示所述记账交易对应的记账业务的类型的业务标识;所述将所述记账交易同步所述区块链中的其它记账节点之前,还包括:
    若所述业务标识与所述分户账记账节点对应的记账业务类型不同,则所述分户账记账节点不接纳处理该交易,而在所述区块链中广播该记账交易。
  3. 根据权利要求1所述的方法,其特征在于,还包括:
    若所述区块链对所述记账交易共识失败,则向所述交易发起者返回记账失败的通知消息。
  4. 根据权利要求1所述的方法,其特征在于,所述区块链为联盟链。
  5. 根据权利要求1所述的方法,其特征在于,所述区块链搭载的共识算法为PBFT算法。
  6. 一种基于区块链的记账装置,其特征在于,所述区块链包括作为区块链成员节点的至少一总账记账节点和若干分户账记账节点;其中,各分户账记账节点分别对应不同类型的记账业务,所述装置包括:
    获取模块,用于分户账记账节点接收交易发起者发起的记账交易;其中,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;
    记账模块,用于将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理;用于响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账。
  7. 根据权利要求6所述的装置,其特征在于,所述记账交易包括指示所述记账交易对应的记账业务的类型的业务标识;所述将所述记账交易同步所述区块链中的其它记账节点之前,所述获取模块进一步:
    若所述业务标识与所述分户账记账节点对应的记账业务类型不同,则所述分户账记账节点不接纳处理该交易,而在所述区块链中广播该记账交易。
  8. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    返回模块,用于若所述区块链对所述记账交易共识失败,则向所述交易发起者返回记账失败的通知消息。
  9. 根据权利要求6所述的装置,其特征在于,所述区块链为联盟链。
  10. 根据权利要求6所述的装置,其特征在于,所述区块链搭载的共识算法为PBFT算法。
  11. 一种电子设备,包括:
    处理器;
    用于存储机器可执行指令的存储器;
    其中,通过读取并执行所述存储器存储的与基于区块链的记账的控制逻辑对应的机器可执行指令,所述处理器被促使:
    分户账记账节点接收交易发起者发起的记账交易;其中,所述记账交易包括与所述分户账记账节点对应的记账业务相关的分户账明细记录;
    将所述记账交易同步所述区块链中的其它记账节点,以发起针对所述记账交易的共识处理;
    响应于所述记账交易共识通过的通知消息,将所述分户账明细记录在所述区块链的分布式账本中进行存储,以使所述总账记账节点基于所述区块链的分布式账本进行分户账汇总生成总账。
PCT/CN2019/122535 2018-12-25 2019-12-03 基于区块链的记账方法及装置、电子设备 Ceased WO2020134895A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811589616.1A CN110009338B (zh) 2018-12-25 2018-12-25 基于区块链的记账方法及装置、电子设备
CN201811589616.1 2018-12-25

Publications (1)

Publication Number Publication Date
WO2020134895A1 true WO2020134895A1 (zh) 2020-07-02

Family

ID=67165233

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/122535 Ceased WO2020134895A1 (zh) 2018-12-25 2019-12-03 基于区块链的记账方法及装置、电子设备

Country Status (3)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116029709A (zh) * 2022-12-26 2023-04-28 上海中通吉网络技术有限公司 汇总结算明细的回写方法和系统

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009338B (zh) * 2018-12-25 2020-10-23 创新先进技术有限公司 基于区块链的记账方法及装置、电子设备
CN110473106B (zh) * 2019-08-21 2024-10-22 腾讯科技(深圳)有限公司 一种交易处理的方法以及相关装置
CN110502927B (zh) * 2019-08-27 2024-10-25 腾讯科技(深圳)有限公司 一种信息处理方法及相关装置
CN110532270A (zh) * 2019-08-30 2019-12-03 南京荣链科技有限公司 账本关联的数据管理方法及其系统
CN111191294B (zh) * 2019-12-27 2022-05-24 诚镌科技(广州)有限公司 基于区块链的单节点记账方法、系统、设备和存储介质
CN111523988A (zh) * 2020-03-20 2020-08-11 福建省农村信用社联合社 利用区块链实现农村三资信息安全保存及全程留痕的方法
CN111415160B (zh) * 2020-04-27 2024-05-28 中国银行股份有限公司 基于区块链的销账业务处理方法、系统及各相关节点
CN112020018B (zh) * 2020-08-26 2022-05-17 山东浪潮科学研究院有限公司 区块链记账组生成方法、共识方法及区块链系统
CN112685412A (zh) * 2020-12-28 2021-04-20 任涵 一种物资电子台账
CN113556405B (zh) * 2021-09-18 2021-12-07 深圳时空云科技有限公司 隐私信息的分布式管理方法及装置
DE112022000118T5 (de) * 2022-01-14 2024-01-18 Fifth Force Technology Limited Peer-to-peer-basiertes datenverarbeitungsverfahren und -system, rechengerät und speichermedium
CN114511321B (zh) * 2022-01-14 2022-09-23 北京第五力科技有限公司 基于点对点的数据处理方法、系统、计算设备及存储介质
CN116846904A (zh) * 2023-06-09 2023-10-03 山东省计算中心(国家超级计算济南中心) 基于数据缓冲机制的跨链系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882266A (zh) * 2010-06-22 2010-11-10 方志忠 中小企业做账系统
CN106097050A (zh) * 2016-06-07 2016-11-09 杭州笛佛软件有限公司 电子商务财务管理方法及系统
US20180075536A1 (en) * 2016-09-12 2018-03-15 Baton Systems, Inc. Multiparty reconciliation systems and methods
CN108711099A (zh) * 2018-06-07 2018-10-26 深圳鑫宏图工业设计有限公司 一种财务系统管理方法、电子设备及存储介质
CN108711006A (zh) * 2018-05-15 2018-10-26 腾讯科技(深圳)有限公司 收入管理方法、管理节点、系统及存储设备
CN108776929A (zh) * 2018-04-02 2018-11-09 成都云创智融科技有限公司 基于区块链数据库的账单处理方法、系统和可读存储介质
CN110009338A (zh) * 2018-12-25 2019-07-12 阿里巴巴集团控股有限公司 基于区块链的记账方法及装置、电子设备

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101122991A (zh) * 2006-10-09 2008-02-13 高新生 第四代金融核心业务系统体系结构及智能金融会计核算算法
CN105956923B (zh) * 2016-04-20 2022-04-29 上海如鸽投资有限公司 资产交易系统以及资产的数字化认证和交易方法
CN106203988A (zh) * 2016-07-26 2016-12-07 通联支付网络服务股份有限公司 一种综合支付核心系统
US10417217B2 (en) * 2016-08-05 2019-09-17 Chicago Mercantile Exchange Inc. Systems and methods for blockchain rule synchronization
JP6298517B1 (ja) * 2016-11-16 2018-03-20 PwCあらた有限責任監査法人 データ構造、情報処理装置、プログラム、情報処理方法及びトランザクションシステム
CN106790431B (zh) * 2016-12-05 2020-11-27 同济大学 基于区块链的云制造服务交易信息记录系统与方法
WO2018140913A1 (en) * 2017-01-30 2018-08-02 SALT Lending Holdings, Inc. System and method of creating an asset based automated secure agreement
CN106934611B (zh) * 2017-03-21 2021-05-28 北京汇通金财信息科技有限公司 一种数据处理的方法及装置
CN107124460A (zh) * 2017-04-28 2017-09-01 北京汇通金财信息科技有限公司 一种联盟链系统、联盟链记账节点通信的方法和装置
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 (zh) * 2018-03-09 2018-09-28 广州天维信息技术股份有限公司 一种绩效考核的重算方法和系统
TWM566363U (zh) * 2018-04-13 2018-09-01 苗華斌 基於區塊鏈的借貸消費中介系統
CN108769173B (zh) * 2018-05-21 2021-11-09 阿里体育有限公司 运行智能合约的区块链实现方法及设备
CN109067541B (zh) * 2018-06-29 2020-09-22 阿里巴巴集团控股有限公司 基于区块链的数据验证方法及装置、电子设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882266A (zh) * 2010-06-22 2010-11-10 方志忠 中小企业做账系统
CN106097050A (zh) * 2016-06-07 2016-11-09 杭州笛佛软件有限公司 电子商务财务管理方法及系统
US20180075536A1 (en) * 2016-09-12 2018-03-15 Baton Systems, Inc. Multiparty reconciliation systems and methods
CN108776929A (zh) * 2018-04-02 2018-11-09 成都云创智融科技有限公司 基于区块链数据库的账单处理方法、系统和可读存储介质
CN108711006A (zh) * 2018-05-15 2018-10-26 腾讯科技(深圳)有限公司 收入管理方法、管理节点、系统及存储设备
CN108711099A (zh) * 2018-06-07 2018-10-26 深圳鑫宏图工业设计有限公司 一种财务系统管理方法、电子设备及存储介质
CN110009338A (zh) * 2018-12-25 2019-07-12 阿里巴巴集团控股有限公司 基于区块链的记账方法及装置、电子设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116029709A (zh) * 2022-12-26 2023-04-28 上海中通吉网络技术有限公司 汇总结算明细的回写方法和系统

Also Published As

Publication number Publication date
CN110009338A (zh) 2019-07-12
TW202036420A (zh) 2020-10-01
TWI724574B (zh) 2021-04-11
CN110009338B (zh) 2020-10-23

Similar Documents

Publication Publication Date Title
WO2020134895A1 (zh) 基于区块链的记账方法及装置、电子设备
TWI679874B (zh) 跨區塊鏈的認證方法及裝置、電子設備
TWI690184B (zh) 跨區塊鏈的認證方法及裝置、電子設備
US11461773B2 (en) Blockchain-based node management methods and apparatuses
US11126458B2 (en) Method, apparatus, and electronic device for resource allocation based on blockchain
CN108389129B (zh) 基于区块链的交易执行方法及装置、电子设备
JP7228322B2 (ja) ブロックチェーン・ネットワークにおける自動コミット・トランザクション管理
US20190149600A1 (en) Partitioning of a blockchain ledger
WO2020023850A1 (en) Blockchain-based asset transfer method and apparatus, and electronic device
WO2020082887A1 (zh) 一种区块链的交易方法和装置
WO2020088109A1 (zh) 基于区块链的隐私交易及其应用方法和装置
TW202001607A (zh) 基於區塊鏈的智慧合約調用方法及裝置、電子設備
WO2020082892A1 (zh) 基于区块链的交易处理方法及装置、电子设备
TWI727284B (zh) 基於區塊鏈的隱私交易方法、裝置及其電腦設備、基於區塊鏈內的隱私交易的應用方法及其電腦設備
EP3905172B1 (en) Blockchain-based invoice voiding method and apparatus, and electronic device
US11038685B1 (en) Correcting blockchain transactions with cryptocurrency type mistakes
WO2020082893A1 (zh) 基于区块链的交易处理方法及装置、电子设备
CN108876669A (zh) 应用于多平台教育资源共享的课程公证系统及方法
WO2021204044A1 (zh) 区块链数据的订正
US20250156584A1 (en) Data processing method and apparatus based on hierarchical chain network
CN111897839A (zh) 一种数据处理方法及系统
HK40010401A (zh) 基於区块链的记账方法及装置、电子设备
HK40010401B (zh) 基於区块链的记账方法及装置、电子设备
US12591889B2 (en) Blockchain-based source identifier
HK40047906B (zh) 一种基於区块链的节点管理方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19905297

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19905297

Country of ref document: EP

Kind code of ref document: A1