CN111062766B - Electronic invoice issuing method and device based on blockchain - Google Patents

Electronic invoice issuing method and device based on blockchain Download PDF

Info

Publication number
CN111062766B
CN111062766B CN201911329813.4A CN201911329813A CN111062766B CN 111062766 B CN111062766 B CN 111062766B CN 201911329813 A CN201911329813 A CN 201911329813A CN 111062766 B CN111062766 B CN 111062766B
Authority
CN
China
Prior art keywords
billing
information
ticket
issuing
blue
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
CN201911329813.4A
Other languages
Chinese (zh)
Other versions
CN111062766A (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201911329813.4A priority Critical patent/CN111062766B/en
Publication of CN111062766A publication Critical patent/CN111062766A/en
Priority to PCT/CN2020/117171 priority patent/WO2021120760A1/en
Application granted granted Critical
Publication of CN111062766B publication Critical patent/CN111062766B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Abstract

The invention discloses a method and a device for issuing an electronic invoice based on a block chain, wherein the method comprises the steps that block chain link points acquire an issuing request of the electronic invoice sent by an issuing party, the issuing request comprises issuing information, after the issuing request passes through a check, risk assessment is carried out on the issuing information to obtain risk scores of the issuing information, the risk scores are uploaded to a block chain electronic invoice platform for consensus, and a consensus result is obtained and written into a block; and sending the consensus result to an invoicing party. Through carrying out risk assessment and consensus on the issuing information before issuing the electronic invoice, a consensus result is obtained, the problem of repeated issuing of the electronic invoice can be avoided, the issuing risk of the electronic invoice is reduced, and the issuing efficiency of the electronic invoice is improved.

Description

Electronic invoice issuing method and device based on blockchain
Technical Field
The invention relates to the technical field of electronic invoices, in particular to a block chain-based electronic invoice issuing method and device.
Background
The tax control system is a network system for realizing electronic invoice issuing, and provides electronic invoice issuing service for various enterprises and users, however, in practical application, the problem of repeated electronic invoice issuing usually occurs due to poor network and the like, so that unnecessary troubles are brought to links of follow-up electronic invoice accounting, reimbursement accounting and the like, and how to avoid repeated electronic invoice issuing is a problem to be solved urgently in the technical field of electronic invoices.
Disclosure of Invention
The embodiment of the invention provides a block chain-based electronic invoice issuing method and device, which are used for avoiding the problem of repeated issuing of electronic invoices.
In a first aspect, an embodiment of the present invention provides a method for issuing an electronic invoice based on a blockchain, including:
the method comprises the steps that a block chain node obtains an invoicing request of an electronic invoice sent by an invoicing party, wherein the invoicing request comprises invoicing information;
after the billing request passes through the check, the blockchain node carries out risk assessment on the billing information to obtain a risk score of the billing information;
the block chain link points upload the risk scores to a block chain electronic invoice platform for consensus, so as to obtain consensus results and write the consensus results into a block; and sending the consensus result to an invoicing party.
According to the technical scheme, before the electronic invoice is issued, risk assessment is performed on the issued information and consensus is performed, so that a consensus result is obtained, the problem of repeated issuing of the electronic invoice can be avoided, the issued risk of the electronic invoice is reduced, and the issued efficiency of the electronic invoice is improved.
Optionally, the blockchain node performs risk assessment on the billing information to obtain a risk score of the billing information, including:
the blockchain node extracts key variables from part or all of billing information of the billing enterprises corresponding to the billing information in a preset period;
the block chain node performs feature processing on the key variable to obtain a feature vector;
and the block chain link points input the feature vector to a preset risk model to obtain a risk score of the billing information.
Optionally, the block link uploads the risk score to a block chain electronic invoice platform for consensus, to obtain a consensus result, including:
the blockchain node determines whether the risk score is lower than a preset threshold, if not, a blue ticket corresponding to the billing information is generated, otherwise, the billing request is refused;
the blockchain link broadcasts the risk score to other blockchain nodes on the blockchain electronic invoice platform so that the other blockchain nodes can consensus the risk score;
the blockchain node determines the blue ticket or the refusal of the billing request as the consensus result after determining that consensus is achieved.
Optionally, after rejecting the billing request, the blockchain node further includes:
the block chain link points carry out risk assessment on the billing information of the billing enterprises which corresponds to the billing information and have made blue tickets again, and the risk scores of the billing enterprises which correspond to the billing information and have made blue tickets are obtained;
the block chain link point carries out red punching on the blue ticket with the risk score lower than the preset threshold value of the blue ticket which is already issued by the issuing enterprise and corresponds to the issuing information, and a red ticket corresponding to the blue ticket with the risk score lower than the preset threshold value is obtained;
and the block chain link points write the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold into the block and then send the red ticket to the drawer.
Optionally, after rejecting the billing request, the blockchain node further includes:
the blockchain node determines the billing score of the billing enterprise corresponding to the billing information according to the risk score and the risk score of the billing enterprise corresponding to the billing information, which has billed blue;
if the billing score of the billing enterprise corresponding to the billing information is lower than a preset billing threshold value, the block chain link point red-flushes the opened blue ticket of the billing enterprise corresponding to the billing information to obtain a red ticket corresponding to the opened blue ticket of the billing enterprise corresponding to the billing information;
and the block chain link point writes the red ticket corresponding to the blue ticket of the ticket issuing enterprise corresponding to the ticket issuing information into a block and then sends the block to the drawer.
Optionally, the invoice information includes an invoice request time, an invoice amount, corresponding order and payment information, an invoice party ID and invoice receiver information.
Optionally, the method further comprises:
the block chain link point generates a hash value, and the hash value is uploaded to the block chain electronic invoice platform for consensus and is written into a block;
the hash value is generated by the block chain link point according to the billing information or according to an electronic invoice in the consensus result.
In a second aspect, an embodiment of the present invention provides a device for issuing an electronic invoice based on a blockchain, including:
the electronic invoice issuing system comprises an acquiring unit, an issuing unit and an issuing unit, wherein the acquiring unit is used for acquiring an issuing request of an electronic invoice sent by an issuing party, and the issuing request comprises issuing information;
the processing unit is used for carrying out risk assessment on the billing information after the billing request passes through to obtain a risk score of the billing information; uploading the risk score to a block chain electronic invoice platform for consensus, obtaining a consensus result and writing the consensus result into a block; and sending the consensus result to an invoicing party.
Optionally, the processing unit is specifically configured to:
extracting key variables from part or all of billing information of billing enterprises corresponding to the billing information in a preset period;
carrying out feature processing on the key variables to obtain feature vectors;
and inputting the feature vector into a preset risk model to obtain a risk score of the billing information.
Optionally, the processing unit is specifically configured to:
determining whether the risk score is lower than a preset threshold, if not, generating a blue ticket corresponding to the billing information, otherwise, rejecting the billing request;
broadcasting the risk score to other blockchain nodes on the blockchain electronic invoice platform to enable the other blockchain nodes to consensus the risk score;
upon determining that consensus is reached, determining the blue ticket or the refusal of the billing request as the consensus result.
Optionally, the processing unit is further configured to:
after rejecting the billing request, carrying out risk assessment on billing information of the billing enterprise which corresponds to the billing information and has made a blue bill again to obtain a risk score of the billing enterprise which corresponds to the billing information and has made a blue bill;
red punching is carried out on the blue tickets, the risk scores of which are lower than the preset threshold value, of the blue tickets which are already issued by the issuing enterprises and correspond to the issuing information, and red tickets, corresponding to the blue tickets, of which the risk scores are lower than the preset threshold value, are obtained;
and writing the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold value into a block, and then sending the red ticket to the drawer.
Optionally, the processing unit is further configured to:
after rejecting the billing request, determining the billing score of the billing enterprise corresponding to the billing information according to the risk score and the risk score of the billing enterprise which has billed blue corresponding to the billing information;
if the billing score of the billing enterprise corresponding to the billing information is lower than a preset billing threshold value, red punching is carried out on the opened blue ticket of the billing enterprise corresponding to the billing information to obtain a red ticket corresponding to the opened blue ticket of the billing enterprise corresponding to the billing information;
and writing the red ticket corresponding to the blue ticket of the invoicing enterprise corresponding to the invoicing information into a block, and then sending the block to the drawer.
Optionally, the billing information includes billing request time, invoice amount, corresponding order and payment information, billing party information and ticket receiver information.
Optionally, the processing unit is further configured to:
generating a hash value, uploading the hash value to the block chain electronic invoice platform for consensus, and writing the hash value into a block;
wherein the hash value is generated according to the billing information or according to an electronic invoice in the consensus result.
In a third aspect, embodiments of the present invention also provide a computing device, comprising:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the method for issuing the electronic invoice based on the block chain according to the obtained program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable nonvolatile storage medium, including computer-readable instructions, which when read and executed by a computer, cause the computer to perform the above-described method for issuing a blockchain-based electronic invoice.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present invention;
FIG. 2 is a flow chart 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 according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a node according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a block chain-based electronic invoice issuing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
FIG. 1 illustrates a system architecture to which embodiments of the present invention are applicable, which may include enterprise billing applications, blockchain-based electronic invoice trusted billing devices, and blockchain electronic invoice platforms.
The electronic invoice credible issuing device based on the blockchain can comprise a verification module, a receiving module, an air control module, a generating module, an uploading module, a query module and a certificate management module.
And a verification module: the method is used for checking the correctness of the information registered by the ticketing enterprise and verifying the signature of the ticketing information in the ticketing request.
Certificate management module: and the method is used for issuing the public and private keys of the enterprises after the information registered by the ticketing enterprises passes the verification.
And a receiving module: the method is used for receiving the request of invoicing or invoice authenticity checking of enterprises and carrying out signature verification on the request.
And the wind control module is used for: for running wind-controlled models, the input of the model is billing information (Info 1 ,Info 2 ,…,Info n ) And outputting a risk score S.
The generation module is used for: and the electronic invoice Inv is generated according to the intelligent contract rule based on the scoring result S output by the wind control module.
And an uploading module: for uploading the electronic invoice to the blockchain node.
And (5) checking the module: and after receiving the invoice authenticity checking request, inquiring invoice information in a chain and returning a checking result.
It should be noted that the structure shown in fig. 1 is merely an example, and the embodiment of the present invention is not limited thereto.
Based on the above description, fig. 2 shows in detail a flow of a method for issuing an electronic invoice based on a blockchain according to an embodiment of the present invention, where the flow may be executed by an apparatus for issuing an electronic invoice based on a blockchain, and the apparatus may be located in or be a blockchain node.
As shown in fig. 2, the process specifically includes:
in step 201, a blockchain node obtains an invoicing request of an electronic invoice sent by an invoicing party.
The billing request may include billing information, where the billing information may include billing request time, billing amount, corresponding order and payment information, billing party information, and billing party information.
For example, before the billing request is obtained, the enterprise E with the billing request performs information registration on the tax office blockchain electronic invoice platform in advance, including enterprise tax information verification, selected agent service provider, blockchain invoice service authority opening and the like, and obtains an enterprise public and private key issued by the tax office after registration. And then the enterprise E sends an invoicing request to the proxy server based on the accepted transaction, the proxy server sends the invoicing request to the block chain node, and the block chain node extracts relevant invoicing information Info after checking the signings, wherein the relevant invoicing information Info comprises the invoicing request time, the invoicing amount, corresponding order and payment information, invoicing party information, ticket receiver information and the like.
Step 202, the blockchain node performs risk assessment on the billing information after the billing request passes through to obtain a risk score of the billing information.
Specifically, the blockchain node extracts key variables from part or all of billing information of billing enterprises corresponding to billing information in a preset time period, then performs feature processing on the key variables to obtain feature vectors, and finally inputs the feature vectors into a preset risk model to obtain risk scores of the billing information.
For example, the input of the wind control model is billing information (Info 1 ,Info 2 ,…,Info n ) Corresponding feature vectors. The following steps are required:
(1) Ordering the billing information, and ordering the billing information according to the billing request time to obtain billing information sequence (Info 1 ,Info 2 ,…,Info n );
(2) Extracting key variables and extracting each billing information Info i In the system, the details of the ticket receiver comprise four sub-components of a name, a tax payer identification number, an address and a telephone and an electronic payment identificationA field;
(3) And respectively carrying out characteristic processing on the four variables:
(1) extracting characteristic variable of 'billing request time', calculating billing request time interval number sequence (T) 1 ,T 2 ,…T n-1 ) And carrying out statistical analysis on the time interval sequence, and if the time interval is small and the distribution is concentrated, considering that the risk is higher, otherwise, the risk is lower.
(2) And carrying out cluster analysis on the ticket receiver details, judging the feature similarity of the ticket receiver details by taking the two subfields of the name and the tax payer identification number as the highest weight value, judging the feature similarity of the ticket receiver details to be a class with high similarity, and considering that the risk is higher if the ticket receiver can be intensively classified into a plurality of classes, otherwise, the risk is low.
(3) And carrying out feature combination on two feature variables of the billing amount and the goods or tax-applicable labor service name, and calculating whether the billing amount exceeds the general billing amount under the category of the goods or tax-applicable labor service name, if the billing amount exceeds a certain proportion, the risk is considered to be higher, otherwise, the risk is low.
And finally determining the feature vector = { billing request interval, the similarity of the ticket taker, whether the billing amount is reasonable }.
It should be noted that the above feature vector is only exemplary, and other fields in the invoice may be selected as feature variables, such as selecting a tax rate as one of the feature variables.
After the feature vector is obtained, the feature vector is input into a wind control model to obtain a risk score.
In the embodiment of the invention, the wind control module can be a scoring card, logistic regression, random forest, other complex models and the like.
And 204, uploading the billing information, the hash value and the risk score to a block chain electronic invoice platform by the block chain link point for consensus to obtain an electronic invoice and writing the electronic invoice into a block.
In the consensus process, each blockchain node can run a deployed intelligent contract to judge the risk score. Specifically, the block chain link point determines whether the risk score is lower than a preset threshold, if not, a blue ticket corresponding to the billing information is generated, and otherwise, the invoice request is refused. The risk score is then broadcast to other blockchain nodes on the blockchain electronic invoice platform to cause the other blockchain nodes to consensus the risk score. Finally, after the agreement is confirmed, the blue ticket or refusal of the billing request is confirmed as the consensus result. The preset threshold may be empirically set.
In addition, after rejecting the billing request, a red punching instruction may be triggered, which may be specifically implemented in the following two ways:
mode one:
the blockchain node can carry out risk assessment on the billing information of the billed blue bill of the billing enterprise corresponding to the billing information again, and then obtain the risk score of the billed blue bill of the billing enterprise corresponding to the billing information. If the risk score of the blue ticket of the billing enterprise corresponding to the billing information is also lower than the preset threshold value, the blue ticket of which the risk score of the blue ticket of the billing enterprise corresponding to the billing information is lower than the preset threshold value can be red-flushed, so that the red ticket corresponding to the blue ticket of which the risk score is lower than the preset threshold value is obtained. And finally, writing the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold value into a block, and sending the block to the drawer so as to enable the drawer to inquire the corresponding invoice. It should be noted that, in the embodiment of the present invention, both the blue ticket and the red ticket may be referred to as an electronic invoice.
Mode two:
the blockchain node can determine the billing score of the billing enterprise corresponding to the billing information according to the risk score of the billing request and the risk score of the opened blue bill of the billing enterprise corresponding to the billing information, and if the billing score of the billing enterprise corresponding to the billing information is lower than a preset billing threshold value, the opened blue bill of the billing enterprise corresponding to the billing information can be red-flushed to obtain a red bill corresponding to the opened blue bill of the billing enterprise corresponding to the billing information. And finally, writing the red ticket corresponding to the blue ticket of the invoicing enterprise corresponding to the invoicing information into the block, and sending the block to the drawer. In the mode, all blue tickets already issued in the billing enterprise are red-flushed, so that missing situations are avoided.
It should be noted that, in the process of issuing the electronic invoice, a hash value is also required to be generated, and the hash value is uploaded to the blockchain electronic invoice platform to be commonly recognized and written into the block, wherein the hash value can be generated according to the issuing information or the electronic invoice in the commonly recognized result.
For example, signing the billing information Info and hashing to generate a HASH value H, i.e. h=hash (Sig N (Info)). Embodiments of the present invention are merely exemplary, and other hash methods or signature methods may be employed in particular applications.
The above-mentioned blue ticket or red ticket is collectively called an electronic invoice Inv, which is a combination of block link point pair billing information Info signature information and hash value H, i.e., inv=sig N (Info)+H。
If the consensus result is the electronic invoice, after the electronic invoice is issued to the issuing party, the authenticity checking of the electronic invoice is carried out, specifically, a checking request of the electronic invoice is obtained, the checking request comprises an electronic invoice ID of the electronic invoice, and the checking request is sent by the issuing party after the issuing party delivers the electronic invoice to the receiving party. And inquiring the electronic invoice according to the electronic invoice ID to obtain an inspection result. And finally, sending the checking result to the ticket receiver. In the embodiment of the invention, the invoicing party can be an invoicing enterprise or a proxy service provider corresponding to the invoicing enterprise.
In order to better explain the embodiments of the present invention, the above-described electronic invoice issuing process will be described below in a specific implementation scenario.
In the embodiment of the invention, hyperledger Fabric is adopted as an electronic invoice blockchain electronic invoice platform, intelligent contracts of electronic invoices are deployed on the electronic invoice platform, and functions of registering enterprise information, checking the electronic invoices, uploading, generating red and blue tickets and the like are realized by adopting a solubility language.
In the blockchain electronic invoice platform layer, as shown in fig. 3, tax administration supervision nodes are used as alliance chain monitoring nodes, and billing service providers, circulation service providers and other proxy service providers and large enterprises are used as common nodes to join.
The tax administration supervision node has all rights to monitor the whole flow of the invoice, and the application system comprises all modules such as a verification module, a certificate management module, a receiving module, a checking module, a wind control module, a generating module, an uploading module and the like. The billing/circulation service node has partial authority, and the application system comprises a receiving module, a checking module, an air control module and an uploading module. The specific structure is shown in fig. 4.
At an application system layer, a tax office end establishes an electronic invoice issuing upper-layer application system based on an electronic invoice blockchain electronic invoice platform, and has application management functions of enterprise registration management, wind control scoring, invoice generation, invoice checking, certificate management and the like, and a related tax collection management system of a tax office is connected behind the system; the billing server side provides 'payment + billing' products for merchants and consumers through payment acceptance channels of the billing server side, and is mainly responsible for forwarding billing requests of the merchants, wherein typical billing products comprise billing two-dimensional codes, billing pages after APP payment, billing applets and the like; the circulation service provider side synchronizes invoice data and the latest state of the invoice with the enterprise through ERP/financial system development service provided for the ticket-receiving enterprise, and is mainly responsible for forwarding the enterprise reimbursement verification requirement so as to further verify the authenticity of the invoice.
Based on the above architecture, the electronic invoice credible issuing process comprises:
1. the merchant registers information in the tax office in advance, including enterprise tax information verification, selection of proxy service providers, opening of block chain invoice service authority and the like.
2. The tax bureau side invokes the verification module and the certificate management module to accept the registration request of the merchant, and issues the public and private keys of the merchant after the information verification is passed.
3. The merchant sends the public and private keys to the billing service provider for storage, and meanwhile, effective information is submitted at the billing service provider for the basis of using the billing product of the billing service provider subsequently.
4. The billing service provider distributes billing products, such as intelligent POS machines, for merchants and provides operation and maintenance services for the products.
5. After the consumer purchases the service at the commercial tenant operation place, the bank card is used for payment, after the payment is successful, the intelligent POS prints a ticket purchase order, and the two-dimension code is printed below the ticket purchase order, wherein the two-dimension code contains the order related information of the payment and the billing background URL of the billing service provider.
6. The customer selects a certain time to use the mobile phone terminal to scan the two-dimension code of making an invoice, the terminal browser accesses the page of making an invoice, and the page displays payment order details, head lifting management filling columns, information of an invoicing service provider and the like.
7. The consumer fills out the billing head and submits the billing request.
8. The billing service receives a billing request containing fields and examples as shown in table 1.
TABLE 1
After the request and the merchant tax information are combined and packaged, billing information Info is formed as shown in table 2.
TABLE 2
And signing the Info by adopting an ECDSA algorithm and using a merchant private key to form an invoicing request REQ=info|Sig (Info) and sending the invoicing request REQ=info|Sig (Info) to the blockchain electronic invoice platform.
9. The node receiving the billing request calls a receiving module, after the signature passes, the signature is hashed by adopting an SHA-256 algorithm to obtain a HASH value H, namely H=hash (Sig) N (Info))。
10. The node calls the wind control module, and the scoring process of the wind control module is as follows:
(1) The invoice sets of the sellers 'Shenzhen city Dragon Hua Ou cave fish paper fish-covered restaurant' in a period of time are screened, ordered according to the time of the invoicing request, an invoice list is obtained, and key fields in the invoices are extracted, as shown in table 3.
TABLE 3 Table 3
/>
(2) And carrying out characteristic processing on the variables of each key field in the invoice list.
(1) And calculating the time interval of the billing request time in the invoice list, and carrying out statistical analysis on the time interval array.
(2) And carrying out cluster analysis on the ticket receiver details, and judging the feature similarity of the ticket receiver details by taking the two subfields of the name and the tax payer identification number as the highest weight value, wherein the similarity is high and is judged to be one type.
(3) And carrying out feature combination on two feature variables of the billing amount and the goods or tax-applicable labor service name, and calculating whether the billing amount exceeds the general billing amount under the category of the goods or tax-applicable labor service name.
(3) And learning the weight of each feature in the feature vector { billing request interval, the similarity of the ticket taker, whether the billing amount is reasonable } by using the classification model.
(1) Calculate each feature A i Information gain g under training data set i (D,A i )=H(D)-H(D|A i ),i=1,2,3。
(2) For g 1 ,g 2 ,g 3 Normalization processing is carried out to obtain the weight occupied by each feature
(4) Calculate s=w 1 A 1 +w 2 A 2 +w 3 A 3 And obtaining a risk score S of the billing request.
In the above example, the risk score S is higher than a preset threshold, and is determined as an invoice issued by the high-risk enterprise.
11. The node uploads the billing information Info, hash value H and corresponding score S directly or through a blockchain middleware service to a blockchain electronic invoice platform. The upload data is shown in table 4.
TABLE 4 Table 4
12. The platform performs consensus, and intelligent contracts running on all nodes perform condition judgment on the uploaded electronic invoice related information.
Assuming that the preset threshold is set to be 6, the current processing time is 10 months 22 days in 2019, the invoices are numbered 1 and 2 before the current processing time, and the numbers 1 and 2 are risk scores obtained by risk assessment; the current processing time is followed by invoices numbered 3 and 4.
The method comprises the following steps: numbers 3 and 4 risk scores are both below a threshold, rejecting the 3 and 4 invoice requests;
meanwhile, a red punching instruction of the number 2 (blue ticket is already issued) is automatically triggered, and the tax bureau node calls the generating module to generate the red ticket, and the number is recorded as 5.
Number 1 was not treated because its risk score was above the threshold.
13. After consensus is reached, invoice 1 (blue ticket), invoice 2 (blue ticket) and invoice 5 (red ticket corresponding to number 2) are written into the data block.
14. The node returns an electronic invoice 5 in response to the invoicing request of the merchant.
15. The billing service provider delivers the electronic invoice 5 to the ticket taker.
16. The ticket receiver can check the authenticity of the electronic invoice to the blockchain electronic invoice platform according to the requirements. For example, the invoice receiver "China xx stock Limited company" of the invoice 1 can input an invoice code, an invoice number, an invoice time and a check code on the invoice on a tax office website to check the electronic invoice, and report the invoice; the ticket taker "Shanghai xx information services Limited" of invoices 2 and 5 can check the authenticity of both electronic invoices, neither of which can be used for reimbursement.
The embodiment shows that the block chain node obtains an invoicing request of an electronic invoice sent by an invoicing party, the invoicing request comprises invoicing information, risk assessment is carried out on the invoicing information after the invoicing request passes through a check, risk scores of the invoicing information are obtained, the risk scores are uploaded to a block chain electronic invoice platform for consensus, and consensus results are obtained and written into a block; and sending the consensus result to an invoicing party. Through carrying out risk assessment and consensus on the issuing information before issuing the electronic invoice, a consensus result is obtained, the problem of repeated issuing of the electronic invoice can be avoided, the issuing risk of the electronic invoice is reduced, and the issuing efficiency of the electronic invoice is improved.
Based on the same technical concept, fig. 5 illustrates the structure of a device for issuing an electronic invoice based on a blockchain, which is provided by the embodiment of the invention, and the device can execute the flow of issuing the electronic invoice based on the blockchain, and the device can be a blockchain node or can be located in the blockchain node.
As shown in fig. 5, the apparatus specifically includes:
an obtaining unit 501, configured to obtain an invoicing request of an electronic invoice sent by an invoicing party, where the invoicing request includes invoicing information;
the processing unit 502 is configured to perform risk assessment on the billing information after the billing request passes through a check, so as to obtain a risk score of the billing information; uploading the risk score to a block chain electronic invoice platform for consensus, obtaining a consensus result and writing the consensus result into a block; and sending the consensus result to an invoicing party.
Optionally, the processing unit 502 is specifically configured to:
extracting key variables from part or all of billing information of billing enterprises corresponding to the billing information in a preset period;
carrying out feature processing on the key variables to obtain feature vectors;
and inputting the feature vector into a preset risk model to obtain a risk score of the billing information.
Optionally, the processing unit 502 is specifically configured to:
determining whether the risk score is lower than a preset threshold, if not, generating a blue ticket corresponding to the billing information, otherwise, rejecting the billing request;
broadcasting the risk score to other blockchain nodes on the blockchain electronic invoice platform to enable the other blockchain nodes to consensus the risk score;
upon determining that consensus is reached, determining the blue ticket or the refusal of the billing request as the consensus result.
Optionally, the processing unit 502 is further configured to:
after rejecting the billing request, carrying out risk assessment on billing information of the billing enterprise which corresponds to the billing information and has made a blue bill again to obtain a risk score of the billing enterprise which corresponds to the billing information and has made a blue bill;
red punching is carried out on the blue tickets, the risk scores of which are lower than the preset threshold value, of the blue tickets which are already issued by the issuing enterprises and correspond to the issuing information, and red tickets, corresponding to the blue tickets, of which the risk scores are lower than the preset threshold value, are obtained;
and writing the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold value into a block, and then sending the red ticket to the drawer.
Optionally, the processing unit 502 is further configured to:
after rejecting the billing request, determining the billing score of the billing enterprise corresponding to the billing information according to the risk score and the risk score of the billing enterprise which has billed blue corresponding to the billing information;
if the billing score of the billing enterprise corresponding to the billing information is lower than a preset billing threshold value, red punching is carried out on the opened blue ticket of the billing enterprise corresponding to the billing information to obtain a red ticket corresponding to the opened blue ticket of the billing enterprise corresponding to the billing information;
and writing the red ticket corresponding to the blue ticket of the invoicing enterprise corresponding to the invoicing information into a block, and then sending the block to the drawer.
Optionally, the billing information includes billing request time, invoice amount, corresponding order and payment information, billing party information and ticket receiver information.
Optionally, the processing unit 502 is further configured to:
generating a hash value, uploading the hash value to the block chain electronic invoice platform for consensus, and writing the hash value into a block;
wherein the hash value is generated according to the billing information or according to an electronic invoice in the consensus result.
Based on the same technical concept, the embodiment of the invention further provides a computing device, which comprises:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the method for issuing the electronic invoice based on the blockchain according to the obtained program.
Based on the same technical concept, the embodiment of the invention also provides a computer readable nonvolatile storage medium, which comprises computer readable instructions, wherein when the computer reads and executes the computer readable instructions, the computer executes the method for issuing the electronic invoice based on the blockchain.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. 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.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (12)

