WO2021120760A1 - 一种基于区块链的电子发票的开具方法及装置 - Google Patents

一种基于区块链的电子发票的开具方法及装置 Download PDF

Info

Publication number
WO2021120760A1
WO2021120760A1 PCT/CN2020/117171 CN2020117171W WO2021120760A1 WO 2021120760 A1 WO2021120760 A1 WO 2021120760A1 CN 2020117171 W CN2020117171 W CN 2020117171W WO 2021120760 A1 WO2021120760 A1 WO 2021120760A1
Authority
WO
WIPO (PCT)
Prior art keywords
invoicing
information
billing
ticket
blue
Prior art date
Application number
PCT/CN2020/117171
Other languages
English (en)
French (fr)
Inventor
胡景秀
周钰
许玉壮
刘为怀
黄彦
Original Assignee
中国银联股份有限公司
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 中国银联股份有限公司 filed Critical 中国银联股份有限公司
Publication of WO2021120760A1 publication Critical patent/WO2021120760A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/04Billing or invoicing
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0635Risk analysis of enterprise or organisation activities

Definitions

  • the invention relates to the technical field of electronic invoices, in particular to a method and device for issuing electronic invoices based on blockchain.
  • the tax control system is a network system used to implement electronic invoice issuance, providing various enterprises and users with the service of issuing electronic invoices.
  • electronic invoice issuance provides various enterprises and users with the service of issuing electronic invoices.
  • reasons such as poor network that lead to repeated issuance of electronic invoices. This brings unnecessary trouble to the subsequent e-invoice accounting, reimbursement and other links.
  • How to avoid repeated issuance of e-invoices is an urgent problem in the field of electronic invoice technology.
  • the embodiment of the present invention provides a method and device for issuance of electronic invoices based on blockchain, so as to avoid the problem of repeated issuance of electronic invoices.
  • an embodiment of the present invention provides a blockchain-based method for issuing electronic invoices, including:
  • the blockchain node obtains the billing request of the electronic invoice sent by the billing party, and the billing request includes the billing information
  • the blockchain node performs a risk assessment on the billing information after the verification of the billing request is passed, and obtains the risk score of the billing information;
  • the blockchain node uploads the risk score to the blockchain electronic invoice platform for consensus, obtains the consensus result and writes it into the block; and sends the consensus result to the issuer.
  • the risk assessment and consensus on the issuance information are obtained before the issuance of electronic invoices, and the consensus results are obtained, which can avoid the problem of repeated issuance of electronic invoices, reduce the risk of electronic invoice issuance, and improve the efficiency of electronic invoice issuance.
  • the blockchain node performs risk assessment on the billing information to obtain the risk score of the billing information, including:
  • the blockchain node extracts key variables from part or all of the invoicing information of the invoicing enterprise corresponding to the invoicing information within a preset time period;
  • the blockchain node performs feature processing on the key variable to obtain a feature vector
  • the blockchain node inputs the feature vector into a preset risk model to obtain the risk score of the billing information.
  • the blockchain node uploads the risk score to the blockchain electronic invoice platform for consensus, and obtains the consensus result, including:
  • the blockchain node determines whether the risk score is lower than a preset threshold, and if not, generates a blue ticket corresponding to the ticketing information, otherwise rejects the ticketing request;
  • the blockchain node broadcasts the risk score to other blockchain nodes on the blockchain electronic invoice platform, so that the other blockchain nodes agree on the risk score;
  • the blockchain node After determining that a consensus is reached, the blockchain node determines the blue ticket or the rejection of the ticket issuance request as the consensus result.
  • the method further includes:
  • the blockchain node re-assess the risk assessment of the blue ticket issued by the issuing company corresponding to the invoicing information, and obtains the risk score of the blue ticket issued by the issuing company corresponding to the invoicing information;
  • the blockchain node red-punches the blue tickets whose risk scores of the blue tickets issued by the invoicing company corresponding to the invoicing information are lower than the preset threshold value, to obtain the blue tickets whose risk score is lower than the preset threshold value.
  • the blockchain node After the blockchain node writes the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold into the block, it sends it to the ticket issuer.
  • the method further includes:
  • the blockchain node determines the billing score of the billing company corresponding to the billing information according to the risk score and the risk score of the blue ticket that the billing company corresponding to the billing information has issued;
  • the blockchain node will red-flush the issued blue invoice of the invoicing company corresponding to the invoicing information to obtain the corresponding invoicing information The red invoice corresponding to the blue invoice issued by the invoicing company;
  • the blockchain node After the blockchain node writes the red ticket corresponding to the blue ticket issued by the invoicing enterprise corresponding to the invoicing information into the block, it sends it to the ticket issuer.
  • the invoice information includes the invoice request time, the invoice amount, the corresponding order and payment information, the invoice issuer ID, and the invoice recipient information.
  • the method further includes:
  • the blockchain node generates a hash value, uploads the hash value to the blockchain electronic invoice platform for consensus, and writes it into the block;
  • the hash value is generated by the blockchain node according to the billing information or according to the electronic invoice in the consensus result.
  • an embodiment of the present invention provides a blockchain-based electronic invoice issuance device, including:
  • the processing unit is configured to perform risk assessment on the invoicing information to obtain the risk score of the invoicing information after the invoicing request passes the verification; upload the risk score to the blockchain electronic invoice platform for consensus, Obtain the consensus result and write it into the block; send the consensus result to the issuer.
  • processing unit is specifically configured to:
  • the feature vector is input into a preset risk model to obtain the risk score of the billing information.
  • processing unit is specifically configured to:
  • the blue ticket or the rejection of the ticket issuance request is determined as the consensus result.
  • processing unit is further configured to:
  • the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold is written into the block, it is sent to the ticket issuer.
  • processing unit is further configured to:
  • the blue invoice of the invoicing company corresponding to the invoicing information is red-flushed to obtain the invoicing company's invoicing corresponding to the invoicing information.
  • the billing information includes billing request time, invoice amount, corresponding order and payment information, billing party information, and billing party information.
  • processing unit is further configured to:
  • Generate a hash value upload the hash value to the blockchain electronic invoice platform for consensus, and write it into the block;
  • the hash value is generated based on the billing information or based on the electronic invoice in the consensus result.
  • an embodiment of the present invention also provides a computing device, including:
  • Memory used to store program instructions
  • the processor is configured to call the program instructions stored in the memory, and execute the above-mentioned blockchain-based electronic invoice issuance method according to the obtained program.
  • embodiments of the present invention also provide a computer-readable non-volatile storage medium, including computer-readable instructions.
  • the computer reads and executes the computer-readable instructions, the computer is caused to execute the above-mentioned blockchain-based The method of issuance of electronic invoices.
  • FIG. 1 is a schematic diagram of a system architecture provided by an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for issuing an electronic invoice based on a blockchain according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a system architecture provided by an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a node provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a block chain-based electronic invoice issuance device provided by an embodiment of the present invention.
  • Fig. 6 is a schematic structural diagram of a block chain-based electronic invoice issuance device provided by an embodiment of the present invention.
  • FIG. 1 exemplarily shows a system architecture to which an embodiment of the present invention is applicable.
  • the system architecture may include an enterprise invoicing application, a blockchain-based trusted issuance device for electronic invoices, and a blockchain electronic invoice platform.
  • the blockchain-based trusted issuance device for electronic invoices may include a verification module, a receiving module, a risk control module, a generation module, an upload module, a query module, and a certificate management module.
  • Verification module It is used to check the correctness of the information registered by the issuing company, and to verify the signature of the invoicing information in the invoicing request.
  • Certificate management module It is used to issue the public and private keys of the enterprise after the verification of the information registered by the issuing enterprise is passed.
  • Receiving module It is used to receive the invoice or invoice authenticity inspection request of the enterprise, and perform signature verification on the request.
  • Risk control module used to run the risk control model.
  • the input of the model is all the invoicing information (Info 1 , Info 2 ,..., Info n ) issued by an invoicing company in a certain period of time, and the risk score S is output.
  • Upload module used to upload electronic invoices to blockchain nodes.
  • Inspection module After receiving the invoice authenticity inspection request, it queries the invoice information on the chain and returns the inspection result.
  • FIG. 1 is only an example, which is not limited in the embodiment of the present invention.
  • FIG. 2 shows in detail the process of a blockchain-based electronic invoice issuance method provided by an embodiment of the present invention.
  • the process can be executed by a blockchain-based electronic invoice issuance device. It can be located in the blockchain node or the blockchain node.
  • the process specifically includes:
  • Step 201 The blockchain node obtains an electronic invoice issuing request sent by the issuing party.
  • the billing request may include billing information, where the billing information may include the time of the billing request, the billing amount, the corresponding order and payment information, the billing party information, and the billing party information.
  • the enterprise E that has the invoicing request performs information registration on the tax bureau's blockchain electronic invoice platform in advance, including enterprise tax information verification, selection of agency service providers, and blockchain invoice business authority opening, etc. , After registration, obtain the corporate public and private key issued by the tax bureau. Then Enterprise E sends an invoice request to the agent service provider based on the accepted transaction, and the agent service provider sends the invoice request to the blockchain node. After the blockchain node verifies the signature, it extracts the invoice related information Info, including the invoice request time, the invoice amount, and the corresponding Order and payment information, billing party information, and billing party information, etc.
  • step 202 the blockchain node performs a risk assessment on the billing information after passing the verification of the billing request to obtain a risk score of the billing information.
  • the blockchain node extracts key variables from part or all of the invoicing information of the invoicing company corresponding to the invoicing information within a preset time period, then performs feature processing on the key variables to obtain the feature vector, and finally enters the feature vector into the preset risk Model to get the risk score of the billing information.
  • the input of the risk control model is the feature vector corresponding to all the invoicing information (Info 1 , Info 2 ,..., Info n) issued by an invoicing company in a certain period of time. The following steps are required:
  • the risk score can be obtained by inputting it into the risk control model.
  • the aforementioned risk control module may be a score card, logistic regression, random forest, and other complex models.
  • Step 203 The blockchain node uploads the billing information, the hash value, and the risk score to a blockchain electronic invoice platform for consensus, and obtains an electronic invoice and writes it into a block.
  • each blockchain node can run the deployed smart contract to judge the risk score. Specifically, the blockchain node determines whether the risk score is lower than a preset threshold, and if not, generates a blue ticket corresponding to the invoicing information, otherwise the invoice request is rejected. The risk score is then broadcast to other blockchain nodes on the blockchain electronic invoice platform, so that other blockchain nodes can agree on the risk score. In the end, after confirming that a consensus is reached, the blue vote or the rejection request is determined as the consensus result.
  • the preset threshold can be set based on experience.
  • the red flush instruction can also be triggered, which can be implemented in the following two ways:
  • the blockchain node can re-evaluate the risk assessment of the blue ticket issued by the issuing company corresponding to the invoicing information, and then obtain the risk score of the blue ticket issued by the issuing company corresponding to the invoicing information. If the risk score of the blue invoice issued by the invoicing company corresponding to the invoicing information is also lower than the preset threshold, the blue ticket with the risk score of the blue invoice issued by the invoicing company corresponding to the invoicing information lower than the preset threshold can be red flushed , So as to obtain the red ticket corresponding to the blue ticket whose risk score is lower than the preset threshold.
  • the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold is written into the block, it is sent to the issuer so that the issuer can query the corresponding invoice.
  • both the blue ticket and the red ticket in the embodiment of the present invention can be called electronic invoices.
  • the blockchain node can determine the billing score of the billing company corresponding to the billing information based on the risk score of the above billing request and the risk score of the billing company that corresponds to the billing information. If the billing information corresponds to the billing score of the billing company If the value is lower than the preset invoicing threshold, the issued blue invoice of the invoicing company corresponding to the invoicing information can be red-flushed to obtain the red invoice corresponding to the issued blue invoice of the invoicing company corresponding to the invoicing information. Finally, the red ticket corresponding to the blue ticket issued by the issuing company corresponding to the invoicing information is written into the block and sent to the invoicing party. In this way, all the blue invoices in the issuing enterprise are red flushed to avoid omissions.
  • the hash value can be It is generated based on the billing information or based on the electronic invoice in the consensus result.
  • H HASH(Sig N (Info)
  • the aforementioned blue or red tickets are collectively referred to as electronic invoices Inv.
  • the consensus result is an electronic invoice
  • the electronic invoice inspection request is obtained.
  • the inspection request includes the electronic invoice ID (Identity document, ID number)
  • the verification request is sent by the billing party after the billing party delivers the electronic invoice to the billing party.
  • Query the electronic invoice according to the electronic invoice ID to obtain the inspection result.
  • the inspection result is sent to the ticket recipient.
  • the billing party may be the billing company or the agency service provider corresponding to the billing company.
  • Hyperledger Fabric is used as the electronic invoice blockchain electronic invoice platform, on which the smart contract of the electronic invoice is deployed, and the Solidity language is used to realize the registration of enterprise information, electronic invoice verification, and chaining. Red and blue ticket generation and other functions.
  • the tax bureau supervisory node acts as a consortium chain monitoring node, and agent service providers such as invoicing service providers, circulation service providers, and large enterprises join as ordinary nodes.
  • the tax bureau supervision node has all the authority to monitor the entire process of invoices.
  • the application system includes all modules such as verification module, certificate management module, receiving module, inspection module, risk control module, generation module, and upload module.
  • the invoicing/transfer service node has partial authority, and the application system includes a receiving module, an inspection module, a risk control module, and an uploading module. The specific structure is shown in Figure 4.
  • the tax bureau builds an upper-level application system for electronic invoice issuance based on the electronic invoice blockchain electronic invoice platform, which has application management functions such as enterprise registration management, risk control scoring, invoice generation, invoice inspection, and certificate management.
  • application management functions such as enterprise registration management, risk control scoring, invoice generation, invoice inspection, and certificate management.
  • the system is followed by The relevant tax collection and management system of the tax bureau; the invoicing service provider provides "payment + invoicing" products to merchants and consumers through its payment acceptance channels, and is mainly responsible for forwarding merchants' invoicing requests.
  • Typical invoicing products include invoicing QR codes and APP ( Application) After payment, the invoicing page, invoicing applet, etc.; the circulation service provider provides ERP (Enterprise Resource Planning)/financial system development services to the invoice receiving company to synchronize invoice data and invoices with the enterprise The latest status is mainly responsible for forwarding the enterprise's reimbursement verification requirements, and then checking the authenticity of the invoice.
  • ERP Enterprise Resource Planning
  • the process of trusted issuance of electronic invoices includes:
  • the tax bureau calls the verification module and the certificate management module to accept the merchant's registration request, and after the information is verified, the merchant's public and private keys are issued.
  • the merchant shall deliver the public and private keys to the invoicing service provider for safekeeping, and submit valid information at the invoicing service provider for the subsequent use of the invoicing service provider's invoicing products.
  • the invoicing service provider deploys invoicing products, such as smart POS (Point of Sale) machines, for merchants, and provides operation and maintenance services for the products.
  • invoicing products such as smart POS (Point of Sale) machines, for merchants, and provides operation and maintenance services for the products.
  • the consumer purchases the service at the business premises of the merchant, he uses the bank card to pay.
  • the smart POS prints the purchase order, and the invoice QR code is printed under the purchase order.
  • the QR code contains the order-related information and invoicing for this payment.
  • the service provider s billing backend URL (Uniform Resource Locator, Uniform Resource Locator).
  • the consumer selects a certain time and scans the QR code for issuing invoices using the mobile terminal.
  • the terminal browser accesses the invoicing page, which displays the payment order details, header management fill-in fields, and invoicing service provider information.
  • the consumer fills in the billing header and submits the billing request.
  • the billing service provider receives the billing request.
  • the request includes fields and examples as shown in Table 1.
  • the billing information Info is formed, as shown in Table 2.
  • ECDSA Elliptic Curve Digital Signature Algorithm, Elliptic Curve Digital Signature Algorithm
  • the node calls the risk control module, and the scoring process of the risk control module is as follows:
  • the risk score S is higher than the preset threshold, it is determined as an invoice issued by a high-risk enterprise.
  • the node uploads the billing information Info, the hash value H and the corresponding score S directly or through the blockchain middleware service to the blockchain electronic invoice platform.
  • the uploaded data is shown in Table 4.
  • the platform makes a consensus, and the smart contract running on each node makes conditional judgments on the uploaded electronic invoice related information.
  • invoices before the current processing time are numbers 1 and 2, and the numbers 1 and 2 are the risk scores obtained by re-assessing the risk; invoices will be issued after the current processing time Numbers 3 and 4.
  • the red flush instruction for number 2 (blue ticket has been issued) is automatically triggered, and the tax bureau node calls the generation module to generate a red ticket, and the number is 5.
  • Number 1 will not be processed because its risk score is higher than the threshold.
  • the node responds to the merchant's invoice request and returns an electronic invoice 5.
  • the invoicing service provider delivers the electronic invoice 5 to the invoice recipient.
  • Invoice recipients can check the authenticity of electronic invoices on the blockchain electronic invoice platform according to their needs. For example, the recipient of Invoice 1 "China xx Co., Ltd.” can enter the invoice code, invoice number, invoicing time, and check code on the invoice to check the electronic invoice on the tax bureau website, and reimburse the invoice on the bill of lading; "Shanghai xx Information Service Co., Ltd.”, the invoice holder of 2 and 5, can verify the authenticity of these two electronic invoices, and neither of the two electronic invoices can be used for reimbursement.
  • the above embodiment shows that the blockchain node obtains the billing request of the electronic invoice sent by the billing party.
  • the billing request includes billing information.
  • the billing information is risk-assessed to obtain the risk score of the billing information.
  • the risk score is uploaded to the blockchain electronic invoice platform for consensus, and the consensus result is obtained and written into the block; the consensus result is sent to the issuer.
  • FIG. 5 exemplarily shows the structure of a blockchain-based electronic invoice issuance device provided by an embodiment of the present invention, which can execute the blockchain-based electronic invoice issuance process.
  • the device can be a blockchain node or located in the blockchain node.
  • the device specifically includes:
  • the obtaining unit 501 is configured to obtain a billing request of an electronic invoice sent by a billing party, where the billing request includes billing information;
  • the processing unit 502 is configured to perform risk assessment on the invoicing information to obtain the risk score of the invoicing information after the invoicing request is verified; upload the risk score to the blockchain electronic invoice platform for consensus , Get the consensus result and write it into the block; send the consensus result to the issuer.
  • processing unit 502 is specifically configured to:
  • the feature vector is input into a preset risk model to obtain the risk score of the billing information.
  • processing unit 502 is specifically configured to:
  • the blue ticket or the rejection of the ticket issuance request is determined as the consensus result.
  • processing unit 502 is further configured to:
  • the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold is written into the block, it is sent to the ticket issuer.
  • processing unit 502 is further configured to:
  • the blue invoice of the invoicing company corresponding to the invoicing information is red-flushed to obtain the invoicing company's invoicing corresponding to the invoicing information.
  • the billing information includes billing request time, invoice amount, corresponding order and payment information, billing party information, and billing party information.
  • processing unit 502 is further configured to:
  • Generate a hash value upload the hash value to the blockchain electronic invoice platform for consensus, and write it into the block;
  • the hash value is generated based on the billing information or based on the electronic invoice in the consensus result.
  • the embodiment of the present invention provides a blockchain-based electronic invoice issuance device.
  • At least one processor and, a memory communicatively connected with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable
  • the at least one processor can execute the blockchain-based electronic invoice issuance method in the foregoing embodiment.
  • FIG. 6 shows the structure of a blockchain-based electronic invoice issuance device provided by an embodiment of the present invention.
  • the blockchain-based electronic invoice issuance device 600 includes: a transceiver 601 and a processor 602 , Memory 603 and bus system 604;
  • the memory 603 is used to store programs.
  • the program may include program code, and the program code includes computer operation instructions.
  • the memory 603 may be a random access memory (random access memory, RAM for short), or may be a non-volatile memory (non-volatile memory), such as at least one disk memory. Only one memory is shown in the figure. Of course, the memory can also be set to multiple as required.
  • the memory 603 may also be a memory in the processor 602.
  • the memory 603 stores the following elements, executable modules or data structures, or their subsets, or their extended sets:
  • Operating instructions including various operating instructions, used to implement various operations.
  • Operating system Including various system programs, used to implement various basic services and process hardware-based tasks.
  • the method for issuing an electronic invoice based on the blockchain in the above embodiment of the present invention may be applied to the processor 602, or implemented by the processor 602.
  • the processor 602 may be an integrated circuit chip with signal processing capability.
  • the steps of the above-mentioned blockchain-based electronic invoice issuance method can be completed by hardware integrated logic circuits in the processor 602 or instructions in the form of software.
  • the aforementioned processor 602 may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware Components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory 603, and the processor 602 reads the information in the memory 603, and performs the following steps in combination with its hardware:
  • the transceiver 601 is configured to obtain a billing request of an electronic invoice sent by the billing party, where the billing request includes billing information;
  • the processor 602 is configured to perform a risk assessment on the invoicing information to obtain the risk score of the invoicing information after the invoicing request passes the verification; upload the risk score to the blockchain electronic invoice platform for consensus, Obtain the consensus result and write it into the block; send the consensus result to the issuer.
  • the processor 602 is configured to extract key variables from part or all of the invoicing information of the invoicing enterprise corresponding to the invoicing information within a preset time period; perform feature processing on the key variables to obtain a feature vector; The feature vector is input to the preset risk model, and the risk score of the billing information is obtained.
  • the processor 602 is configured to determine whether the risk score is lower than a preset threshold, and if not, generate a blue ticket corresponding to the ticket issuance information, otherwise reject the ticket issuance request; broadcast the risk score To other blockchain nodes on the blockchain electronic invoice platform, so that the other blockchain nodes reach a consensus on the risk score; after confirming that a consensus is reached, the blue ticket or the refusal The billing request is determined as the consensus result.
  • the processor 602 is further configured to, after rejecting the invoicing request, perform a risk assessment on the invoicing information that the invoicing company corresponding to the invoicing information has issued a blue ticket, to obtain the invoicing company corresponding to the invoicing information
  • the risk score of the blue ticket that has been issued; the blue ticket whose risk score of the blue ticket issued by the issuing company corresponding to the invoicing information is lower than the preset threshold is red-pushed to obtain that the risk score is lower than the preset threshold
  • the red ticket corresponding to the blue ticket of the blue ticket; the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold is written into the block and sent to the ticket issuer.
  • the processor 602 is further configured to, after rejecting the issuance request, determine the invoicing information according to the risk score and the risk score of the blue invoice issued by the invoicing company corresponding to the invoicing information The invoicing score of the corresponding invoicing enterprise; if the invoicing score of the invoicing enterprise corresponding to the invoicing information is lower than the preset invoicing threshold, the blue invoices of the invoicing enterprise corresponding to the invoicing information are red-pushed to obtain the invoicing The red ticket corresponding to the blue ticket issued by the invoicing company corresponding to the information; the red ticket corresponding to the blue ticket issued by the invoicing company corresponding to the invoicing information is written into the block and sent to the issuer.
  • the billing information includes billing request time, invoice amount, corresponding order and payment information, billing party information, and billing party information.
  • the processor 602 is further configured to generate a hash value, upload the hash value to the blockchain electronic invoice platform for consensus, and write it into the block; wherein, the hash value It is generated based on the billing information or based on the electronic invoice in the consensus result.
  • the program is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer). , A chip, etc.) or a processor (processor) execute all or part of the steps of the methods in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .
  • an embodiment of the present invention also provides a computing device, including:
  • Memory used to store program instructions
  • the processor is configured to call the program instructions stored in the memory, and execute the above-mentioned blockchain-based electronic invoice issuance method according to the obtained program.
  • embodiments of the present invention also provide a computer-readable non-volatile storage medium, including computer-readable instructions.
  • the computer reads and executes the computer-readable instructions, the computer executes the block-based The method of issuing electronic invoices of the chain.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Abstract

