CN113127559B - Account book establishment method and device of financial block chain and computer equipment - Google Patents

Account book establishment method and device of financial block chain and computer equipment Download PDF

Info

Publication number
CN113127559B
CN113127559B CN201911424476.7A CN201911424476A CN113127559B CN 113127559 B CN113127559 B CN 113127559B CN 201911424476 A CN201911424476 A CN 201911424476A CN 113127559 B CN113127559 B CN 113127559B
Authority
CN
China
Prior art keywords
invoice
block
transaction
deduction
invoicing
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
CN201911424476.7A
Other languages
Chinese (zh)
Other versions
CN113127559A (en
Inventor
偶瑞军
宋颖
何万玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Corp filed Critical Aisino Corp
Priority to CN201911424476.7A priority Critical patent/CN113127559B/en
Publication of CN113127559A publication Critical patent/CN113127559A/en
Application granted granted Critical
Publication of CN113127559B publication Critical patent/CN113127559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • G06Q30/00Commerce
    • G06Q30/04Billing or invoicing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The application discloses a financial account book establishment method, device and computer equipment of financial block chains, which relate to the technical field of block chains and are used for improving the query efficiency of the financial account book in the financial block chains, wherein the method comprises the following steps: generating an invoice picking block according to invoice picking transactions for picking up blank invoices, and establishing an invoice picking chain based on the invoice picking block, wherein the invoice picking chain is formed by sequentially linking at least two invoice picking blocks according to the order of invoice identification; when an invoicing transaction of an invoicing is obtained, determining a first invoicing identifier of a blank invoicing used for the invoicing transaction, and establishing a corresponding relation between a first invoicing transaction block corresponding to the invoicing transaction and an invoice acquisition block corresponding to the first invoicing identifier; based on the first invoicing transaction block and the corresponding relation, an invoice issuing chain is established, wherein the invoice issuing chain is formed by sequentially linking at least two invoicing transaction blocks with the corresponding relation with the same invoice receiving block; a first ledger is generated based on the invoice retrieval chain and the invoice issuing chain.

Description

Account book establishment method and device of financial block chain and computer equipment
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method and an apparatus for creating an account book of a financial blockchain, and a computer device.
Background
Blockchain technology, also known as distributed ledger technology, is an emerging technology that is commonly engaged in "accounting" by several computing devices, together maintaining a complete distributed database.
At present, the longer adopted blockchain distributed account book is generally constructed by correspondingly packaging transaction information into transaction blocks according to transaction time and sequentially linking the transaction blocks, or is constructed by adopting a directed acyclic graph technology according to the transaction time. However, in the financial block chain, tax and invoice related to the transaction are usually checked, and when the distributed account book established according to the transaction time is checked, the account book is arranged irregularly, so that the checking time is more and the efficiency is low, and a new account book needs to be built for the financial block chain.
Disclosure of Invention
The embodiment of the application provides a method, a device and computer equipment for establishing an account book of a financial block chain, which are used for providing a new account book and improving the query efficiency of the account book in the financial block chain.
In one aspect, a method for setting up an account book of a financial block chain is provided, including:
Generating invoice picking blocks according to invoice picking transactions for picking up blank invoices, and establishing an invoice picking chain based on the invoice picking blocks, wherein the invoice picking chain is formed by sequentially linking at least two invoice picking blocks according to the order of invoice identifications, the invoice identifications comprise invoice codes and invoice numbers, and the invoice picking blocks are used for recording blank invoice picking information;
when an invoicing transaction of an invoicing is obtained, determining a first invoicing identifier of a blank invoicing used for the invoicing transaction, and establishing a corresponding relation between a first invoicing transaction block corresponding to the invoicing transaction and an invoice acquisition block corresponding to the first invoicing identifier, wherein the first invoicing transaction block is used for recording transaction information corresponding to the invoicing transaction;
based on the first billing transaction block and the corresponding relation, an invoice billing chain is established, wherein the invoice billing chain is formed by sequentially linking at least two billing transaction blocks with the corresponding relation with the same invoice acquisition block;
and generating a first account book based on the invoice receiving chain and the invoice issuing chain.
In one possible design, the blank invoice is a special invoice for deduction, and after establishing an invoice issuing chain based on the first issuing transaction block and the correspondence, the method further includes:
When an invoice deduction transaction is obtained, determining a second invoice identification corresponding to the invoice deduction transaction;
according to the second invoice identification, establishing a corresponding relation between a first invoice deduction block corresponding to the invoice deduction transaction and the first invoice transaction block, and establishing an invoice deduction chain based on the first invoice deduction block; the invoice deduction chain is formed by sequentially linking at least two invoice deduction blocks corresponding to the same invoice deduction transaction block, and the first invoice deduction block is used for recording deduction information corresponding to the invoice deduction transaction;
and generating a second account book based on the invoice receiving chain, the invoice issuing chain and the invoice deduction chain.
In one possible design, the invoice pickup block is generated according to an invoice pickup transaction for picking up a blank invoice, and specifically includes:
and packing transaction data corresponding to the invoice picking transaction generated in the preset time according to the preset time, and generating the invoice picking block.
In one possible design, establishing a correspondence between the first invoicing transaction block corresponding to the invoicing transaction and the invoice pickup block corresponding to the first invoice identifier includes:
performing encryption hash operation on blank invoice acquisition information recorded by the invoice acquisition block to obtain a first hash value corresponding to the invoice acquisition block;
If the first blank invoice corresponding to the first invoice identifier is a blank invoice recorded by the invoice picking block and is subjected to first sorting, the first hash value is used as a first hash pointer to be added into the block head of the first invoice transaction block, so that the first invoice transaction block is linked to the invoice picking block through the first hash pointer, wherein the first hash pointer is a pointer pointing to the storage position of the first invoice transaction block;
and if the first blank invoice is a blank invoice except the blank invoice with the first sorting, the second blank invoice adjacent to the first invoice identification of the first blank invoice is acquired, the invoice identification is arranged before the first invoice identification, and a second hash value of a second invoicing transaction block corresponding to the second blank invoice is added into the block head of the first invoicing transaction block as a second hash pointer, so that the first invoicing transaction block is linked to the second invoicing transaction block through the second hash pointer, wherein the second hash pointer is a pointer pointing to the storage position of the second transaction invoicing transaction block.
In one possible design, establishing a correspondence between the first invoice deduction block corresponding to the invoice deduction transaction and the first invoice transaction block includes:
performing encryption hash operation on the transaction information recorded by the first billing transaction block to obtain a third hash value corresponding to the first billing transaction block;
if the first deducted invoice corresponding to the invoice deduction transaction is the first invoice used for deduction in the first invoicing transaction block, adding the third hash value as a third hash pointer into the block head of the first invoicing deduction block, so that the first invoicing deduction block is linked to the first invoicing transaction block through the third hash pointer; wherein the third hash pointer is a pointer pointing to the storage position of the first ticket issuing deduction block;
and if the first deducted invoice corresponding to the invoice deduction transaction is not the first invoice used for deduction in the first issuing transaction block, acquiring a second deducted invoice adjacent to the invoice identification of the first deducted invoice and positioned in front of the invoice identification of the first deducted invoice, and adding a fourth hash value of the second invoice deduction block corresponding to the second deducted invoice as a fourth hash pointer into a block head of the first issuing deduction block, so that the first issuing deduction block is linked to the second invoice deduction block through the fourth hash pointer, wherein the fourth hash pointer is a pointer pointing to a storage position of the second invoice deduction block.
In one possible design, the invoice picking chain, the invoice issuing chain and the invoice deduction chain are arranged in different directions.
In a second aspect, there is provided an account book establishment apparatus for financial blockchain, including:
the first establishing module is used for generating an invoice picking block according to invoice picking transactions for picking up blank invoices and establishing an invoice picking chain based on the invoice picking block, wherein the invoice picking chain is formed by sequentially linking at least two invoice picking blocks according to the order of invoice identifications, the invoice identifications comprise invoice codes and invoice numbers, and the invoice picking block is used for recording blank invoice picking information;
the system comprises a determining module, a first billing transaction block and a second billing transaction block, wherein the determining module is used for determining a first billing identification of blank billing used for billing transaction when billing transaction of invoices is obtained, and establishing a corresponding relation between the first billing transaction block corresponding to the billing transaction and an invoice receiving block corresponding to the first billing identification, wherein the first billing transaction block is used for recording transaction information corresponding to the billing transaction;
the second establishing module is used for establishing an invoice issuing chain based on the first issuing transaction block and the corresponding relation, wherein the invoice issuing chain is formed by sequentially linking at least two issuing transaction blocks with the corresponding relation with the same invoice receiving block;
And the generation module is used for generating a first account book based on the invoice receiving chain and the invoice issuing chain.
In one possible design, the apparatus further comprises a third setup module for:
when an invoice deduction transaction is obtained, determining a second invoice identification corresponding to the invoice deduction transaction;
according to the second invoice identification, establishing a corresponding relation between a first invoice deduction block corresponding to the invoice deduction transaction and the first invoice transaction block, and establishing an invoice deduction chain based on the first invoice deduction block; the invoice deduction chain is formed by sequentially linking at least two invoice deduction blocks corresponding to the same invoice deduction transaction block, and the first invoice deduction block is used for recording deduction information corresponding to the invoice deduction transaction;
and generating a second account book based on the invoice receiving chain, the invoice issuing chain and the invoice deduction chain.
In one possible design, the first establishing module is specifically configured to:
and packing transaction data corresponding to the invoice picking transaction generated in the preset time according to the preset time, and generating the invoice picking block.
In one possible design, the determining module is specifically configured to:
Establishing a corresponding relation between a first billing transaction block corresponding to the billing transaction and an invoice acquisition block corresponding to the first billing identifier, wherein the method comprises the following steps:
performing encryption hash operation on blank invoice acquisition information recorded by the invoice acquisition block to obtain a first hash value corresponding to the invoice acquisition block;
if the first blank invoice corresponding to the first invoice identifier is a blank invoice recorded by the invoice picking block and is subjected to first sorting, the first hash value is used as a first hash pointer to be added into the block head of the first invoice transaction block, so that the first invoice transaction block is linked to the invoice picking block through the first hash pointer, wherein the first hash pointer is a pointer pointing to the storage position of the first invoice transaction block;
and if the first blank invoice is a blank invoice except the blank invoice with the first sorting, the second blank invoice adjacent to the first invoice identification of the first blank invoice is acquired, the invoice identification is arranged before the first invoice identification, and a second hash value of a second invoicing transaction block corresponding to the second blank invoice is added into the block head of the first invoicing transaction block as a second hash pointer, so that the first invoicing transaction block is linked to the second invoicing transaction block through the second hash pointer, wherein the second hash pointer is a pointer pointing to the storage position of the second transaction invoicing transaction block.
In one possible design, the third building block is specifically configured to:
performing encryption hash operation on the transaction information recorded by the first billing transaction block to obtain a third hash value corresponding to the first billing transaction block;
if the first deducted invoice corresponding to the invoice deduction transaction is the first invoice used for deduction in the first invoicing transaction block, adding the third hash value as a third hash pointer into the block head of the first invoicing deduction block, so that the first invoicing deduction block is linked to the first invoicing transaction block through the third hash pointer; wherein the third hash pointer is a pointer pointing to the storage position of the first ticket issuing deduction block;
and if the first deducted invoice corresponding to the invoice deduction transaction is not the first invoice used for deduction in the first issuing transaction block, acquiring a second deducted invoice adjacent to the invoice identification of the first deducted invoice and positioned in front of the invoice identification of the first deducted invoice, and adding a fourth hash value of the second invoice deduction block corresponding to the second deducted invoice as a fourth hash pointer into a block head of the first issuing deduction block, so that the first issuing deduction block is linked to the second invoice deduction block through the fourth hash pointer, wherein the fourth hash pointer is a pointer pointing to a storage position of the second invoice deduction block.
In one possible design, the invoice picking chain, the invoice issuing chain and the invoice deduction chain are arranged in different directions.
In a third aspect, there is provided a computer device comprising:
a memory for storing program instructions;
and a processor for calling program instructions stored in the memory, and executing steps comprised in any one of the methods of the first aspect according to the obtained program instructions.
In a fourth aspect, there is provided a storage medium storing computer-executable instructions for causing a computer to perform the steps comprised in any one of the methods of the first aspect.
In a fifth aspect, there is provided a computer program product enabling a computer device to carry out the steps comprised by any of the methods of the first aspect, when said computer program product is run on a computer device.
The technical scheme provided by the embodiment of the application at least brings the following beneficial effects:
in the embodiment of the application, an invoice pickup transaction for picking up a blank invoice can be generated into a plurality of invoice pickup blocks, and an invoice pickup chain formed by sequentially linking at least two invoice pickup blocks is established, wherein the invoice pickup blocks are used for recording blank invoice pickup information; when an invoicing transaction of an invoicing is obtained, a first invoicing identifier of a blank invoicing used for the invoicing transaction can be determined, and a corresponding relation between a first invoicing transaction block corresponding to the invoicing transaction and an invoice acquisition block corresponding to the first invoicing identifier is established, wherein the first invoicing transaction block is used for recording transaction information corresponding to the invoicing transaction; based on the first billing transaction block and the corresponding relation, an invoice billing chain is established, wherein the invoice billing chain is formed by sequentially linking at least two billing transaction blocks with the corresponding relation with the same invoice receiving block; and then a first ledger may be generated based on the invoice retrieval chain and the invoice issuing chain. Therefore, the method can realize the classification and unified management of the invoicing transactions under each invoice picking block, and can directly jump to an invoice issuing chain corresponding to the invoice picking chain to search all invoice transaction information corresponding to the invoice based on the invoice picking chain when all invoice transactions corresponding to a certain invoice are required to be searched, so that the invoice searching time is saved, the searching efficiency is improved, and the management efficiency of the invoice transaction information is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application.
FIG. 1 is a schematic diagram of a related art distributed ledger based on a chain structure;
FIG. 2 is a schematic diagram of a distributed ledger constructed based on DAG technology in the related art;
FIG. 3 is a flowchart of a method for creating an account book for a financial blockchain according to an embodiment of the present application;
FIG. 4 is a flow chart for establishing an invoice deduction chain provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram of a second account book generated by the technical invoice picking chain, the invoice issuing chain and the invoice deduction chain according to the embodiment of the present application;
FIG. 6a is a schematic diagram of a device for creating an account book of a financial blockchain according to an embodiment of the present application;
FIG. 6b is a schematic diagram of another account setup device for a financial blockchain according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present application, but not all embodiments. All other embodiments, which can be made by a person of ordinary skill in the art without any inventive effort, based on the embodiments described in the present application are intended to be within the scope of the technical solutions of the present application.
The terms first and second in the description and claims of the present application and in the above-described figures are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. In the embodiments of the present application, "a plurality" may mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Some of the concepts involved in the embodiments of the present application are described below.
Directed acyclic graphs, (Directed Acyclic Graph, DAG), are one implementation based on graphs. Where "directional" means directional, precisely the same direction, and "loop-free" means not closed-loop-free. The DAG does not allow the presence of directed loops because the DAG can guarantee the order of node transactions and find the backbone through this order, which can cause systematic disorders if a directed loop is present. In DAG, there is no concept of blocks, and the transaction itself is directly stored as a basic unit, thus saving the time taken to pack the transaction data into transaction blocks.
The following describes the design concept of the present application.
As described above, there are two types of blockchain distributed ledgers that are currently used, and one type of the blockchain distributed ledgers is a distributed ledger based on a chain structure as shown in fig. 1, in this distributed ledger, transaction data can be packed to generate transaction blocks, and the generated transaction blocks are linked together sequentially according to time, that is, from the first block, the so-called creation block, a newly added block is continuously connected to the back of the last block to form a chain. The other is a distributed ledger constructed based on the DAG technology as shown in fig. 2, where the DAG is a network composed of transaction units, and transaction data can be asynchronously and concurrently written, and one circle in fig. 2 represents one transaction unit.
However, for the same invoice, at least two transactions including a blank invoice picking transaction and an invoice making transaction using the invoice are included, and according to different transaction time, the two transactions may be separated for a long time, for example, 1 month picking the invoice, and 3 months making the invoice using 1 month picking the invoice. If the account book is constructed according to the transaction time, two transactions of the same invoice can be distributed in different transaction blocks or transaction units. Thus, in the financial tax service, when the transaction data of the same invoice needs to be checked, the transaction data may need to be searched in different blocks or units, so that the time is long, the query efficiency is low, and the management of the financial tax service is not facilitated.
In view of this, the applicant of the present application provides a new account book establishment scheme of financial and tax block chain, in the scheme, blank invoice pickup transactions and invoicing transactions related to the same invoice can be differentiated, that is, blank invoice transactions and invoicing transactions within a preset time can be respectively packed into an invoice pickup block and an invoicing transaction block, further, an invoice pickup chain can be generated based on the invoice pickup block, and according to invoice identifications corresponding to the invoicing transactions, an invoice pickup block corresponding to invoicing transactions using invoices can be found, and further, the invoicing transaction blocks generated by all invoicing transactions corresponding to the invoice pickup block can be sequentially linked into an invoice issuing chain according to the invoice identifications. Therefore, all invoice transactions of the same invoice can be classified and managed, so that the account checking is facilitated, and the inquiring efficiency of the financial tax block chain account is improved.
After the design concept of the embodiment of the present application is introduced, some simple descriptions are made below for application scenarios applicable to the technical solution provided in the embodiment of the present application, and it should be noted that the application scenarios described below are only used to illustrate the embodiment of the present application and are not limiting. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
The technical scheme provided by the embodiment of the application can be applied to financial tax service management, and in order to facilitate management of financial tax service, a financial tax block chain multi-chain invoice system corresponding to the financial tax service can be established. The financial block chain multi-chain invoice system comprises an article circulation chain, a fund settlement chain and a tax invoice chain, wherein:
an article circulation chain for recording an initial transaction of an article, the initial transaction being generated from an original resource such as an area of a certain type of medicine field and a yield per unit time, a reserve of a certain type of mineral deposit and a yield per unit time, and the like, and a subsequent transaction of the article being based on the initial transaction.
And the fund settlement chain is used for recording the fund settlement transaction.
The tax invoice chain is used for recording tax business and invoice states, in the invoice issuing link, the issuing information is not directly input by both transaction parties, but the circulation transaction of funds and commodities corresponding to the transaction objects can be used as the input information of issuing, the rationality of the circulation transaction is judged by the constraint condition on the tax invoice chain, and the issuing information is generated when the tax invoice is reasonable, so that the invoice issuing is carried out. Constraints such as whether the raw material yield exceeds a reasonable value, whether the frequency of transactions is normal, etc.
Tax authorities' nodes may be provided in the tax invoice chain, which may be used to conduct invoice related transactions such as blank invoice transactions, invoicing transactions, invoice deduction transactions, and the like.
In a specific practice process, for any transaction in the tax invoice chain, the corresponding funds settlement transaction and commodity circulation transaction are taken as input states of consumption. After tax invoice issuing transaction is completed, the issuing state of the corresponding fund settlement transaction is locked, the issuing state cannot be used as the input state of the issuing transaction any more, and the issuing state of the corresponding commodity circulation transaction is also locked, and the issuing state cannot be used as the input state of the issuing transaction any more.
In a specific practical process, transactions related to invoices generated based on the financial blockchain multi-chain invoice system can be managed by using the technical scheme in the embodiment of the application.
In order to further explain the technical solutions provided in the embodiments of the present application, the following details are described with reference to the accompanying drawings and the detailed description. Although the embodiments of the present application provide the method operational steps as shown in the following embodiments or figures, more or fewer operational steps may be included in the method, either on a routine or non-inventive basis. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided by the embodiments of the present application. The methods may be performed sequentially or in parallel as shown in the embodiments or the drawings when the actual processing or the apparatus is performed.
Referring to fig. 3, a flowchart of a method for setting up an account book of a financial blockchain according to an embodiment of the present application may be applied to the foregoing financial blockchain multi-chain system, and the following describes the flow of the method.
Step 301: and generating an invoice picking block according to invoice picking transactions for picking up blank invoices, and establishing an invoice picking chain based on the invoice picking block, wherein the invoice picking chain is formed by sequentially linking at least two invoice picking blocks according to the order of invoice identifications, the invoice identifications comprise invoice codes and invoice numbers, and the invoice picking block is used for recording blank invoice picking information.
In a specific practical process, units and individuals can pick up blank invoices according to own invoice demands by tax authority nodes arranged in the tax invoice chain, namely, invoice picking transactions can be carried out. Further, after receiving the invoice, an invoice transaction related to the invoice such as an invoice transaction for invoice issuing can be performed.
In the embodiment of the application, the invoice pickup transaction for picking up the blank invoice can be distinguished from the invoice transaction, and the transaction data corresponding to the invoice pickup transaction generated in the preset time are packed to generate the invoice pickup block. Each invoice pickup block may be divided into two parts, a block header and block data, wherein the block header has a hash pointer therein that contains the hash value of the previous invoice pickup block and thus may be used to point to the previous invoice pickup block. Furthermore, when a plurality of invoice pickup blocks are generated according to a plurality of preset times, the invoice pickup blocks generated in different preset times can be sequentially linked according to the order of invoice identification through the hash pointer, and an invoice pickup chain corresponding to blank invoice transactions is established. Therefore, the blank invoice transaction can be uniformly managed through the invoice picking chain, and when the blank invoice needs to be searched, the query speed of the invoice picking block corresponding to the blank invoice transaction can be improved.
For example, assuming that the preset time is 1 day, the first day a takes 1-100 blank invoices, the B takes 101-200 blank invoices, and the second day C takes 201-300 blank invoices; and furthermore, the 1-100 blank invoices which are received by the A unit and the 101-200 blank invoices which are received by the B unit can be packed into a 1 invoice receiving block, the 201-300 blank invoices which are received by the C unit are packed into a 2 invoice receiving block, and the 2 invoice receiving block is linked behind the 1 invoice receiving block. And if the blank invoice is received by other units in the third day, the blank invoice received in the third day can be packed into an invoice receiving block No. 3, the invoice receiving block No. 3 is linked with the invoice receiving block No. 2, and then the like, so that an invoice receiving chain is constructed.
In an embodiment of the present application, the invoice identification includes an invoice code and an invoice number. Wherein the invoice code is used for representing the type of the invoice, and the invoice codes of a plurality of invoices of the same type can be the same; the invoice code is typically a 12-digit number. The invoice number is the number of the invoice, one invoice is provided with the number of each invoice; the invoice code is typically an 8-digit number. The invoice can be identified by adding the invoice number to the invoice code.
Step 302: when the invoicing transaction of the invoicing is detected, determining a first invoicing identifier of a blank invoicing used for the invoicing transaction, and establishing a corresponding relation between a first invoicing transaction block corresponding to the invoicing transaction and an invoice acquisition block corresponding to the first invoicing identifier, wherein the first invoicing transaction block is used for recording transaction information corresponding to the invoicing transaction.
The first billing transaction block in the embodiment of the application, like the invoice picking block, also includes a block header and block data, and a hash pointer is also provided in the block header, and the hash pointer can be used to link the first billing transaction block with other block chains.
In the embodiment of the application, when the invoicing transaction of the invoicing is obtained, the transaction information corresponding to the invoicing transaction can be packaged, and the first invoicing transaction block is generated. The transaction information may include information related to the transaction, such as the type, quantity, unit price of the item being transacted, time of transaction, rules of transaction, and the like. For example, the first billing transaction block may be generated by packaging the item type, item price, and item quantity of the transaction.
Further, according to the invoicing transaction, a first invoice identification of the invoice used in the invoicing transaction can be determined. Therefore, according to the first invoice identification, the invoice receiving block of the blank invoice corresponding to the first invoice identification can be determined, and the corresponding relation between the first invoice transaction block and the invoice receiving block is established.
In this embodiment of the present application, the corresponding relationship between the first billing transaction block and the invoice receiving block may be that the first billing transaction block is directly linked with the invoice receiving block, or that the first billing transaction block is linked to the invoice receiving block through other billing transaction blocks.
Specifically, when the corresponding relation between the first billing transaction block and the invoice receiving block is established, encryption hash operation can be performed on blank invoice receiving information recorded by the invoice receiving block, so as to obtain a first hash value corresponding to the invoice receiving block. And further determining whether the first blank invoice corresponding to the first invoice identification is the blank invoice with the first identification order in all blank invoices recorded by the invoice pickup block.
If the first blank invoice is the first blank invoice sequenced in the blank invoices recorded by the invoice picking block, the first hash value can be used as a first hash pointer to be added into the block head of the first invoicing transaction block, so that the first invoicing transaction block is linked to the invoice picking block through the first hash pointer. Wherein the first hash pointer is a pointer to a first billing transaction block storage location. That is, the storage address of the invoice retrieving block corresponding to the first hash pointer may be determined through the first hash pointer, and the invoice retrieving block stored in the storage address is determined to be the invoice retrieving block connected to the first invoicing transaction block, so that the first invoicing transaction block may be linked to the invoice retrieving block, that is, the first invoicing transaction block and the invoice retrieving block are connected together.
It should be noted that, in the embodiment of the present application, the linking refers to connecting a plurality of blocks together two by two, so that a plurality of blocks may form a blockchain.
Further, if the first blank invoice is a blank invoice except for the blank invoice with the first sequence in the invoice receiving block, that is, the first blank invoice is not the blank invoice with the first sequence in the invoice receiving block, a second blank invoice adjacent to the first invoice identification and with the invoice identification arranged before the first invoice identification can be obtained according to the first invoice identification of the first blank invoice. And then the invoicing transaction using the second blank invoice and a second invoicing transaction block corresponding to the invoicing transaction can be determined. Then, the hash value of the second transaction block can be obtained by performing the encryption hash operation on the transaction information corresponding to the second billing transaction block. The second hash value of the second invoicing transaction block may thereby be added as a second hash pointer to the block header of the first invoicing transaction block such that the first invoicing transaction block is linked to the second invoicing transaction block by the second hash pointer. Wherein the second hash pointer is a pointer to a second transaction billing transaction block storage location. That is, the storage address of the second billing transaction block corresponding to the first billing transaction block can be determined through the second hash pointer, and the second billing transaction block stored in the storage address is determined to be the billing transaction block connected with the first billing transaction block, so that the first billing transaction block is linked to the second billing transaction block.
Step 303: and establishing an invoice issuing chain based on the first issuing transaction block and the corresponding relation, wherein the invoice issuing chain is formed by sequentially linking at least two issuing transaction blocks with the corresponding relation with the same invoice receiving block.
In the embodiment of the application, the invoice issuing chain can be established based on the first issuing transaction block and the corresponding relation between the first issuing transaction block and the invoice receiving block. As described above, if the hash pointer carried by the area head in the first billing transaction block points to the invoice receiving block, the first billing transaction block can be directly linked to the invoice receiving block, and an invoice billing chain is established; if the hash pointer carried by the block head part in the first invoicing transaction block points to other invoicing transaction blocks, the first invoicing transaction block can be linked to the other invoicing transaction blocks, and indirectly linked to the invoice receiving block through the other invoicing transaction blocks, so as to establish an invoice issuing chain. Therefore, all the invoicing transaction blocks corresponding to one invoice receiving block can be linked into an invoice issuing chain according to the invoice identification sequence, and the invoicing transaction blocks can be managed uniformly through the invoice issuing chain, so that the efficiency of inquiring transaction information in the invoicing transaction blocks can be improved, and the inquiry time is saved.
Step 304: a first ledger is generated based on the invoice retrieval chain and the invoice issuing chain.
In this embodiment of the present application, the directions of arrangement of the invoice receiving chain and the invoice issuing chain are different, for example, assuming that the invoice receiving chain is a block chain arranged transversely, the invoice issuing chain may be a block chain arranged longitudinally. And each invoice picking block in the invoice picking chain may correspond to one invoice issuing chain, and further the first account book may be generated based on the invoice picking chain and the invoice issuing chain. Therefore, the invoicing transaction under each invoice picking block can be classified and uniformly managed, when all invoice transactions corresponding to a certain invoice need to be inquired, the invoice picking chain can be directly jumped to the invoice issuing chain corresponding to the invoice picking chain to search all invoice transaction information corresponding to the invoice, so that the invoice inquiry time can be saved, the inquiry efficiency is improved, and the management efficiency of the invoice transaction information is improved.
In the embodiment of the application, in addition to the blank invoice transaction and the invoicing transaction, according to the type of the blank invoice, when the blank invoice is a special invoice which can be used for tax deduction, such as a value-added tax special invoice, the invoice transaction can also comprise an invoice deduction transaction.
Referring to FIG. 4, a flowchart for establishing an invoice deduction chain is shown. In this embodiment of the present application, after the invoice issuing chain is established based on the first issuing transaction block and the correspondence relationship, if there is an invoice deduction transaction, the invoice deduction transaction may also be performed according to the steps shown in fig. 4. The steps in fig. 4 include:
step 401: and when the invoice deduction transaction is obtained, determining a second invoice identification corresponding to the invoice deduction transaction.
In the embodiment of the application, when the invoice deduction transaction is obtained, the deduction invoice corresponding to the invoice deduction transaction and the second invoice identification of the deduction invoice can be determined. The second invoice identification also includes an invoice code and an invoice number, so that a corresponding invoice can be looked up from the second invoice identification.
Step 402: according to the second invoice identification, establishing a corresponding relation between a first invoice deduction block and a first invoice transaction block corresponding to invoice deduction transaction, and establishing an invoice deduction chain based on the first invoice deduction block; the invoice deduction chain is formed by sequentially linking at least two invoice deduction blocks corresponding to the same invoice deduction transaction block, and the first invoice deduction block is used for recording deduction information corresponding to the invoice deduction transaction.
In this embodiment of the present application, the corresponding relationship between the first invoice deduction block and the first invoice transaction block may be that the first invoice deduction block is directly connected to the first invoice transaction block, or that the first invoice deduction block is indirectly connected to the first invoice transaction block through other invoice deductions.
Specifically, when the corresponding relation between the first billing deduction block and the first billing transaction block is established, encryption hash operation can be performed on the transaction information recorded by the first billing transaction block, so as to obtain a third hash value corresponding to the first billing transaction block. And then, according to the second invoice identification, whether the first deduction invoice corresponding to the invoice deduction transaction is the first invoice used for deduction in all available deduction invoices in the first billing transaction block can be determined.
If the first deducted invoice corresponding to the invoice deduction transaction is the first invoice used for deduction in the first invoice transaction block, the third hash value can be used as a third hash pointer to be added into the block head of the first invoice deduction block, so that the first invoice deduction block is linked to the first invoice transaction block through the third hash pointer; the third hash pointer is a pointer pointing to the storage position of the first invoice deduction block. That is, the storage address of the first billing transaction block corresponding to the first billing deduction block can be determined through the third hash pointer, and the first billing transaction block stored in the storage address is determined to be the billing transaction block connected with the first billing deduction block, so that the first billing deduction block can be linked to the first billing transaction block.
Further, if the first deducted invoice corresponding to the invoice deduction transaction is not the first invoice used for deduction in the first invoice transaction block, a second deducted invoice adjacent to the invoice identification of the first deducted invoice and positioned in front of the invoice identification of the first deducted invoice can be obtained from the first invoice transaction block, and further a second invoice deduction block corresponding to the second deducted invoice can be determined, encryption hash operation is performed on invoice deduction information corresponding to the second invoice deduction block, a fourth hash value corresponding to the second invoice deduction block is obtained, the fourth hash value is used as a fourth hash pointer to be added to the block head of the first invoice deduction block, so that the first invoice deduction block is linked to the second invoice deduction block through the fourth hash pointer, and the fourth hash pointer is a pointer pointing to the storage position of the second invoice deduction block. That is, the storage address of the second invoice deduction block corresponding to the first invoice deduction block can be determined through the fourth hash pointer, and the second invoice deduction block stored in the storage address is determined to be the invoice deduction block connected with the first invoice deduction block, so that the first invoice deduction block is linked to the second invoice deduction block.
Step 403: and generating a second account book based on the invoice receiving chain, the invoice issuing chain and the invoice deduction chain.
In this embodiment of the present application, the invoice receiving chain, the invoice issuing chain and the invoice deduction chain may be respectively arranged in three different directions, as shown in fig. 5, and the situation that the invoice receiving chain is parallel to the invoice deduction chain may also occur. Specifically, among the three blockchains, each invoice receiving block in the invoice receiving chain may correspond to one invoice issuing chain, and each invoice transaction block in the invoice issuing chain may correspond to one invoice deduction chain, i.e. an intersection point between the invoice deduction chain and the invoice receiving chain may not exist. And a second account book can be generated based on the invoice picking chain, the invoice issuing chain and the invoice deduction chain so as to realize the classification and unified management of all invoice transactions related to the same invoice, when the invoice transactions corresponding to a certain invoice need to be inquired, the invoice picking chain can be directly jumped to the corresponding invoice issuing chain according to the invoice identification, and then the invoice issuing chain is jumped to the invoice deduction chain, so that all blocks do not need to be traversed, the inquiry time of the invoice transactions can be prolonged, the inquiry efficiency is improved, and the management efficiency of invoice transaction information is improved.
Therefore, through the method, the invoice picking transaction for picking up the blank invoice can be generated into a plurality of invoice picking blocks, and an invoice picking chain formed by sequentially linking at least two invoice picking blocks according to the invoice identification sequence is established. When an invoicing transaction of an invoicing is obtained, a first invoicing identifier of a blank invoicing used for the invoicing transaction can be determined, and a corresponding relation between a first invoicing transaction block corresponding to the invoicing transaction and an invoice acquisition block corresponding to the first invoicing identifier is established; based on the first billing transaction block and the corresponding relation, an invoice billing chain is established; and then a first ledger may be generated based on the invoice retrieval chain and the invoice issuing chain. Therefore, the invoicing transaction under each invoice picking block can be classified and uniformly managed, when all invoice transactions corresponding to a certain invoice need to be inquired, the invoice picking chain can be directly jumped to the invoice issuing chain corresponding to the invoice picking chain to search all invoice transaction information corresponding to the invoice, so that the invoice inquiry time is saved, the inquiry efficiency is improved, and the management efficiency of the invoice transaction information is improved.
Based on the same inventive concept, the embodiment of the application also provides a financial account book establishment device of the financial block chain, which can realize the functions corresponding to the financial account book establishment method of the financial block chain. The account book establishment device of the financial block chain can be a hardware structure, a software module or a hardware structure plus a software module. The account book establishment device of the financial block chain can be realized by a chip system, and the chip system can be formed by a chip or can comprise the chip and other discrete devices. Referring to fig. 6a, the account book establishment device of the financial blockchain includes a first establishment module 601, a determination module 602, a second establishment module 603, and a generation module 604. Wherein:
The first establishing module 601 is configured to generate an invoice pickup block according to an invoice pickup transaction for picking up a blank invoice, and establish an invoice pickup chain based on the invoice pickup block, where the invoice pickup chain is formed by sequentially linking at least two invoice pickup blocks according to an order of invoice identifications, the invoice identifications include an invoice code and an invoice number, and the invoice pickup block is configured to record blank invoice pickup information;
the determining module 602 is configured to determine a first invoice identifier of a blank invoice used for an invoicing transaction when obtaining the invoicing transaction of the invoice, and establish a corresponding relationship between a first invoicing transaction block corresponding to the invoicing transaction and an invoice pickup block corresponding to the first invoice identifier, where the first invoicing transaction block is configured to record transaction information corresponding to the invoicing transaction;
a second establishing module 603, configured to establish an invoice issuing chain based on the first issuing transaction block and the corresponding relationship, where the invoice issuing chain is formed by sequentially linking at least two issuing transaction blocks having a corresponding relationship with the same invoice receiving block;
the generating module 604 is configured to generate a first ledger based on the invoice receiving chain and the invoice issuing chain.
In one possible design, please refer to fig. 6b, the account book establishment device of the financial blockchain shown in fig. 6b further includes a third establishment module 605, where the third establishment module 605 is configured to:
When the invoice deduction transaction is obtained, determining a second invoice identification corresponding to the invoice deduction transaction;
according to the second invoice identification, establishing a corresponding relation between a first invoice deduction block and a first invoice transaction block corresponding to invoice deduction transaction, and establishing an invoice deduction chain based on the first invoice deduction block; the invoice deduction chain is formed by sequentially linking at least two invoice deduction blocks corresponding to the same invoice deduction transaction block, and the first invoice deduction block is used for recording deduction information corresponding to the invoice deduction transaction;
and generating a second account book based on the invoice receiving chain, the invoice issuing chain and the invoice deduction chain.
In one possible design, the first setup module 601 is specifically configured to:
and packing transaction data corresponding to the invoice pickup transaction generated in the preset time according to the preset time, and generating an invoice pickup block.
In one possible design, the determining module 602 is specifically configured to:
establishing a corresponding relation between a first billing transaction block corresponding to billing transaction and an invoice acquisition block corresponding to a first billing identifier, wherein the method comprises the following steps:
performing encryption hash operation on blank invoice acquisition information recorded by an invoice acquisition block to obtain a first hash value corresponding to the invoice acquisition block;
If the first blank invoice corresponding to the first invoice identifier is a blank invoice recorded in the invoice picking block and the first blank invoice is sequenced, adding the first hash value as a first hash pointer into the block head of the first invoice transaction block, so that the first invoice transaction block is linked to the invoice picking block through the first hash pointer, wherein the first hash pointer is a pointer pointing to the storage position of the first invoice transaction block;
if the first blank invoice is a blank invoice except for the first blank invoice in the invoice receiving block records, a second blank invoice adjacent to a first invoice identifier of the first blank invoice and arranged in front of the first invoice identifier is acquired, and a second hash value of a second invoicing transaction block corresponding to the second blank invoice is added to the block head of the first invoicing transaction block as a second hash pointer, so that the first invoicing transaction block is linked to the second invoicing transaction block through the second hash pointer, wherein the second hash pointer is a pointer pointing to the storage position of the second transaction invoicing transaction block.
In one possible design, the third setup module 605 is specifically configured to:
performing encryption hash operation on transaction information recorded by the first billing transaction block to obtain a third hash value corresponding to the first billing transaction block;
If the first deducted invoice corresponding to the invoice deduction transaction is the first invoice used for deduction in the first invoice transaction block, adding a third hash value as a third hash pointer into the block head of the first invoice deduction block, so that the first invoice deduction block is linked to the first invoice transaction block through the third hash pointer; the third hash pointer is a pointer pointing to the storage position of the first ticket issuing deduction block;
and if the first deducted invoice corresponding to the invoice deduction transaction is not the first invoice used for deduction in the first invoice issuing transaction block, acquiring a second deducted invoice adjacent to the invoice identification of the first deducted invoice, wherein the invoice identification is positioned in front of the invoice identification of the first deducted invoice, and adding a fourth hash value of the second invoice deduction block corresponding to the second deducted invoice as a fourth hash pointer into a block head of the first invoice deduction block, so that the first invoice deduction block is linked to the second invoice deduction block through the fourth hash pointer, wherein the fourth hash pointer is a pointer pointing to a storage position of the second invoice deduction block.
In one possible design, the invoice picking chain, the invoice issuing chain and the invoice deduction chain are arranged in different directions.
The detailed manner in which the respective modules perform the operations in the account book setting-up apparatus of the financial blockchain in the above embodiment has been described in detail in the embodiments related to the method, and will not be described in detail herein.
The division of the modules in the embodiments of the present disclosure is schematically shown as merely one logic function division, and there may be another division manner when actually implemented, and in addition, each functional module in the embodiments of the present disclosure may be integrated in one processor, or may exist separately and physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules.
Based on the same inventive concept, a computer device is provided in the embodiments of the present application, where the computer device may be a hardware structure, a software module, or a hardware structure plus a software module. The computer device may be implemented by a chip system, which may be formed by a chip, or may include a chip and other discrete devices. Referring to fig. 7, in the embodiment of the present application, the computer device includes at least one processor 701 and a memory 702 connected to the at least one processor, and the embodiment of the present application is not limited to a specific connection medium between the processor 701 and the memory 702, and in fig. 7, the connection between the processor 701 and the memory 702 is taken as an example, and the bus 700 is shown in a thick line in fig. 7, and the connection manner between other components is only illustrative and not limited to the example. The bus 700 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 7 for convenience of representation, but does not represent only one bus or one type of bus.
In the embodiment of the present application, the memory 702 stores instructions executable by the at least one processor 701, and the at least one processor 701 can execute the steps included in the foregoing account book establishment method of the financial blockchain by executing the instructions stored in the memory 702.
The hardware structure of the processor 701 may be CPU, DSP, ASIC, etc., and the hardware structure of the memory 702 may be flash memory, a hard disk, a multimedia card, a card memory, RAM, SRAM, etc., which will not be described repeatedly herein.
The processor 701 is a control center of a computer device, and may use various interfaces and lines to connect various parts of the entire computer device, and by executing or executing instructions stored in the memory 702 and invoking data stored in the memory 702, various functions of the computer device and processing data, thereby performing overall monitoring of the computer device.
Alternatively, the processor 701 may include one or more processing units, and the processor 701 may integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, a user interface, and application programs, etc., and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 701. In some embodiments, processor 701 and memory 702 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
Based on the same inventive concept, embodiments of the present application also provide a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the steps of the ledger-building method of financial blockchains as described above.
In some possible embodiments, aspects of the account setting up method of a financial blockchain provided in the present application may also be implemented in the form of a program product, which includes program code for causing a computer device to execute the steps in the account setting up method of a financial blockchain according to the various exemplary embodiments of the present application described above in the present specification, when the program product is run on the computer device corresponding to the account setting up method of a financial blockchain.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (9)

1. A method for creating an account book for a financial blockchain, comprising:
generating invoice picking blocks according to invoice picking transactions for picking up blank invoices, and establishing an invoice picking chain based on the invoice picking blocks, wherein the invoice picking chain is formed by sequentially linking at least two invoice picking blocks according to the order of invoice identifications, the invoice identifications comprise invoice codes and invoice numbers, and the invoice picking blocks are used for recording blank invoice picking information;
When an invoicing transaction of an invoicing is obtained, determining a first invoicing identifier of a blank invoicing used for the invoicing transaction, and establishing a corresponding relation between a first invoicing transaction block corresponding to the invoicing transaction and an invoice acquisition block corresponding to the first invoicing identifier, wherein the first invoicing transaction block is used for recording transaction information corresponding to the invoicing transaction;
based on the first billing transaction block and the corresponding relation, an invoice billing chain is established, wherein the invoice billing chain is formed by sequentially linking at least two billing transaction blocks with the corresponding relation with the same invoice acquisition block;
generating a first ledger based on the invoice receiving chain and the invoice issuing chain;
the method for establishing the corresponding relation between the first invoicing transaction block corresponding to the invoicing transaction and the invoice receiving block corresponding to the first invoicing identifier comprises the following steps:
performing encryption hash operation on blank invoice acquisition information recorded by the invoice acquisition block to obtain a first hash value corresponding to the invoice acquisition block;
if the first blank invoice corresponding to the first invoice identifier is a blank invoice recorded by the invoice picking block and is subjected to first sorting, the first hash value is used as a first hash pointer to be added into the block head of the first invoice transaction block, so that the first invoice transaction block is linked to the invoice picking block through the first hash pointer, wherein the first hash pointer is a pointer pointing to the storage position of the invoice picking block;
And if the first blank invoice is a blank invoice except the blank invoice with the first sorting, the second blank invoice adjacent to the first invoice identification of the first blank invoice is acquired, the invoice identification is arranged before the first invoice identification, and a second hash value of a second invoicing transaction block corresponding to the second blank invoice is added into the block head of the first invoicing transaction block as a second hash pointer, so that the first invoicing transaction block is linked to the second invoicing transaction block through the second hash pointer, wherein the second hash pointer is a pointer pointing to the storage position of the second invoicing transaction block.
2. The method of claim 1, wherein the blank invoice is a special invoice for deduction, and wherein after establishing an invoice issuing chain based on the first issuing transaction block and the correspondence, the method further comprises:
when an invoice deduction transaction is obtained, determining a second invoice identification corresponding to the invoice deduction transaction;
according to the second invoice identification, establishing a corresponding relation between a first invoice deduction block corresponding to the invoice deduction transaction and the first invoice transaction block, and establishing an invoice deduction chain based on the first invoice deduction block; the invoice deduction chain is formed by sequentially linking at least two invoice deduction blocks corresponding to the same invoice deduction transaction block, and the first invoice deduction block is used for recording deduction information corresponding to the invoice deduction transaction;
And generating a second account book based on the invoice receiving chain, the invoice issuing chain and the invoice deduction chain.
3. The method of claim 2, wherein generating an invoice pickup block based on an invoice pickup transaction that picks up a blank invoice, comprises:
and packing transaction data corresponding to the invoice picking transaction generated in the preset time according to the preset time, and generating the invoice picking block.
4. The method of claim 2, wherein establishing a correspondence of a first invoice deduction block corresponding to the invoice deduction transaction with the first invoice transaction block comprises:
performing encryption hash operation on the transaction information recorded by the first billing transaction block to obtain a third hash value corresponding to the first billing transaction block;
if the first deducted invoice corresponding to the invoice deduction transaction is the first invoice used for deduction in the first invoicing transaction block, adding the third hash value as a third hash pointer into the block head of the first invoicing deduction block, so that the first invoicing deduction block is linked to the first invoicing transaction block through the third hash pointer; wherein the third hash pointer is a pointer pointing to the first billing transaction block storage location;
And if the first deducted invoice corresponding to the invoice deduction transaction is not the first invoice used for deduction in the first issuing transaction block, acquiring a second deducted invoice adjacent to the invoice identification of the first deducted invoice and positioned in front of the invoice identification of the first deducted invoice, and adding a fourth hash value of the second invoice deduction block corresponding to the second deducted invoice as a fourth hash pointer into a block head of the first issuing deduction block, so that the first issuing deduction block is linked to the second invoice deduction block through the fourth hash pointer, wherein the fourth hash pointer is a pointer pointing to a storage position of the second invoice deduction block.
5. The method of any one of claims 2-4, wherein the invoice picking chain, the invoice issuing chain, and the invoice deduction chain are arranged in different directions.
6. An account book establishment device for financial block chains, comprising:
the first establishing module is used for generating invoice picking blocks according to invoice picking transactions for picking up blank invoices and establishing an invoice picking chain based on the invoice picking blocks, wherein the invoice picking chain is formed by sequentially linking at least two invoice picking blocks, and the invoice picking blocks are used for recording blank invoice picking information;
The system comprises a determining module, a first issuing transaction block and an invoice receiving block, wherein the determining module is used for determining a first issuing identification of a blank issuing used for issuing an invoice when the issuing transaction of the issuing invoice is obtained, and establishing a corresponding relation between the first issuing transaction block corresponding to the issuing transaction and the invoice receiving block corresponding to the first issuing identification, wherein the first issuing identification comprises an invoice code and an invoice number, and the first issuing transaction block is used for recording transaction information corresponding to the issuing transaction;
the second establishing module is used for establishing an invoice issuing chain based on the first issuing transaction block and the corresponding relation, wherein the invoice issuing chain is formed by sequentially linking at least two issuing transaction blocks with the corresponding relation with the same invoice receiving block;
the generation module is used for generating a first account book based on the invoice receiving chain and the invoice issuing chain;
the determining module is specifically configured to:
performing encryption hash operation on blank invoice acquisition information recorded by the invoice acquisition block to obtain a first hash value corresponding to the invoice acquisition block;
if the first blank invoice corresponding to the first invoice identifier is a blank invoice recorded by the invoice picking block and is subjected to first sorting, the first hash value is used as a first hash pointer to be added into the block head of the first invoice transaction block, so that the first invoice transaction block is linked to the invoice picking block through the first hash pointer, wherein the first hash pointer is a pointer pointing to the storage position of the invoice picking block;
And if the first blank invoice is a blank invoice except the blank invoice with the first sorting, the second blank invoice adjacent to the first invoice identification of the first blank invoice is acquired, the invoice identification is arranged before the first invoice identification, and a second hash value of a second invoicing transaction block corresponding to the second blank invoice is added into the block head of the first invoicing transaction block as a second hash pointer, so that the first invoicing transaction block is linked to the second invoicing transaction block through the second hash pointer, wherein the second hash pointer is a pointer pointing to the storage position of the second invoicing transaction block.
7. The apparatus of claim 6, further comprising a third setup module to:
when an invoice deduction transaction is obtained, determining a second invoice identification corresponding to the invoice deduction transaction;
according to the second invoice identification, establishing a corresponding relation between a first invoice deduction block corresponding to the invoice deduction transaction and the first invoice transaction block, and establishing an invoice deduction chain based on the first invoice deduction block; the invoice deduction chain is formed by sequentially linking at least two invoice deduction blocks corresponding to the same invoice deduction transaction block, and the first invoice deduction block is used for recording deduction information corresponding to the invoice deduction transaction;
And generating a second account book based on the invoice receiving chain, the invoice issuing chain and the invoice deduction chain.
8. A computer device, the computer device comprising:
a memory for storing program instructions;
a processor for invoking program instructions stored in said memory and for executing the steps comprised in the method according to any of claims 1-5 in accordance with the obtained program instructions.
9. A storage medium having stored thereon computer executable instructions for causing a computer to perform the steps comprised by the method of any of claims 1-5.
CN201911424476.7A 2019-12-31 2019-12-31 Account book establishment method and device of financial block chain and computer equipment Active CN113127559B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911424476.7A CN113127559B (en) 2019-12-31 2019-12-31 Account book establishment method and device of financial block chain and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911424476.7A CN113127559B (en) 2019-12-31 2019-12-31 Account book establishment method and device of financial block chain and computer equipment

Publications (2)

Publication Number Publication Date
CN113127559A CN113127559A (en) 2021-07-16
CN113127559B true CN113127559B (en) 2024-02-09

Family

ID=76769852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911424476.7A Active CN113127559B (en) 2019-12-31 2019-12-31 Account book establishment method and device of financial block chain and computer equipment

Country Status (1)

Country Link
CN (1) CN113127559B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140115078A (en) * 2013-03-20 2014-09-30 김기복 System for posting up financial statement
WO2017091305A1 (en) * 2015-11-24 2017-06-01 Mastercard International Incorporated Method and system for gross settlement by use of an opaque blockchain
CN109034924A (en) * 2018-08-16 2018-12-18 腾讯科技(深圳)有限公司 Electronic bill generation method, device, storage medium and computer equipment
CN109241772A (en) * 2018-09-07 2019-01-18 腾讯科技(深圳)有限公司 Invoice block chained record method, apparatus, block chain gateway server and medium
WO2019117651A1 (en) * 2017-12-13 2019-06-20 서강대학교 산학협력단 Search method using data structure for supporting multiple search in blockchain-based iot environment, and device according to method
CN110599349A (en) * 2019-09-24 2019-12-20 腾讯科技(深圳)有限公司 Data processing method based on block chain network, related equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120191579A1 (en) * 2011-01-20 2012-07-26 International Business Machines Corporation Selective Processing of Reverse Invoices in Computer Systems for Financial Transactions
US10783572B2 (en) * 2017-12-11 2020-09-22 Wells Fargo Bank, N.A. Centralized accounting system for invoice generation accessible via computer network
US20190188706A1 (en) * 2017-12-18 2019-06-20 Apple Inc. Transference tracking

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140115078A (en) * 2013-03-20 2014-09-30 김기복 System for posting up financial statement
WO2017091305A1 (en) * 2015-11-24 2017-06-01 Mastercard International Incorporated Method and system for gross settlement by use of an opaque blockchain
WO2019117651A1 (en) * 2017-12-13 2019-06-20 서강대학교 산학협력단 Search method using data structure for supporting multiple search in blockchain-based iot environment, and device according to method
CN109034924A (en) * 2018-08-16 2018-12-18 腾讯科技(深圳)有限公司 Electronic bill generation method, device, storage medium and computer equipment
CN109241772A (en) * 2018-09-07 2019-01-18 腾讯科技(深圳)有限公司 Invoice block chained record method, apparatus, block chain gateway server and medium
CN110599349A (en) * 2019-09-24 2019-12-20 腾讯科技(深圳)有限公司 Data processing method based on block chain network, related equipment and storage medium

Also Published As

Publication number Publication date
CN113127559A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
WO2020082871A1 (en) Method, device and system for executing blockchain transactions in parallel
CN100375038C (en) Finally agent optimization method and system of source in reorder two-stage refering
CN102214187B (en) Complex event processing method and device
CN110278264B (en) Block chain-based cross-link communication method and device and transaction system
CN108256113B (en) Data blood relationship mining method and device
US11087371B2 (en) Blockchain-based invoice creation method apparatus, and electronic device
CN105447734B (en) Order information processing method and system
CN101887365A (en) Be used to construct method and system based on the executable code of the application of assembly
CN110706105A (en) Error marking method, error marking device, computer equipment and storage medium
CN111475501A (en) Data cleaning method and device for block chain network
CN109886676A (en) Method of payment, calculating equipment, storage medium for block chain network
US20180052754A1 (en) Performance metric contextualization in a distributed computing environment
CN113869902A (en) Block chain transaction execution method and device
CN110347735A (en) The data forwarding of configurationization mends processing method, device and readable storage medium storing program for executing extremely
CN112819632A (en) Block chain-based reimbursement expense segmentation method and device and electronic equipment
CN113127559B (en) Account book establishment method and device of financial block chain and computer equipment
CN109995585A (en) A kind of abnormality eliminating method, equipment and storage medium
CN110706108B (en) Method and apparatus for concurrently executing transactions in a blockchain
CN113128998A (en) Business processing method, device and system of block chain system
CN110879900A (en) Data processing method and device based on block chain system
CN105512829A (en) Web service protocol-based card value multidimensional cost accumulation method
CN114022148B (en) Transaction conflict detection method, device, equipment and storage medium based on block chain
CN108961039B (en) Transaction processing method, device and system
CN111581108A (en) Input data acquisition method and device based on business system transaction test
US9286112B2 (en) Determining and dispatching processing agent for transaction processing

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
GR01 Patent grant
GR01 Patent grant