1. A method for issuing an electronic invoice based on a blockchain, comprising:
the method comprises the steps that a block chain node obtains an invoicing request of an electronic invoice sent by an invoicing party, wherein the invoicing request comprises invoicing information;
after the billing request passes through the check, the blockchain node carries out risk assessment on the billing information to obtain a risk score of the billing information;
the blockchain node determines whether the risk score is lower than a preset threshold, if not, a blue ticket corresponding to the billing information is generated, otherwise, the billing request is refused;
under the condition of rejecting the billing request, the block chain link point carries out risk assessment on billing information of the billing enterprise which corresponds to the billing information and has billed blue, and a risk score of the billing enterprise which corresponds to the billing information and has billed blue is obtained; the block chain link point carries out red punching on the blue ticket with the risk score lower than the preset threshold value of the blue ticket which is already issued by the issuing enterprise and corresponds to the issuing information, and a red ticket corresponding to the blue ticket with the risk score lower than the preset threshold value is obtained; the block chain link points write the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold into a block and then send the red ticket to the drawer;
the blockchain link broadcasts the risk score to other blockchain nodes on the blockchain electronic invoice platform so that the other blockchain nodes can consensus the risk score;
after the block chain node determines that consensus is achieved, determining the blue ticket or the refusing of the billing request as the consensus result, and writing the consensus result into a block; and sending the consensus result to an invoicing party.
2. The method of claim 1, wherein the blockchain node performs risk assessment on the billing information to obtain a risk score for the billing information, comprising:
the blockchain node extracts key variables from part or all of billing information of the billing enterprises corresponding to the billing information in a preset period;
the block chain node performs feature processing on the key variable to obtain a feature vector;
and the block chain link points input the feature vector to a preset risk model to obtain a risk score of the billing information.
3. The method of claim 1, wherein the blockchain node, after rejecting the billing request, further comprises:
the blockchain node determines the billing score of the billing enterprise corresponding to the billing information according to the risk score and the risk score of the billing enterprise which has billed blue corresponding to the billing information;
if the billing score of the billing enterprise corresponding to the billing information is lower than a preset billing threshold value, the block chain link point red-flushes the opened blue ticket of the billing enterprise corresponding to the billing information to obtain a red ticket corresponding to the opened blue ticket of the billing enterprise corresponding to the billing information;
and the block chain link point writes the red ticket corresponding to the blue ticket of the ticket issuing enterprise corresponding to the ticket issuing information into a block and then sends the block to the drawer.
4. The method of claim 1, wherein the billing information includes billing request time, billing amount, corresponding order and payment information, billing party information, and ticket receiver information.
5. The method of any one of claims 1 to 4, further comprising:
the block chain link point generates a hash value, and the hash value is uploaded to the block chain electronic invoice platform for consensus and is written into a block;
the hash value is generated by the block chain link point according to the billing information or according to an electronic invoice in the consensus result.
6. A blockchain-based electronic invoice issuing device, comprising:
the electronic invoice issuing system comprises an acquiring unit, an issuing unit and an issuing unit, wherein the acquiring unit is used for acquiring an issuing request of an electronic invoice sent by an issuing party, and the issuing request comprises issuing information;
the processing unit is used for carrying out risk assessment on the billing information after the billing request passes through to obtain a risk score of the billing information; determining whether the risk score is lower than a preset threshold, if not, generating a blue ticket corresponding to the billing information, otherwise, rejecting the billing request; under the condition of rejecting the billing request, the block chain link point carries out risk assessment on billing information of the billing enterprise which corresponds to the billing information and has billed blue, and a risk score of the billing enterprise which corresponds to the billing information and has billed blue is obtained; the block chain link point carries out red punching on the blue ticket with the risk score lower than the preset threshold value of the blue ticket which is already issued by the issuing enterprise and corresponds to the issuing information, and a red ticket corresponding to the blue ticket with the risk score lower than the preset threshold value is obtained; the block chain link points write the red ticket corresponding to the blue ticket with the risk score lower than the preset threshold into a block and then send the red ticket to the drawer; broadcasting the risk score to other blockchain nodes on the blockchain electronic invoice platform to enable the other blockchain nodes to consensus the risk score; after determining that consensus is reached, determining the blue ticket or the refusal of the billing request as the consensus result, and writing the consensus result into a block; and sending the consensus result to an invoicing party.
7. The apparatus of claim 6, wherein the processing unit is specifically configured to:
extracting key variables from part or all of billing information of billing enterprises corresponding to the billing information in a preset period;
carrying out feature processing on the key variables to obtain feature vectors;
and inputting the feature vector into a preset risk model to obtain a risk score of the billing information.
8. The apparatus of claim 6, wherein the processing unit is further to:
after rejecting the billing request, determining the billing score of the billing enterprise corresponding to the billing information according to the risk score and the risk score of the billing enterprise which has billed blue corresponding to the billing information;
if the billing score of the billing enterprise corresponding to the billing information is lower than a preset billing threshold value, red punching is carried out on the opened blue ticket of the billing enterprise corresponding to the billing information to obtain a red ticket corresponding to the opened blue ticket of the billing enterprise corresponding to the billing information;
and writing the red ticket corresponding to the blue ticket of the invoicing enterprise corresponding to the invoicing information into a block, and then sending the block to the drawer.
9. The apparatus of claim 6, wherein the billing information includes billing request time, invoice amount, corresponding order and payment information, billing party information, and ticket receiver information.
10. The apparatus of any of claims 6 to 9, wherein the processing unit is further configured to:
generating a hash value, uploading the hash value to the block chain electronic invoice platform for consensus, and writing the hash value into a block;
wherein the hash value is generated according to the billing information or according to an electronic invoice in the consensus result.
11. A computing device, comprising:
a memory for storing program instructions;
a processor for invoking program instructions stored in said memory to perform the method of any of claims 1-5 in accordance with the obtained program.
12. A computer readable non-transitory storage medium comprising computer readable instructions which, when read and executed by a computer, cause the computer to perform the method of any of claims 1 to 5.
CN201911329813.4A 2019-12-20 2019-12-20 Electronic invoice issuing method and device based on blockchain Active CN111062766B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911329813.4A CN111062766B (en) 2019-12-20 2019-12-20 Electronic invoice issuing method and device based on blockchain
PCT/CN2020/117171 WO2021120760A1 (en) 2019-12-20 2020-09-23 Method and device for issuing electronic invoice employing blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911329813.4A CN111062766B (en) 2019-12-20 2019-12-20 Electronic invoice issuing method and device based on blockchain