公开了一种基于区块链的电子发票的开具方法及装置,该方法包括区块链节点获取开票方发送的电子发票的开票请求,开票请求中包括开票信息,在开票请求验签通过后,对开票信息进行风险评估,得到开票信息的风险评分,将风险评分上传至区块链电子发票平台上进行共识,得到共识结果并写入区块;将共识结果发给开票方。通过在电子发票开具前,先对开具信息进行风险评估并进行共识,得到共识结果,可以避免电子发票重复开具的问题,降低电子发票开具风险,提高电子发票开具的效率。

Description

一种基于区块链的电子发票的开具方法及装置
相关申请的交叉引用
本申请要求在2019年12月20日提交中国专利局、申请号为201911329813.4、申请名称为“一种基于区块链的电子发票的开具方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及电子发票技术领域,尤其涉及一种基于区块链的电子发票的开具方法及装置。
背景技术
税控系统是一种用于实现电子发票开具的网络系统,为各个企业和用户提供开具电子发票的服务,但是,在实际应用中,通常会出现由于网络欠佳等原因,导致电子发票重复开具的问题,从而给后续电子发票的记账、报销账等环节带来不必要的麻烦,如何避免电子发票的重复开具是电子发票技术领域亟待解决的问题。
发明内容
本发明实施例提供一种基于区块链的电子发票的开具方法及装置,用以避免电子发票重复开具的问题。
第一方面,本发明实施例提供一种基于区块链的电子发票的开具方法,包括:
区块链节点获取开票方发送的电子发票的开票请求,所述开票请求中包括开票信息;
所述区块链节点在所述开票请求验签通过后,对所述开票信息进行风险评估,得到所述开票信息的风险评分;
所述区块链节点将所述风险评分上传至区块链电子发票平台上进行共识,得到共识结果并写入区块;将所述共识结果发给开票方。
上述技术方案中,通过在电子发票开具前,先对开具信息进行风险评估并进行共识,得到共识结果,可以避免电子发票重复开具的问题,降低电子发票开具风险,提高电子发票开具的效率。
可选的,所述区块链节点对所述开票信息进行风险评估,得到所述开票信息的风险评分,包括:
所述区块链节点对预设时段内所述开票信息对应的开票企业的部分或全部开票信息提取关键变量;
所述区块链节点对所述关键变量进行特征处理,得到特征向量;
所述区块链节点将所述特征向量输入至预设的风险模型,得到所述开票信息的风险评分。
可选的,所述区块链节点将所述风险评分上传至区块链电子发票平台上进行共识,得到共识结果,包括:
所述区块链节点确定所述风险评分是否低于预设阈值,若否,则生成所述开票信息对应的蓝票,否则拒绝所述开票请求;
所述区块链节点将所述风险评分广播至所述区块链电子发票平台上的其它区块链节点,以使所述其它区块链节点对所述风险评分进行共识;
所述区块链节点在确定达成共识后,将所述蓝票或所述拒绝所述开票请求确定为所述共识结果。
可选的,所述区块链节点在拒绝所述开票请求之后,还包括:
所述区块链节点重新对所述开票信息对应的开票企业已开蓝票的开票信息进行风险评估,得到所述开票信息对应的开票企业已开蓝票的风险评分;
所述区块链节点将所述开票信息对应的开票企业已开蓝票的风险评分低于所述预设阈值的蓝票进行红冲,得到所述风险评分低于所述预设阈值的蓝票对应的红票;
所述区块链节点将所述风险评分低于所述预设阈值的蓝票对应的红票写 入区块后,发送给所述开票者。
可选的,所述区块链节点在拒绝所述开票请求之后,还包括:
所述区块链节点根据所述风险评分和所述对所述开票信息对应的开票企业已开蓝票的风险评分,确定所述开票信息对应的开票企业的开票评分;
若所述开票信息对应的开票企业的开票评分低于预设开票阈值,则所述区块链节点将所述开票信息对应的开票企业的已开蓝票进行红冲,得到所述开票信息对应的开票企业的已开蓝票对应的红票;
所述区块链节点将所述开票信息对应的开票企业的已开蓝票对应的红票写入区块后,发送给所述开票者。
可选的,所述发票信息包括开票请求时间、发票金额、对应订单及支付信息、开票方ID和受票方信息。
可选的,所述方法还包括:
所述区块链节点生成散列值,将所述散列值上传至所述区块链电子发票平台上进行共识,并写入区块;
其中,所述散列值是所述区块链节点根据所述开票信息生成的或根据所述共识结果中的电子发票生成的。
第二方面,本发明实施例提供一种基于区块链的电子发票的开具装置,包括:
获取单元,用于获取开票方发送的电子发票的开票请求,所述开票请求中包括开票信息;
处理单元,用于在所述开票请求验签通过后,对所述开票信息进行风险评估,得到所述开票信息的风险评分;将所述风险评分上传至区块链电子发票平台上进行共识,得到共识结果并写入区块;将所述共识结果发给开票方。
可选的,所述处理单元具体用于:
对预设时段内所述开票信息对应的开票企业的部分或全部开票信息提取关键变量;
对所述关键变量进行特征处理,得到特征向量;
将所述特征向量输入至预设的风险模型,得到所述开票信息的风险评分。
可选的,所述处理单元具体用于:
确定所述风险评分是否低于预设阈值,若否,则生成所述开票信息对应的蓝票,否则拒绝所述开票请求;
将所述风险评分广播至所述区块链电子发票平台上的其它区块链节点,以使所述其它区块链节点对所述风险评分进行共识;
在确定达成共识后,将所述蓝票或所述拒绝所述开票请求确定为所述共识结果。
可选的,所述处理单元还用于:
在拒绝所述开票请求之后,重新对所述开票信息对应的开票企业已开蓝票的开票信息进行风险评估,得到所述开票信息对应的开票企业已开蓝票的风险评分;
将所述开票信息对应的开票企业已开蓝票的风险评分低于所述预设阈值的蓝票进行红冲,得到所述风险评分低于所述预设阈值的蓝票对应的红票;
将所述风险评分低于所述预设阈值的蓝票对应的红票写入区块后,发送给所述开票者。
可选的,所述处理单元还用于:
在拒绝所述开票请求之后,根据所述风险评分和所述对所述开票信息对应的开票企业已开蓝票的风险评分,确定所述开票信息对应的开票企业的开票评分;
若所述开票信息对应的开票企业的开票评分低于预设开票阈值,则将所述开票信息对应的开票企业的已开蓝票进行红冲,得到所述开票信息对应的开票企业的已开蓝票对应的红票;
将所述开票信息对应的开票企业的已开蓝票对应的红票写入区块后,发送给所述开票者。
可选的,所述开票信息包括开票请求时间、发票金额、对应订单及支付信息、开票方信息和受票方信息。
可选的,所述处理单元还用于:
生成散列值,将所述散列值上传至所述区块链电子发票平台上进行共识,并写入区块;
其中,所述散列值是根据所述开票信息生成的或根据所述共识结果中的电子发票生成的。
第三方面,本发明实施例还提供一种计算设备,包括:
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述基于区块链的电子发票的开具方法。
第四方面,本发明实施例还提供一种计算机可读非易失性存储介质,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行上述基于区块链的电子发票的开具方法。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种系统架构的示意图;
图2为本发明实施例提供的一种基于区块链的电子发票的开具方法的流程示意图;
图3为本发明实施例提供的一种系统架构的示意图;
图4为本发明实施例提供的一种节点的示意图;
图5为本发明实施例提供的一种基于区块链的电子发票的开具装置的结构示意图;
图6为本发明实施例提供的一种基于区块链的电子发票的开具设备的结构示意图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
图1示例性的示出了本发明实施例所适用的一种系统架构,该系统架构可以包括企业开票应用、基于区块链的电子发票可信开具装置和区块链电子发票平台。
其中,基于区块链的电子发票可信开具装置可以包括校验模块、接收模块、风控模块、生成模块、上传模块、查询模块和证书管理模块。
校验模块:用于对开票企业注册的信息进行正确性核查,和对开票请求中开票信息的签名验证。
证书管理模块:用于在对开票企业注册的信息核查通过后,下发企业公私钥。
接收模块:用于接收企业的开票或发票真伪查验请求,并对请求进行签名验证。
风控模块:用于运行风控模型,模型的输入为一个开票企业在某个时间段内所有开出的开票信息(Info 1,Info 2,…,Info n),输出风险评分S。
生成模块:用于基于风控模块输出的评分结果S,根据智能合约规则生成电子发票Inv。
上传模块:用于将电子发票上传至区块链节点。
查验模块:用于收到发票真伪查验请求后,链上查询发票信息并返回查验结果。
需要说明的是,上述图1所示的结构仅是一种示例,本发明实施例对此不做限定。
基于上述描述,图2详细的示出了本发明实施例提供的一种基于区块链 的电子发票的开具方法的流程,该流程可以由基于区块链的电子发票的开具装置执行,该装置可以位于区块链节点中,也可以是该区块链节点。
如图2所示,该流程具体包括:
步骤201,区块链节点获取开票方发送的电子发票的开票请求。
该开票请求中可以包括开票信息,其中,开票信息可以包括开票请求时间、开票金额、对应订单及支付信息、开票方信息和受票方信息。
例如,在获取该开票请求之前,有开票请求的企业E事先在税局区块链电子发票平台上进行信息注册,包括企业纳税信息核验、选定代理服务商、区块链发票业务权限开通等,注册后获得税局下发的企业公私钥。然后企业E基于受理的交易向代理服务商发送开票请求,代理服务商将开票请求发送至区块链节点,区块链节点验签后提取开票相关信息Info,包括开票请求时间、开票金额、对应订单及支付信息、开票方信息和受票方信息等。
步骤202,所述区块链节点在所述开票请求验签通过后,对所述开票信息进行风险评估,得到所述开票信息的风险评分。
具体的,区块链节点对预设时段内开票信息对应的开票企业的部分或全部开票信息提取关键变量,然后对关键变量进行特征处理,得到特征向量,最后将特征向量输入至预设的风险模型,得到开票信息的风险评分。
举例来说,风控模型的输入为一个开票企业在某个时间段内所有开出的开票信息(Info 1,Info 2,…,Info n)对应的特征向量。需要进行下述步骤:
(1)开票信息排序,对开票信息按照开票请求时间先后排序,得到开票信息序列(Info 1,Info 2,…,Info n);
(2)提取关键变量,提取每个开票信息Info i中的几个字段{开票请求时间,受票方详情,开票金额,货物或应税劳务服务名称},其中,受票方详情包含“名称”、“纳税人识别号”、“地址和电话”、“电子支付标识”四个子字段;
(3)分别对上述四个变量进行特征处理:
①提取“开票请求时间”特征变量,计算相邻发票的开票请求时间间隔 数列(T 1,T 2,…T n-1),对时间间隔数列进行统计分析,若时间间隔小且分布集中,则认为风险较高,反之风险较低。
②对“受票方详情”进行聚类分析,以“名称”、“纳税人识别号”两个子字段为最高权重值,判断“受票方详情”特征相似度,相似度高判别为一类,若受票方可被集中归为几大类,则认为风险较高,反之风险低。
③对“开票金额”和“货物或应税劳务服务名称”两个特征变量进行特征组合,计算“开票金额”是否超出“货物或应税劳务服务名称”类别下的一般开票金额,若超出一定比例则认为风险较高,反之风险低。
最终确定特征向量={开票请求间隔,受票方相似度,开票金额是否合理}。
需要说明的是,上述特征向量仅是示例作用,还可以选择发票中其他字段作为特征变量,如选取税率作为特征变量之一。
在得到特征向量之后,输入至风控模型即可以得到风险评分。
在本发明实施例中,上述风控模块可以为评分卡、逻辑回归、随机森林以及其他复杂模型等。
步骤203,所述区块链节点将所述开票信息、所述散列值和所述风险评分上传至区块链电子发票平台上进行共识,得到电子发票并写入区块。
在共识的过程中,每个区块链节点都可以运行部署的智能合约对风险评分进行判断。具体的,区块链节点确定风险评分是否低于预设阈值,若否,则生成开票信息对应的蓝票,否则拒绝发票请求。然后将所述风险评分广播至所述区块链电子发票平台上的其它区块链节点,以使其它区块链节点对风险评分进行共识。最终在确定达成共识后,将蓝票或拒绝开票请求确定为共识结果。该预设阈值可以依据经验设置。
此外,在拒绝开票请求之后,还可以触发红冲指令,具体可以通过以下两种方式来实现:
方式一:
区块链节点可以重新对开票信息对应的开票企业已开蓝票的开票信息进行风险评估,然后得到开票信息对应的开票企业已开蓝票的风险评分。若开 票信息对应的开票企业已开蓝票的风险评分也低于该预设阈值,则可以将该开票信息对应的开票企业已开蓝票的风险评分低于预设阈值的蓝票进行红冲,从而得到风险评分低于预设阈值的蓝票对应的红票。最后将该风险评分低于预设阈值的蓝票对应的红票写入区块后,发送给开票者,以使开票者进行相应发票的查询。需要说明的是,本发明实施例中的蓝票和红票都可以称为电子发票。
方式二:
区块链节点可以根据上述开票请求的风险评分和开票信息对应的开票企业的已开蓝票的风险评分,确定开票信息对应的开票企业的开票评分,若该开票信息对应的开票企业的开票评分低于预设开票阈值,则可以将开票信息对应的开票企业的已开蓝票进行红冲,得到开票信息对应的开票企业的已开蓝票对应的红票。最后将开票信息对应的开票企业的已开蓝票对应的红票写入区块后,发送给开票者。这种方式中,是将该开票企业中的所有已开蓝票都进行红冲,避免出现遗漏的情况。
需要说明的是,在上述电子发票开具的过程中,还需要生成散列值,并将散列值上传至区块链电子发票平台上进行共识,并写入区块其中,该散列值可以是根据开票信息生成的或根据共识结果中的电子发票生成的。
例如,对开票信息Info签名后进行哈希生成散列值H,即H=HASH(Sig N(Info))。本发明实施例仅是示例作用,在具体应用时可以采用其他哈希方法或签名方法。
上述蓝票或红票统称为电子发票Inv,电子发票Inv为区块链节点对开票信息Info签名信息和散列值H的组合,即Inv=Sig N(Info)+H。
若共识结果中是电子发票,则在将电子发票发给开票方之后,进行电子发票的真伪查验,具体的,获取电子发票的查验请求,查验请求包括电子发票的电子发票ID(Identity document,身份标识号),查验请求是开票方将电子发票交付给受票方之后受票方发送的。根据电子发票ID对电子发票进行查询得到查验结果。最后将查验结果发送给受票方。在本发明实施例中,开票 方可以为开票企业,也可以是开票企业对应的代理服务商。
为了更好的解释本发明实施例,下面将在具体实施场景下来描述上述电子发票开具过程。
在本发明实施例中,将采用Hyperledger(超级账本)Fabric作为电子发票区块链电子发票平台,其上部署电子发票的智能合约,采用Solidity语言实现登记企业信息、电子发票验签、上链、红蓝票生成等功能。
在区块链电子发票平台层,如图3所示,税局监管节点作为联盟链监控节点,开票服务商、流转服务商等代理服务商以及大型企业作为普通节点加入。
其中,其中,税局监管节点具有监控发票全流程的所有权限,应用系统中包含校验模块、证书管理模块、接收模块、查验模块、风控模块、生成模块、上传模块等所有模块。开票/流转服务节点具有部分权限,应用系统中包含接收模块、查验模块、风控模块和上传模块。具体的结构如图4所示。
在应用系统层,税局端基于电子发票区块链电子发票平台建立电子发票开具上层应用系统,具备企业注册管理、风控评分、发票生成、发票查验、证书管理等应用管理功能,系统后接税局的相关税收征管系统;开票服务商端通过其支付受理渠道向商户和消费者提供“支付+开票”产品,主要负责转发商户的开票请求,典型的开票产品有开票二维码、APP(Application,应用程序)支付后开票页面、开票小程序等;流转服务商端通过其向受票企业提供的ERP(Enterprise Resource Planning,企业资源计划)/财务系统开发服务,与企业同步发票数据以及发票最新状态,主要负责转发企业报销核验需求,进而进行发票真伪查验。
基于上述架构,电子发票可信开具流程包括:
1、商户事先在税局端进行信息注册,包括企业纳税信息核验、选定代理服务商、区块链发票业务权限开通等。
2、税局端调用校验模块和证书管理模块受理商户的注册请求,信息核验通过后下发商户公私钥。
3、商户将公私钥交由开票服务商保管,同时在开票服务商处提交有效信息,用于后续使用开票服务商开票产品的依据。
4、开票服务商为商户布放开票产品,如智能POS(Point of Sale,销售终端)机具,并为产品提供运维服务。
5、消费者在商户经营场所购买服务后,使用银行卡支付,支付成功后智能POS打印签购单,签购单下方打印开票二维码,二维码含本次支付的订单相关信息、开票服务商的开票后台URL(Uniform Resource Locator,统一资源定位系统)。
6、消费者选取某个时间使用手机终端扫描开票二维码,终端浏览器访问开票页面,页面显示支付订单详情、抬头管理填写栏目、开票服务商信息等。
7、消费者填写开票抬头,提交开票请求。
8、开票服务商收到开票请求,请求包含字段及示例如表1所示。
表1
Figure PCTCN2020117171-appb-000001
Figure PCTCN2020117171-appb-000002
将该请求与商户税务信息组合打包后,形成开票信息Info,如表2所示。
表2
Figure PCTCN2020117171-appb-000003
Figure PCTCN2020117171-appb-000004
采用ECDSA(Elliptic Curve Digital Signature Algorithm,椭圆曲线数字签名算法)算法,使用商户私钥对Info签名,形成开票请求REQ=Info||Sig(Info)发送至区块链电子发票平台。
9、收到开票请求的节点调用接收模块,验签通过后,采用SHA-256算法对签名进行哈希,得到散列值H,即H=HASH(Sig N(Info))。
10、节点调用风控模块,风控模块评分过程如下:
(1)筛选一段时间内销售方是“深圳市龙华区山洞鱼夫纸包鱼餐厅”的发票集按照开票请求时间先后进行排序,得到发票列表,并提取发票中的关键字段,如表3所示。
表3
Figure PCTCN2020117171-appb-000005
Figure PCTCN2020117171-appb-000006
(2)对发票列表中各关键字段的变量进行特征处理。
①计算发票列表中“开票请求时间”的时间间隔,对时间间隔数列进行统计分析。
②对“受票方详情”进行聚类分析,以“名称”、“纳税人识别号”两个子字段为最高权重值,判断“受票方详情”特征相似度,相似度高判别为一类。
③对“开票金额”和“货物或应税劳务服务名称”两个特征变量进行特征组合,计算“开票金额”是否超出“货物或应税劳务服务名称”类别下的一般开票金额。
(3)利用分类模型学习特征向量{开票请求间隔,受票方相似度,开票金额是否合理}中各特征的权重。
①计算每个特征A i在训练数据集下的信息增益g i(D,A i)=H(D)-H(D|A i),i=1,2,3。
②对g 1,g 2,g 3做归一化处理,得到每个特征所占的权重
Figure PCTCN2020117171-appb-000007
(4)计算S=w 1A 1+w 2A 2+w 3A 3得到该开票请求的风险评分S。
上述示例中,风险评分S高于预设阈值,判定为高风险企业开具的发票。
11、节点将开票信息Info、散列值H和相应评分S直接上传或者通过区 块链中间件服务上传到区块链电子发票平台上。上传数据如表4所示。
表4
Figure PCTCN2020117171-appb-000008
12、平台进行共识,各节点上运行的智能合约对上传的电子发票相关信息进行条件判断。
假设预设阈值设定为6,当前处理时间为2019年10月22日,当前处理时间之前发票为编号1和2,编号1和2为重新进行风险评估得到的风险评分;当前处理时间之后开票为编号3和4。
具体为:编号3和4风险评分均低于阈值,拒绝此3和4发票请求;
同时自动触发对编号2(已开蓝票)的红冲指令,由税局节点调用生成模块生成红票,记编号为5。
编号1由于其风险评分高于阈值不做处理。
13、达成共识后,将发票1(蓝票)、2(蓝票)、5(编号2对应的红票)写入数据区块。
14、节点响应商户的开票请求,返回电子发票5。
15、开票服务商将电子发票5交付给受票方。
16、受票方可根据需求向区块链电子发票平台进行电子发票真伪查验。例如,发票1的受票方“中国xx股份有限公司”可在税局网站上输入发票代码、发票号码、开票时间和发票上的校验码对电子发票进行查验,并提单报销该发票;发票2和5的受票方“上海xx信息服务有限公司”可查验这两张电子发票的真实性,两张电子发票均不能用于报销。
上述实施例表明,区块链节点获取开票方发送的电子发票的开票请求,开票请求中包括开票信息,在开票请求验签通过后,对开票信息进行风险评估,得到开票信息的风险评分,将风险评分上传至区块链电子发票平台上进行共识,得到共识结果并写入区块;将共识结果发给开票方。通过在电子发票开具前,先对开具信息进行风险评估并进行共识,得到共识结果,可以避免电子发票重复开具的问题,降低电子发票开具风险,提高电子发票开具的效率。
基于相同的技术构思,图5示例性的示出了本发明实施例提供的一种基于区块链的电子发票的开具装置的结构,该装置可以执行基于区块链的电子发票的开具流程,该装置可以为区块链节点,也可以位于该区块链节点中。
如图5所示,该装置具体包括:
获取单元501,用于获取开票方发送的电子发票的开票请求,所述开票请求中包括开票信息;
处理单元502,用于在所述开票请求验签通过后,对所述开票信息进行风险评估,得到所述开票信息的风险评分;将所述风险评分上传至区块链电子发票平台上进行共识,得到共识结果并写入区块;将所述共识结果发给开票方。
可选的,所述处理单元502具体用于:
对预设时段内所述开票信息对应的开票企业的部分或全部开票信息提取关键变量;
对所述关键变量进行特征处理,得到特征向量;
将所述特征向量输入至预设的风险模型,得到所述开票信息的风险评分。
可选的,所述处理单元502具体用于:
确定所述风险评分是否低于预设阈值,若否,则生成所述开票信息对应的蓝票,否则拒绝所述开票请求;
将所述风险评分广播至所述区块链电子发票平台上的其它区块链节点,以使所述其它区块链节点对所述风险评分进行共识;
在确定达成共识后,将所述蓝票或所述拒绝所述开票请求确定为所述共识结果。
可选的,所述处理单元502还用于:
在拒绝所述开票请求之后,重新对所述开票信息对应的开票企业已开蓝票的开票信息进行风险评估,得到所述开票信息对应的开票企业已开蓝票的风险评分;
将所述开票信息对应的开票企业已开蓝票的风险评分低于所述预设阈值的蓝票进行红冲,得到所述风险评分低于所述预设阈值的蓝票对应的红票;
将所述风险评分低于所述预设阈值的蓝票对应的红票写入区块后,发送给所述开票者。
可选的,所述处理单元502还用于:
在拒绝所述开票请求之后,根据所述风险评分和所述对所述开票信息对应的开票企业已开蓝票的风险评分,确定所述开票信息对应的开票企业的开票评分;
若所述开票信息对应的开票企业的开票评分低于预设开票阈值,则将所述开票信息对应的开票企业的已开蓝票进行红冲,得到所述开票信息对应的开票企业的已开蓝票对应的红票;
将所述开票信息对应的开票企业的已开蓝票对应的红票写入区块后,发送给所述开票者。
可选的,所述开票信息包括开票请求时间、发票金额、对应订单及支付信息、开票方信息和受票方信息。
可选的,所述处理单元502还用于:
生成散列值,将所述散列值上传至所述区块链电子发票平台上进行共识,并写入区块;
其中,所述散列值是根据所述开票信息生成的或根据所述共识结果中的电子发票生成的。
基于相同的技术构思,本发明实施例提供一种基于区块链的电子发票的 开具设备。至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述实施例中的基于区块链的电子发票的开具方法。
以一个处理器为例,图6为本发明实施例提供的基于区块链的电子发票的开具设备的结构,该基于区块链的电子发票的开具设备600包括:收发器601、处理器602、存储器603和总线系统604;
其中,存储器603,用于存放程序。具体地,程序可以包括程序代码,程序代码包括计算机操作指令。存储器603可能为随机存取存储器(random access memory,简称RAM),也可能为非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。图中仅示出了一个存储器,当然,存储器也可以根据需要,设置为多个。存储器603也可以是处理器602中的存储器。
存储器603存储了如下的元素,可执行模块或者数据结构,或者它们的子集,或者它们的扩展集:
操作指令:包括各种操作指令,用于实现各种操作。
操作系统:包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。
上述本发明实施例基于区块链的电子发票的开具方法可以应用于处理器602中,或者说由处理器602实现。处理器602可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述基于区块链的电子发票的开具方法的各步骤可以通过处理器602中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器602可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及 软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器603,处理器602读取存储器603中的信息,结合其硬件执行以下步骤:
收发器601用于获取开票方发送的电子发票的开票请求,所述开票请求中包括开票信息;
处理器602用于在所述开票请求验签通过后,对所述开票信息进行风险评估,得到所述开票信息的风险评分;将所述风险评分上传至区块链电子发票平台上进行共识,得到共识结果并写入区块;将所述共识结果发给开票方。
可选的,所述处理器602用于对预设时段内所述开票信息对应的开票企业的部分或全部开票信息提取关键变量;对所述关键变量进行特征处理,得到特征向量;将所述特征向量输入至预设的风险模型,得到所述开票信息的风险评分。
可选的,所述处理器602用于确定所述风险评分是否低于预设阈值,若否,则生成所述开票信息对应的蓝票,否则拒绝所述开票请求;将所述风险评分广播至所述区块链电子发票平台上的其它区块链节点,以使所述其它区块链节点对所述风险评分进行共识;在确定达成共识后,将所述蓝票或所述拒绝所述开票请求确定为所述共识结果。
可选的,所述处理器602还用于在拒绝所述开票请求之后,重新对所述开票信息对应的开票企业已开蓝票的开票信息进行风险评估,得到所述开票信息对应的开票企业已开蓝票的风险评分;将所述开票信息对应的开票企业已开蓝票的风险评分低于所述预设阈值的蓝票进行红冲,得到所述风险评分低于所述预设阈值的蓝票对应的红票;将所述风险评分低于所述预设阈值的蓝票对应的红票写入区块后,发送给所述开票者。
可选的,所述处理器602还用于在拒绝所述开票请求之后,根据所述风险评分和所述对所述开票信息对应的开票企业已开蓝票的风险评分,确定所述开票信息对应的开票企业的开票评分;若所述开票信息对应的开票企业的 开票评分低于预设开票阈值,则将所述开票信息对应的开票企业的已开蓝票进行红冲,得到所述开票信息对应的开票企业的已开蓝票对应的红票;将所述开票信息对应的开票企业的已开蓝票对应的红票写入区块后,发送给所述开票者。
可选的,所述开票信息包括开票请求时间、发票金额、对应订单及支付信息、开票方信息和受票方信息。
可选的,所述处理器602还用于生成散列值,将所述散列值上传至所述区块链电子发票平台上进行共识,并写入区块;其中,所述散列值是根据所述开票信息生成的或根据所述共识结果中的电子发票生成的。
本领域技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
基于相同的技术构思,本发明实施例还提供了一种计算设备,包括:
存储器,用于存储程序指令;
处理器,用于调用存储器中存储的程序指令,按照获得的程序执行上述基于区块链的电子发票的开具方法。
基于相同的技术构思,本发明实施例还提供了一种计算机可读非易失性存储介质,包括计算机可读指令,当计算机读取并执行计算机可读指令时,使得计算机执行上述基于区块链的电子发票的开具方法。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (16)

  1. 一种基于区块链的电子发票的开具方法,其特征在于,包括:
    区块链节点获取开票方发送的电子发票的开票请求,所述开票请求中包括开票信息;
    所述区块链节点在所述开票请求验签通过后,对所述开票信息进行风险评估,得到所述开票信息的风险评分;
    所述区块链节点将所述风险评分上传至区块链电子发票平台上进行共识,得到共识结果并写入区块;将所述共识结果发给开票方。
  2. 如权利要求1所述的方法,其特征在于,所述区块链节点对所述开票信息进行风险评估,得到所述开票信息的风险评分,包括:
    所述区块链节点对预设时段内所述开票信息对应的开票企业的部分或全部开票信息提取关键变量;
    所述区块链节点对所述关键变量进行特征处理,得到特征向量;
    所述区块链节点将所述特征向量输入至预设的风险模型,得到所述开票信息的风险评分。
  3. 如权利要求1所述的方法,其特征在于,所述区块链节点将所述风险评分上传至区块链电子发票平台上进行共识,得到共识结果,包括:
    所述区块链节点确定所述风险评分是否低于预设阈值,若否,则生成所述开票信息对应的蓝票,否则拒绝所述开票请求;
    所述区块链节点将所述风险评分广播至所述区块链电子发票平台上的其它区块链节点,以使所述其它区块链节点对所述风险评分进行共识;
    所述区块链节点在确定达成共识后,将所述蓝票或所述拒绝所述开票请求确定为所述共识结果。
  4. 如权利要求3所述的方法,其特征在于,所述区块链节点在拒绝所述开票请求之后,还包括:
    所述区块链节点重新对所述开票信息对应的开票企业已开蓝票的开票信 息进行风险评估,得到所述开票信息对应的开票企业已开蓝票的风险评分;
    所述区块链节点将所述开票信息对应的开票企业已开蓝票的风险评分低于所述预设阈值的蓝票进行红冲,得到所述风险评分低于所述预设阈值的蓝票对应的红票;
    所述区块链节点将所述风险评分低于所述预设阈值的蓝票对应的红票写入区块后,发送给所述开票者。
  5. 如权利要求3所述的方法,其特征在于,所述区块链节点在拒绝所述开票请求之后,还包括:
    所述区块链节点根据所述风险评分和所述开票信息对应的开票企业已开蓝票的风险评分,确定所述开票信息对应的开票企业的开票评分;
    若所述开票信息对应的开票企业的开票评分低于预设开票阈值,则所述区块链节点将所述开票信息对应的开票企业的已开蓝票进行红冲,得到所述开票信息对应的开票企业的已开蓝票对应的红票;
    所述区块链节点将所述开票信息对应的开票企业的已开蓝票对应的红票写入区块后,发送给所述开票者。
  6. 如权利要求1所述的方法,其特征在于,所述开票信息包括开票请求时间、开票金额、对应订单及支付信息、开票方信息和受票方信息。
  7. 如权利要求1至6任一项所述的方法,其特征在于,所述方法还包括:
    所述区块链节点生成散列值,将所述散列值上传至所述区块链电子发票平台上进行共识,并写入区块;
    其中,所述散列值是所述区块链节点根据所述开票信息生成的或根据所述共识结果中的电子发票生成的。
  8. 一种基于区块链的电子发票的开具装置,其特征在于,包括:
    获取单元,用于获取开票方发送的电子发票的开票请求,所述开票请求中包括开票信息;
    处理单元,用于在所述开票请求验签通过后,对所述开票信息进行风险评估,得到所述开票信息的风险评分;将所述风险评分上传至区块链电子发 票平台上进行共识,得到共识结果并写入区块;将所述共识结果发给开票方。
  9. 如权利要求8所述的装置,其特征在于,所述处理单元具体用于:
    对预设时段内所述开票信息对应的开票企业的部分或全部开票信息提取关键变量;
    对所述关键变量进行特征处理,得到特征向量;
    将所述特征向量输入至预设的风险模型,得到所述开票信息的风险评分。
  10. 如权利要求8所述的装置,其特征在于,所述处理单元具体用于:
    确定所述风险评分是否低于预设阈值,若否,则生成所述开票信息对应的蓝票,否则拒绝所述开票请求;
    将所述风险评分广播至所述区块链电子发票平台上的其它区块链节点,以使所述其它区块链节点对所述风险评分进行共识;
    在确定达成共识后,将所述蓝票或所述拒绝所述开票请求确定为所述共识结果。
  11. 如权利要求10所述的装置,其特征在于,所述处理单元还用于:
    在拒绝所述开票请求之后,重新对所述开票信息对应的开票企业已开蓝票的开票信息进行风险评估,得到所述开票信息对应的开票企业已开蓝票的风险评分;
    将所述开票信息对应的开票企业已开蓝票的风险评分低于所述预设阈值的蓝票进行红冲,得到所述风险评分低于所述预设阈值的蓝票对应的红票;
    将所述风险评分低于所述预设阈值的蓝票对应的红票写入区块后,发送给所述开票者。
  12. 如权利要求10所述的装置,其特征在于,所述处理单元还用于:
    在拒绝所述开票请求之后,根据所述风险评分和所述对所述开票信息对应的开票企业已开蓝票的风险评分,确定所述开票信息对应的开票企业的开票评分;
    若所述开票信息对应的开票企业的开票评分低于预设开票阈值,则将所述开票信息对应的开票企业的已开蓝票进行红冲,得到所述开票信息对应的 开票企业的已开蓝票对应的红票;
    将所述开票信息对应的开票企业的已开蓝票对应的红票写入区块后,发送给所述开票者。
  13. 如权利要求8所述的装置,其特征在于,所述开票信息包括开票请求时间、发票金额、对应订单及支付信息、开票方信息和受票方信息。
  14. 如权利要求8至13任一项所述的装置,其特征在于,所述处理单元还用于:
    生成散列值,将所述散列值上传至所述区块链电子发票平台上进行共识,并写入区块;
    其中,所述散列值是根据所述开票信息生成的或根据所述共识结果中的电子发票生成的。
  15. 一种计算设备,其特征在于,包括:
    存储器,用于存储程序指令;
    处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行权利要求1至7任一项所述的方法。
  16. 一种计算机可读非易失性存储介质,其特征在于,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行如权利要求1至7任一项所述的方法。
PCT/CN2020/117171 2019-12-20 2020-09-23 一种基于区块链的电子发票的开具方法及装置 WO2021120760A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911329813.4 2019-12-20
CN201911329813.4A CN111062766B (zh) 2019-12-20 2019-12-20 一种基于区块链的电子发票的开具方法及装置

Publications (1)

Publication Number Publication Date
WO2021120760A1 true WO2021120760A1 (zh) 2021-06-24

Family

ID=70301289

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117171 WO2021120760A1 (zh) 2019-12-20 2020-09-23 一种基于区块链的电子发票的开具方法及装置

Country Status (2)

Country Link
CN (1) CN111062766B (zh)
WO (1) WO2021120760A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114240407A (zh) * 2021-11-17 2022-03-25 广东电网有限责任公司 一种基于区块链的票据风险传导量化评估系统及方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111062766B (zh) * 2019-12-20 2024-02-09 中国银联股份有限公司 一种基于区块链的电子发票的开具方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018163044A1 (en) * 2017-03-05 2018-09-13 Tatchell Shona System and method for provision of supply chain financing of ethically verified product where there has been verification of production processes and products inspection using blockchain smart contracts
CN109615509A (zh) * 2018-11-28 2019-04-12 深圳微众税银信息服务有限公司 一种资金风险评估方法及系统
CN109949108A (zh) * 2018-12-12 2019-06-28 阿里巴巴集团控股有限公司 基于区块链的发票创建方法和装置、电子设备
CN110443660A (zh) * 2019-08-15 2019-11-12 上海天地汇供应链科技有限公司 一种基于区块链的电子发票装置、系统及实现方法
CN111062766A (zh) * 2019-12-20 2020-04-24 中国银联股份有限公司 一种基于区块链的电子发票的开具方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976969A (zh) * 2017-12-27 2019-07-05 航天信息股份有限公司 一种电子发票信息的监控方法、装置、设备及介质
CN108961030B (zh) * 2018-08-15 2023-01-03 深圳市智税链科技有限公司 关于电子票据的数据处理方法、装置、系统、介质和设备
CN110400188B (zh) * 2018-08-16 2021-08-13 深圳市智税链科技有限公司 电子票据生成方法、装置、存储介质和计算机设备
CN110084655B (zh) * 2019-05-05 2023-06-23 腾讯科技(深圳)有限公司 电子票据处理方法、装置、计算机设备及计算机存储介质
CN110298547A (zh) * 2019-05-24 2019-10-01 深圳壹账通智能科技有限公司 风险评估方法、装置、计算机装置及存储介质
CN110599266B (zh) * 2019-09-16 2021-07-06 腾讯科技(深圳)有限公司 电子票据数据处理方法、装置、计算机设备和存储介质
CN110599137A (zh) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 电子票据数据处理方法、装置和计算机设备
CN110599267A (zh) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 电子发票开票方法、装置、计算机可读存储介质和计算机设备
CN110619511A (zh) * 2019-09-18 2019-12-27 腾讯科技(深圳)有限公司 电子票据处理方法、装置、可读存储介质和计算机设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018163044A1 (en) * 2017-03-05 2018-09-13 Tatchell Shona System and method for provision of supply chain financing of ethically verified product where there has been verification of production processes and products inspection using blockchain smart contracts
CN109615509A (zh) * 2018-11-28 2019-04-12 深圳微众税银信息服务有限公司 一种资金风险评估方法及系统
CN109949108A (zh) * 2018-12-12 2019-06-28 阿里巴巴集团控股有限公司 基于区块链的发票创建方法和装置、电子设备
CN110443660A (zh) * 2019-08-15 2019-11-12 上海天地汇供应链科技有限公司 一种基于区块链的电子发票装置、系统及实现方法
CN111062766A (zh) * 2019-12-20 2020-04-24 中国银联股份有限公司 一种基于区块链的电子发票的开具方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114240407A (zh) * 2021-11-17 2022-03-25 广东电网有限责任公司 一种基于区块链的票据风险传导量化评估系统及方法