Publications (2)

Publication Number Publication Date
CN111062766A CN111062766A (en) 2020-04-24
CN111062766B true CN111062766B (en) 2024-02-09

Family

ID=70301289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911329813.4A Active CN111062766B (en) 2019-12-20 2019-12-20 Electronic invoice issuing method and device based on blockchain

Country Status (2)

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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111062766B (en) * 2019-12-20 2024-02-09 中国银联股份有限公司 Electronic invoice issuing method and device based on blockchain
CN114240407A (en) * 2021-11-17 2022-03-25 广东电网有限责任公司 Bill risk conduction quantitative evaluation system and method based on block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961030A (en) * 2018-08-15 2018-12-07 腾讯科技(深圳)有限公司 About the data processing method of electronic bill, device, system, medium and equipment
CN109034924A (en) * 2018-08-16 2018-12-18 腾讯科技(深圳)有限公司 Electronic bill generation method, device, storage medium and computer equipment
CN109976969A (en) * 2017-12-27 2019-07-05 航天信息股份有限公司 A kind of monitoring method, device, equipment and the medium of electronic invoice information
CN110084655A (en) * 2019-05-05 2019-08-02 腾讯科技(深圳)有限公司 Electronic note processing method, device, computer equipment and computer storage medium
CN110298547A (en) * 2019-05-24 2019-10-01 深圳壹账通智能科技有限公司 Methods of risk assessment, device, computer installation and storage medium
CN110443660A (en) * 2019-08-15 2019-11-12 上海天地汇供应链科技有限公司 A kind of electronic invoice device, system and implementation method based on block chain

Family Cites Families (8)

* 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 (en) * 2018-11-28 2019-04-12 深圳微众税银信息服务有限公司 A kind of financial risks appraisal procedure and system
CN109949108A (en) * 2018-12-12 2019-06-28 阿里巴巴集团控股有限公司 Invoice creation method and device, electronic equipment based on block chain
CN110599266B (en) * 2019-09-16 2021-07-06 腾讯科技(深圳)有限公司 Electronic bill data processing method and device, computer equipment and storage medium
CN110599137A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Electronic bill data processing method and device and computer equipment
CN110599267A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Electronic invoice billing method and device, computer readable storage medium and computer equipment
CN110619511A (en) * 2019-09-18 2019-12-27 腾讯科技(深圳)有限公司 Electronic bill processing method and device, readable storage medium and computer equipment
CN111062766B (en) * 2019-12-20 2024-02-09 中国银联股份有限公司 Electronic invoice issuing method and device based on blockchain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976969A (en) * 2017-12-27 2019-07-05 航天信息股份有限公司 A kind of monitoring method, device, equipment and the medium of electronic invoice information
CN108961030A (en) * 2018-08-15 2018-12-07 腾讯科技(深圳)有限公司 About the data processing method of electronic bill, device, system, medium and equipment
CN109034924A (en) * 2018-08-16 2018-12-18 腾讯科技(深圳)有限公司 Electronic bill generation method, device, storage medium and computer equipment
CN110084655A (en) * 2019-05-05 2019-08-02 腾讯科技(深圳)有限公司 Electronic note processing method, device, computer equipment and computer storage medium
CN110298547A (en) * 2019-05-24 2019-10-01 深圳壹账通智能科技有限公司 Methods of risk assessment, device, computer installation and storage medium
CN110443660A (en) * 2019-08-15 2019-11-12 上海天地汇供应链科技有限公司 A kind of electronic invoice device, system and implementation method based on block chain