Also Published As

Publication number Publication date
CN111062766B (zh) 2024-02-09
CN111062766A (zh) 2020-04-24

Similar Documents

Publication Publication Date Title
TWI714359B (zh) 一種電子憑證上傳的方法及裝置
CN110245186B (zh) 一种基于区块链的业务处理方法及相关设备
CN107808289B (zh) 电子支付平台、控制方法及装置
CN103150672A (zh) 一种银行快速授信系统及方法
WO2021143081A1 (zh) 区块链供应链金融平台的数字化运作方法及其装置
WO2021120760A1 (zh) 一种基于区块链的电子发票的开具方法及装置
US20130325706A1 (en) System, method, apparatus, and computer program product for improved payment processing
CN112488777B (zh) 一种票据处理的方法及相关装置
WO2020233402A1 (zh) 应付账款订单校验方法、装置、设备及存储介质
CN106815725A (zh) 一种交易验证方法和装置
CN108133415A (zh) 一种电子凭据报销方法、装置和系统
US20230020968A1 (en) Systems and methods for verifying digital payments
CN109978542B (zh) 应付账款数据的管理方法、系统、存储介质和电子设备
WO2022142437A1 (zh) 一种数字货币定向交易的方法及系统
CN111260421B (zh) 一种基于区块链的电子发票管控方法及装置
CN112598502A (zh) 一种取证方法、装置、设备及存储介质
CN111242773A (zh) 虚拟资源申请的对接方法、装置、计算机设备及存储介质
CN111400187A (zh) 基于定制数据源的参数动态化校验系统及方法
CN116739596A (zh) 基于区块链的交易监管方法、装置、设备、介质和产品
WO2021121030A1 (zh) 一种资源转移的方法及结账终端、服务器节点
CN114154996A (zh) 一种跨区块链的数据流转方法及系统、存储介质、终端
CN116029843A (zh) 一种财务报销方法、装置及电子设备
CN114463110A (zh) 一种基于区块链的授信系统和方法
US20200042965A1 (en) Linking events with lineage rules
CN110866816A (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: 20902160

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: 20902160

Country of ref document: EP

Kind code of ref document: A1