Also Published As

Publication number Publication date
CN111062766A (en) 2020-04-24
WO2021120760A1 (en) 2021-06-24

Similar Documents

Publication Publication Date Title
TWI714359B (en) Method and device for uploading electronic certificates
CN108805656B (en) Supply and demand matching method, platform, system and computer readable storage medium
WO2020001105A1 (en) Blockchain-based data verification method and apparatus, and electronic device
JP2021524088A (en) Resource migration data management method and equipment, and computer programs
CN112488777B (en) Bill processing method and related device
CN110874742B (en) Payment method and device based on block chain and intelligent contract
US20150269701A1 (en) Systems and methods for identity validation and verification
CN111062766B (en) Electronic invoice issuing method and device based on blockchain
CN111325581A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111445209A (en) Block chain-based electronic contract signing method and device and storage medium
CN110941840B (en) Data processing method, system and terminal
CN111311259A (en) Bill processing method, device, terminal and computer readable storage medium
CN111260421B (en) Electronic invoice management and control method and device based on block chain
CN113656497A (en) Data verification method and device based on block chain
CN112598502A (en) Evidence obtaining method, device, equipment and storage medium
CN113114629A (en) Contract management method, device, equipment and storage medium based on block chain
CN109756465A (en) A kind of method and apparatus of authentication
CN105512208B (en) Information publishing method, device and system
CN110598479A (en) Data processing method and device and computer readable storage medium
WO2021121030A1 (en) Resource transfer method, settlement terminal, and server node
CN115756255A (en) Method, device and equipment for processing equipment parameters of parking lot equipment and storage medium
CN115456619A (en) Virtual prepaid card issuing system and method based on block chain technology
CN112039893B (en) Private transaction processing method and device, electronic equipment and readable storage medium
CN110942395B (en) Insurance security risk control method, device, equipment and storage medium
CN114049124A (en) Data processing method, data processing apparatus, computer device, storage medium, and program product

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