CN109255084A - Electronic bill querying method, device, storage medium and computer equipment - Google Patents

Electronic bill querying method, device, storage medium and computer equipment Download PDF

Info

Publication number
CN109255084A
CN109255084A CN201810990815.7A CN201810990815A CN109255084A CN 109255084 A CN109255084 A CN 109255084A CN 201810990815 A CN201810990815 A CN 201810990815A CN 109255084 A CN109255084 A CN 109255084A
Authority
CN
China
Prior art keywords
electronic bill
block chain
inquiry
chain node
billing information
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.)
Granted
Application number
CN201810990815.7A
Other languages
Chinese (zh)
Other versions
CN109255084B (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.)
Shenzhen Zhishuilian Technology Co ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810990815.7A priority Critical patent/CN109255084B/en
Publication of CN109255084A publication Critical patent/CN109255084A/en
Application granted granted Critical
Publication of CN109255084B publication Critical patent/CN109255084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present invention relates to a kind of electronic bill querying method, device, storage medium and computer equipments, this method comprises: obtaining electronic bill inquiry request that is corresponding with user identifier and carrying electronic bill inquiry code;Determine search access right corresponding with the user identifier;Block chain node into block chain network sends the inquiry instruction that the electronic bill inquiry code is matched and carried with the search access right;Receive the query result that the block chain node returns;The query result is obtained after the electronic bill inquiry code according to entrained by the inquiry instruction carries out electronic bill inquiry as the block chain node;In response to the electronic bill inquiry request, fed back according to the query result.Scheme provided by the present application improves the utilization rate of electronic bill related data.

Description

Electronic bill querying method, device, storage medium and computer equipment
Technical field
The present invention relates to field of computer technology, more particularly to a kind of electronic bill querying method, device, storage medium And computer equipment.
Background technique
Invoice is enterprise or individual when sales to consumers commodity, providing service or being engaged in other business activities, is The consumption certificate that consumer provides.Enterprise or individual in sales to consumers commodity, offer service or are engaged in other operation work When dynamic, it should issue invoice and be paid taxes in accordance with the law according to invoice.
The data of traditional each link such as get, issue, submit an expense account and pay taxes about invoice are isolated, the phase of each link The user that pass data usually only participate in the link can inquire and utilize, so as to cause the utilization rate of electronic bill related data It is lower.
Summary of the invention
Based on this, it is necessary to for the lower problem of the utilization rate of electronic bill related data, provide a kind of electronic bill Querying method, device, storage medium and computer equipment.
A kind of electronic bill querying method, comprising:
Obtain electronic bill inquiry request that is corresponding with user identifier and carrying electronic bill inquiry code;
Determine search access right corresponding with the user identifier;
Into block chain network block chain node transmission matched with the search access right and carry the electronic ticket it is investigated that Ask the inquiry instruction of code;
Receive the query result that the block chain node returns;The query result is by the block chain node according to institute It states after electronic bill inquiry code entrained by inquiry instruction carries out electronic bill inquiry and obtains;
In response to the electronic bill inquiry request, fed back according to the query result.
A kind of electronic bill inquiry unit, comprising:
Module is obtained, is asked for obtaining electronic bill inquiry that is corresponding with user identifier and carrying electronic bill inquiry code It asks;
Determining module, for determining search access right corresponding with the user identifier;
Sending module sends for the block chain node into block chain network and matches and carry with the search access right The inquiry instruction of the electronic bill inquiry code;
Receiving module, the query result returned for receiving the block chain node;The query result is by the block Chain node obtains after the electronic bill inquiry code according to entrained by the inquiry instruction carries out electronic bill inquiry;
Feedback module, for being fed back according to the query result in response to the electronic bill inquiry request.
A kind of computer readable storage medium is stored with computer program on the computer readable storage medium, described When computer program is executed by processor, so that the processor executes following steps:
Obtain electronic bill inquiry request that is corresponding with user identifier and carrying electronic bill inquiry code;
Determine search access right corresponding with the user identifier;
Into block chain network block chain node transmission matched with the search access right and carry the electronic ticket it is investigated that Ask the inquiry instruction of code;
Receive the query result that the block chain node returns;The query result is by the block chain node according to institute It states after electronic bill inquiry code entrained by inquiry instruction carries out electronic bill inquiry and obtains;
In response to the electronic bill inquiry request, fed back according to the query result.
A kind of computer equipment, including memory and processor store computer program, the meter in the memory When calculation machine program is executed by the processor, so that the processor executes following steps:
Obtain electronic bill inquiry request that is corresponding with user identifier and carrying electronic bill inquiry code;
Determine search access right corresponding with the user identifier;
Into block chain network block chain node transmission matched with the search access right and carry the electronic ticket it is investigated that Ask the inquiry instruction of code;
Receive the query result that the block chain node returns;The query result is by the block chain node according to institute It states after electronic bill inquiry code entrained by inquiry instruction carries out electronic bill inquiry and obtains;
In response to the electronic bill inquiry request, fed back according to the query result.
Above-mentioned electronic bill querying method, device, storage medium and computer equipment are being got and user identifier pair After the electronic bill inquiry request for answering and carrying electronic bill inquiry code, and determine inquiry power corresponding with the user identifier Limit, and then the block chain node transmission into block chain network matches with the search access right and carries the electronic bill inquiry code Inquiry instruction, and the query result returned according to block chain node is fed back for electronic bill inquiry request, in this way, not The user for participating in electronic bill circulation process also can be carried out electronic bill inquiry, greatly improve electronic bill related data Utilization rate;And query result is controlled by search access right, while improving the utilization rate of electronic bill related data The safety of electronic bill related data is ensured.
Detailed description of the invention
Fig. 1 is the applied environment figure of electronic bill querying method in one embodiment;
Fig. 2 is the flow diagram of electronic bill querying method in one embodiment;
Fig. 3 is the schematic diagram of query page in one embodiment;
Fig. 4 is the schematic illustration of common recognition algorithm in one embodiment;
Fig. 5 is the timing diagram for carrying out electronic bill inquiry in one embodiment by being exclusively used in the block chain link point of inquiry;
Fig. 6 is the timing diagram of electronic bill inquiry in one embodiment;
Fig. 7 is the deployment diagram in one embodiment about the data processing system of electronic bill;
Fig. 8 is the function structure chart of electronic bill inquiry unit in one embodiment;
Fig. 9 is the function structure chart of electronic bill inquiry unit in another embodiment;
Figure 10 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Fig. 1 is the applied environment figure of electronic bill querying method in one embodiment.Referring to Fig.1, which inquires Method is applied to electronic bill inquiry system.The electronic bill inquiry system includes terminal 110, electronic bill management server 120 and block chain node 130.Wherein, the quantity of block chain node 130 is multiple and is located in block chain network.These blocks Data transmitting can be carried out between chain node two-by-two.Terminal 110 and electronic bill management server 120 pass through network connection.Electronics Bill management server 120 and block chain node 130 pass through network connection.
Specifically, terminal 110 can send corresponding with user identifier to electronic bill management server 120 and carry electronics The electronic bill inquiry request of bill inquiry code, electronic bill management server 120 after obtaining the electronic bill inquiry request, Can determine search access right corresponding with the user identifier, then block chain node 130 directly into block chain network send with Search access right matching and the inquiry instruction for carrying electronic bill inquiry code.Block chain node 130 then can be according to the inquiry in this way The entrained electronic bill inquiry code of instruction obtains query result after carrying out electronic bill inquiry, and query result is back to electricity Sub- bill management server 120.Electronic bill management server 120 is thus in response to electronic bill inquiry request, according to block The query result that chain node 130 returns is fed back.At this point, query result is to obtain in real time from block chain node 130, in this way The reliability of query result is further enhanced by block chain.
In a further embodiment, electronic bill management server 120 is determining inquiry power corresponding with the user identifier After limit, can first the electronic bill inquiry code according to entrained by electronic bill inquiry request and the search access right, from block link network Block chain node 130 in network, which is synchronized in local billing information, to be inquired;When inquiring and electronic bill inquiry code pair When the billing information answered, then in response to electronic bill inquiry request, fed back according to the billing information inquired;When not inquiring When to billing information corresponding with electronic bill inquiry code, then the transmission of block chain node 130 into block chain network is looked into this It askes permission match and carries the inquiry instruction of electronic bill inquiry code, inquired by block chain node 130.At this point, preferential It is inquired from local, improves inquiry response efficiency;And transfer when not inquiring locally to block chain querying node, with Going on smoothly for inquiry is ensured as far as possible, inquires result corresponding with search access right.
Wherein, terminal 110 specifically can be terminal console or mobile terminal, and mobile terminal specifically can be with mobile phone, plate electricity At least one of brain and laptop etc..Electronic bill server 120 and block chain node 130 can use independent service The server cluster of device either multiple servers composition is realized.
Fig. 2 is the flow diagram of electronic bill querying method in one embodiment.The present embodiment is mainly with the electronic ticket It is applied to electronic bill management server 120 according to querying method to illustrate.Referring to Fig. 2, electronic bill querying method tool Body includes the following steps:
S202 obtains electronic bill inquiry request that is corresponding with user identifier and carrying electronic bill inquiry code.
Wherein, electronic bill inquiry request carries out electronic bill inquiry for requesting.User identifier initiates electricity for identifying The user of sub- bill inquiry request.The user for initiating electronic bill inquiry request can be the public, administration or law enforcement Part etc..It is appreciated that being to carry out electricity with one's own name when the user for initiating electronic bill inquiry request is the public Sub- bill inquiry;When the user for initiating electronic bill inquiry request is administration or law enforcement part, be with administration or The nominal of part of enforcing the law carries out electronic bill inquiry.
Electronic bill inquiry code specifically can be character string or graphic code etc. for inquiring electronic bill.Image code ratio Such as two dimensional code or bar code.Electronic bill is the bill of electronization storage, for example can be stored in storage medium or computer In equipment.
In one embodiment, electronic bill inquiry code is fixed, not because of the circulation of electronic bill and status Variation and change.Such as the electronic bill mark for direction electronic bill management server application of making out an invoice, such as electronic bill Code and/or electronic bill number.
In one embodiment, electronic bill inquiry code is variation.Electronic bill can be during electronic bill circulates Each circulation stage, respectively correspond different electronic bill inquiry codes.Electronic bill inquiry code under each circulation stage is specific It can be according to the billing information generation under the circulation stage.The circulation stage of electronic bill is electronic bill in entire life The stage shifted in period specifically may include the stage of making out an invoice, reimbursement stage and the stage of declaring dutiable goods etc..
Specifically, each circulation stage during electronic bill circulates, for example stage of making out an invoice, reimbursement stage and declare dutiable goods Stage, block chain node can obtain the billing information in corresponding circulation stage respectively.For example, method, apparatus of making out an invoice can in the stage of making out an invoice According to the side of making out an invoice mark, with the side of making out an invoice mark it is associated and in unused state electronic bill mark, recipient identify and Resource transfers share generates billing information jointly, and billing information is sent to block chain node corresponding with method, apparatus of making out an invoice. In the reimbursement stage, the electronic bill public servicer for saving electronic bill service is provided for consumer, the bill of update can be believed Breath is sent to corresponding block chain node;Wherein, the billing information of update includes the bill state letter for indicating to have submitted an expense account state Breath.In the stage of declaring dutiable goods, method, apparatus is made out an invoice after enterprise of making out an invoice pays taxes by regulation, and the billing information of update is sent to and the side of making out an invoice The corresponding block chain node of equipment;Wherein, the billing information of update includes to indicate the bill status information of state of having declared dutiable goods.
Further, block chain node obtains electronics in each circulation stage during electronic bill circulates respectively Bill circulation the stage billing information after, block chain node can accordingly generate electronic bill circulation the stage electronic ticket it is investigated that Ask code.
In one embodiment, block chain node can carry out Hash operation to billing information by hash algorithm, obtain electricity Sub- bill is made out an invoice inquiry code.Common hash algorithm such as, MD5 (Message Digest Algorithm, Message Digest 5 the Five editions), SHA1 (Secure Hash Algorithm, Secure Hash Algorithm) and SHA2 etc., the embodiment of the present invention is not done herein to be had Body limits.
In one embodiment, electronic bill inquiry code entrained by electronic bill inquiry request can be multiple.In this way The inquiry of batch electronic bill can be realized by initiating one query request.
In one embodiment, which is applied to electronic bill management server, acquisition and user Mark is corresponding and carries the electronic bill inquiry request of electronic bill inquiry code, comprising: receives terminal and receives in query page The electronic bill inquiry request triggered after electronic bill inquiry code;Wherein, query page is provided by electronic bill management server; Electronic bill inquiry request is triggered after query page login by terminal by user identifier;User identifier is by electronic bill management Server is distributed.
Wherein, query page is the page for inquiring electronic bill.Query page specifically can be web (World Wide Web, WWW) page, application program the page or run on the page of subapplication in female application program etc..
Specifically, electronic bill management server can identify for each user's distributing user.User can be by by electronics in this way The user identifier of bill management server distribution is logged in query page, and electronic bill inquiry code can be inputted after login, then Electronic bill inquiry request is triggered by default trigger action.Default trigger action is such as clicked, presses or touch etc..Terminal after And Client-initiated electronic bill inquiry request is forwarded to electronic bill management server, electronic bill management server to Get electronic bill inquiry request that is corresponding with user identifier and carrying electronic bill inquiry code.It is appreciated that use here Family mark can be used for one user of unique identification, can be used for unique identification one kind user.Here terminal can be category In the computer equipment of individual subscriber, it is also possible to the meter that can be used for carrying out electronic bill inquiry of electronic bill manager offer Calculate machine equipment.
For example, Fig. 3 shows the schematic diagram of query page in one embodiment.With reference to Fig. 3, terminal is passing through user After mark logs in the client that electronic bill management server provides or webpage, it can show query page as shown in Figure 3, obtain Take the electronic bill inquiry request triggered in the inquiry.It is appreciated that page schematic diagram shown in Fig. 3 is only used for illustrating Bright, specifically used page figure may include than more or fewer contents shown in Fig. 3 in actual scene.
In the present embodiment, query page is logged in by the user identifier that electronic bill management server is distributed, just may be used Electronic bill inquiry request is triggered, to inquire the billing information of electronic bill.In this way, electronic bill management server can be passed through Search access right is managed, the data safety of electronic bill had not only been ensured, but also realize the inquiry property of electronic bill, to improve The utilization rate of electronic bill related data.
In one embodiment, electronic bill management server also can be only certain customers' distributing user mark.Do not divided User with user identifier is then not necessarily to log in and enter query page with visitor's identity, and input electronic ticket in query page it is investigated that Electronic bill inquiry request is triggered after asking code.When user carries out electronic bill inquiry with visitor's identity, electronic bill management clothes Being engaged in device can be using guest identification as user identifier.For example, only administration and law enforcement part distributing user identifies.It is assigned The user of user identifier search access right with higher, for example electronic bill detail can be inquired etc..Unassigned user identifier And when being inquired with guest identification, it can only inquire the basic information of electronic bill, such as the electronic bill true and false or electronic ticket According to the side of making out an invoice etc..
In a specific embodiment, electronic bill specifically can be block chain electronic invoice.Electronic bill inquiry code The combination that specifically can be invoice codes or invoice codes and invoice number or block chain electronic invoice are in circulation process The middle two dimensional code etc. generated according to billing information.
S204 determines search access right corresponding with user identifier.
Wherein, search access right is the permission of specified query context.Search access right may include inquiring the bill letter of electronic bill The permission of the true and false of the permission and inquiry electronic bill of breath.The permission for inquiring the billing information of electronic bill may include inquiry electricity The permission of the billing information in each circulation stage of sub- bill during electronic bill circulates, and inquire the specified circulation stage The permission of the billing information of electronic bill.Here the specified circulation stage can be one or more.The specified circulation rank of inquiry The permission of the billing information of the electronic bill of section, such as given query are made out an invoice the permission of the billing information in stage, or specified are looked into Ask the permission etc. of the billing information in the stage of making out an invoice relevant to the side of making out an invoice and the stage of declaring dutiable goods.
Specifically, the corresponding relationship of user identifier and search access right can be stored in advance in electronic bill management server.This Sample, electronic bill management server obtain corresponding with the electronic bill inquiry request after receiving electronic bill inquiry request User identifier determine the use for initiating electronic bill inquiry request then according to the corresponding relationship of user identifier and search access right The corresponding search access right of family mark.
In one embodiment, electronic bill management server can correspondingly mark the user when distributing user identifies Know and is associated with information such as fixed network address or terminal iidentifications.Wherein, network address such as IP (Internet Protocol, the agreement interconnected between network), terminal iidentification such as MAC (Media Access Control, media interviews control System) address or IMEI (International Mobile Equipment Identity, International Mobile Equipment Identity code) Deng.Electronic bill management server is after obtaining user identifier corresponding with the electronic bill inquiry request, it may be verified that itself and electricity Network address entrained by sub- bill inquiry request or terminal iidentification whether there is incidence relation.It then further determines that if it exists The corresponding search access right of user identifier then refuses to respond electronic bill inquiry request if it does not exist or further verifies identity. It is appreciated that being the preferential progress common network address or common after receiving electronic bill inquiry request in the present embodiment The verifying of terminal avoids stealing electronic bill relevant information in the illegal user from malicious for falsely using user identifier login.
In a further embodiment, the process of the also settable authentication of electronic bill management server, further to protect Hinder the data safety of electronic bill.Authentication such as key authentication or biological characteristic validation etc..
S206, the block chain node transmission into block chain network match with search access right and carry electronic bill inquiry The inquiry instruction of code.
Wherein, block chain node is a data processing node in block chain network.Block chain network is operation block The carrier and organizational form of chain technology.Block chain technology, abbreviation BT (Blockchain technology), is also referred to as distributed Formula account book technology is a kind of internet database technology, its main feature is that it is decentralization, open and clear, allow everyone each may participate in Data record.Block chain technology is that calculation of knowing together with storing data, using distributed node is verified using block linked data structure Method guarantees the safety of data transmission and access to generate, using by automatized script with more new data, in the way of cryptography The intelligent contract of code composition programs the completely new distributed basis framework and calculation of one kind with operation data.
Block chain node in block chain network, it is possible to provide carry out connecing for data communication with electronic bill management server Mouthful, such as exploitation SDK (Software Development Kit, Software Development Kit) and API (Application Programming Interface, application programming) interface.Electronic bill management server, which passes through, calls corresponding interface, Data communication is carried out with block chain link point.Electronic bill management server sends the block chain node of inquiry instruction, specifically can be with It is the corresponding block chain node of electronic bill management server.
It should be noted that when each circulation stage of electronic bill during by electronic bill circulation, electronic ticket According to the corresponding block chain node of management server, data field can be written into the current billing information of electronic bill after completing common recognition In block.Block chain node corresponding to the authorization role (side of making out an invoice or report ticket side etc.) in corresponding circulation stage is participated in, it also can be The current billing information of electronic bill is written in data block after completing common recognition.That is, electronic bill management server The electronic bill related data of full dose can be stored on corresponding block chain node.Block chain node corresponding to each authorization role The electronic bill related data in participated in circulation stage can then be stored.
Optionally, computer equipment corresponding to the authorization role in circulation stage is participated in, can also be used as block chain network In a node.The upload data of computer equipment corresponding to the authorization role in participation circulation stage, can to block chain node Data are uploaded in any one node into block chain to refer to.Participate in computer corresponding to the authorization role in circulation stage Equipment reads data from block chain network, can be and obtains data from any one node in block chain network.It participates in Computer equipment corresponding to the authorization role in circulation stage, such as electronic bill management server, make out an invoice method, apparatus or report ticket Method, apparatus etc..
Wherein, data block is to be used to the memory module of storing data in block chain network.Common recognition is in block chain network For guaranteeing that the believable process of data is written.Algorithm of commonly knowing together in block chain network has POW (Proof of Work, work Amount prove), POS (Proof of Stake, equity prove), DPOS (Delegated Proof of Stake, appoint equity card It is bright) and PBFT (Practical Byzantine Fault Tolerance, practical Byzantine failure tolerance algorithm) etc..
Common recognition algorithm used by a specific embodiment is specifically to be based on consistency algorithm (such as: Raft) and visit Account for the common recognition algorithm (Bft-Raft) of front yard tolerant fail algorithm (such as: Bft).It can also be used in certain the other embodiment of the present invention He knows together algorithm, and this is not restricted for the embodiment of the present invention.
For example, Fig. 4 shows the schematic illustration for algorithm of knowing together in one embodiment.With reference to Fig. 4, client (Client specifically can be block chain electronic invoice application platform as shown in Figure 7) initiates common recognition request (Request), And common recognition request is sent to the block chain node (host node Leader A) in leader's state.Wherein, in leader's state Block chain node elected and obtain jointly by each block chain node in block chain network.Append Entity is gone successively to (to add Add entity) stage, common recognition request corresponding common recognition content (or is obtained after handling common recognition content by Leader A Intermediate data) broadcast into block chain network other be not in leader's state block chain node (follow node Follower B, Follower C,Follower D…);Append Response (additional response) stage is gone successively to, it will by respectively following node The common recognition content received is broadcasted to other each block chain nodes, and in other block chain links for receiving preset quantity (2f+1) When the broadcasted common recognition content of point is consistent, into Commit (confirmation) stage, respectively follows node again and will confirm that result feeds back to master Node.Host node then determines to complete altogether when other block chain node feedback acknowledgments for receiving preset quantity (2f+1) pass through Know the result completed to Client feedback (Reply) common recognition.Wherein, 3f+1≤N, N are block chain nodes in block chain network Quantity.F is the quantity of block chain node of doing evil in block chain network.
It is illustrated below with reference to this case specific embodiment, each circulation rank during electronic bill circulation Billing information is uploaded to block chain node by the source side of section, billing information, that is, is intended to billing information block chain is written Data block in network, then needing the billing information event for as needing to reach common understanding is written.When coming for billing information When block chain node corresponding to the side of source is the block chain node in leader's state, then it will need to reach altogether by the block chain node The event of knowledge broadcasts other block chain nodes into block chain network.
These are not in the block chain node of leader's state after receiving the event for needing to reach common understanding, then will receive The event reached common understanding of needs broadcast other block chain nodes into block chain network.In this way, every in block chain network A block chain node just enters confirmation rank when the data that other block chain nodes for receiving preset quantity are broadcasted are consistent again Section, to prevent the fraud of the block chain node in leader's state.These are not in the block chain node of leader's state again It will confirm that result feeds back to the block chain node in leader's state, the block chain node in leader's state after the completion of confirmation When other block chain node feedback acknowledgments for receiving preset quantity pass through, then determine to complete the event that needs are reached common understanding Can then data block be written in data corresponding to the event reached common understanding by common recognition, hereafter, block chain node.
When the block chain node corresponding to the source side of billing information is not in the block chain node of leader's state, then will The event forwarding for needing to reach common understanding is to the block chain node for being in leader's state, then by the block chain node in leader's state As preceding step dominates common recognition process.Wherein, the block chain node in leader's state is by each block chain in block chain network Node is elected jointly and is obtained.
Wherein, the source side of billing information is different in each circulation stage during electronic bill circulates, for example, In the stage of making out an invoice, the source side of billing information is enterprise of making out an invoice;In the reimbursement stage, the source side of billing information be consumer ( It can be used to consumer and the electronic bill public servicer of electronic bill storage service is provided);In the stage of declaring dutiable goods, when making out an invoice When enterprise declares dutiable goods, the source side of billing information is enterprise of making out an invoice, when reimbursement enterprise declares dutiable goods, the source Fang Zewei report of billing information Sell enterprise.
In one embodiment, the stage of making out an invoice be make out an invoice root according to billing information generate electronic bill stage.Work as electronics After bill lives through the stage of making out an invoice, the side's of making out an invoice block chain node and the corresponding block chain node of electronic bill management server can be incited somebody to action Indicate that electronic bill is added in billing information in the bill status information for state of having issued data block is written.Submit an expense account rank Section is the stage that consumer checks and writes off according to electronic bill to the application of report ticket side.It, can be according to electricity after reporting ticket side's verification electronic bill Resource transfers share in sub- bill shifts corresponding resource to consumer.After electronic bill lives through the reimbursement stage, ticket is reported Square block chain node and the corresponding block chain node of electronic bill management server can will indicate that electronic bill is in and submit an expense account shape The bill status information of state is added in billing information so that data block is written.The stage of declaring dutiable goods is the side of making out an invoice or report ticket root evidence The stage that electronic bill is accordingly declared dutiable goods.After the side of making out an invoice or report ticket side complete to pay taxes, the side's of making out an invoice block chain node, report ticket Square block chain node and the corresponding block chain node of electronic bill management server can will indicate that electronic bill is in shape of having declared dutiable goods The bill status information of state is added in billing information so that data block is written.
Wherein, billing information is the information for generating electronic bill, including the side's of making out an invoice mark, electronic bill are identified, connect Debit's mark, resource transfers share and bill status information etc..Wherein, electronic bill mark opens electronic ticket for unique identification one According to can specifically include the voucher code and note number of electronic bill.The side's of making out an invoice mark is the side institute for issuing electronic bill Corresponding mark, for the unique identification side of making out an invoice.The side of making out an invoice specifically can be sale enterprise, and the side of making out an invoice is in sales to consumers quotient When product, offer service or be engaged in other business activities, consumption certificate, that is, electronic bill need to be provided for consumer.It makes out an invoice Side's mark specifically can be the account of opening an account etc. of seller title, the Taxpayer Identification Number of seller or seller.Recipient's mark Know and is used for unique identification electronic bill recipient.Recipient specifically can be consumption individual or consumption enterprise.When consumption is personal or Enterprise is consumed after sale enterprise is consumed, sale enterprise can provide consumption certificate for consumption individual or consumption enterprise, also It is electronic bill.Recipient's mark specifically can be opening an account for purchaser's title, the Taxpayer Identification Number of purchaser or purchaser Account etc..Resource transfers share is the specific resource share of consumer spending.The bill of the billing information in different circulation stages Status information is different.
Specifically, due to being stored with the electronic bill phase of full dose on the corresponding block chain node of electronic bill management server Data are closed, is matched with search access right then electronic bill management server can be sent to the block chain node and carries electronic ticket According to the inquiry instruction of inquiry code, inquired by block chain node.
Certainly, in a further embodiment, inquiry instruction can also be transmitted to block link network by electronic bill management server Other block chain nodes in network, allow other block chain nodes to be inquired.Especially in the biggish situation of queries, It can disperse the inquiry pressure of each block chain node, improve search efficiency.
S208 receives the query result that block chain link point returns;Query result is by block chain node according to inquiry instruction Entrained electronic bill inquiry code obtains after carrying out electronic bill inquiry.
Specifically, the inquiry for matching with search access right and carrying electronic bill inquiry code that block chain node receives refers to Order specifies inquiry content.Block chain node can inquire inquiry content specified by the inquiry instruction according to the inquiry instruction, And query result is generated according to data are inquired.Further, block chain node can will be looked into after inquiry obtains query result It askes result and is back to electronic bill management server.
For example, search access right is to inquire the billing information in each circulation stage of electronic bill during electronic bill circulation Permission then inquiry content specified by the inquiry instruction of electronic bill inquiry code is matched and carried with search access right be to look into The billing information in each circulation stage of the electronic bill that inquiry electronic bill inquiry code is identified during electronic bill circulation, is looked into The billing information ask is query result.
For another example, search access right is to inquire the permission of the electronic bill true and false, then matching with search access right and carrying electronics Inquiry content specified by the inquiry instruction of bill inquiry code is the ticket for inquiring the electronic bill that electronic bill inquiry code is identified It is believed that breath whether there is, the result with the presence or absence of billing information inquired is query result.
In one embodiment, block chain node is by the billing information and phase in current circulation stage after reaching common understanding The electronic bill inquiry code association write-in data block answered.So block chain node can be directly according to electronic bill inquiry code Inquire billing information associated with it.Certainly, it is also to be associated with that respectively the billing information with corresponding electronic bill in circulation stage, which identify, 's.When by electronic bill mark as electronic bill inquiry code, also it is convenient to inquire billing information associated with it.
S210 is fed back in response to electronic bill inquiry request according to query result.
Specifically, query result received by electronic bill management server can be the result that can directly feed back.This When, electronic bill management server can correspond directly to electronic bill inquiry request, feed back the inquiry knot from block chain node Fruit.Query result received by electronic bill management server is also possible to the result for needing to be fed back after secondary operation. At this point, electronic bill management server can carry out secondary operation to the query result from block chain node, in response to electronic ticket Data after feeding back secondary operation according to inquiry request.
Wherein, the query result that can directly feed back such as inquires the query result of the electronic bill true and false.Secondary operation is specific It can be the decryption processing to encrypted data, be also possible to processing of the integration to the billing information of batch electronic bill etc..
Above-mentioned electronic bill querying method is getting electricity that is corresponding with user identifier and carrying electronic bill inquiry code After sub- bill inquiry request, and determine search access right corresponding with the user identifier, and then the block into block chain network Chain node sends the inquiry instruction that the electronic bill inquiry code is matched and carried with the search access right, and according to block chain node The query result of return is fed back for electronic bill inquiry request, in this way, having neither part nor lot in the use of electronic bill circulation process Family also can be carried out electronic bill inquiry, greatly improve the utilization rate of electronic bill related data;And pass through search access right Query result is controlled, the peace of electronic bill related data has been ensured while improving the utilization rate of electronic bill related data Quan Xing.
In one embodiment, S206 includes: when determining search access right is detail search access right, to block chain network In block chain node send carry electronic bill inquiry code detail inquiry instruction.Receive the inquiry knot that block chain link point returns Fruit, comprising: receive block chain link point in the electronic bill inquiry code according to entrained by detail inquiry instruction and inquire billing information Afterwards, the billing information returned as query result.
Wherein, detail search access right is the permission of the billing information of user query electronic bill.Here the bill letter inquired Breath can be whole billing informations, be also possible to part billing information.Different Permission Levels may be present in detail search access right. The higher grade of detail search access right, and the billing information that can be inquired is more.Electronic bill management server can be according to user identity Distribute the detail search access right of corresponding authority grade.
In one embodiment, detail search access right may include one of inquiry electronic bill during electronic bill circulation The permission of the billing information in a or multiple circulation stages, and inquiry billing information middle finger determine the permission etc. of data field.Inquiry Billing information middle finger determines the permission of data field, for example, inquiring the permission of resource transfers share field in billing information.
Specifically, detail inquiry instruction specifies inquiry content, refers in this way, block chain node can be inquired according to the detail Inquiry billing information corresponding with specified inquiry content is enabled, using the billing information inquired as query result, then will inquiry As a result electronic bill management server is fed back to.
In one embodiment, electronic bill mark is subjected to the inquiry of electronic bill detail as electronic bill inquiry code When, electronic bill can be inquired in the billing information in each circulation stage undergone.
In one embodiment, electronic bill is carried out using the data generated according to billing information as electronic bill inquiry code When detail is inquired, the billing information in electronic bill circulation stage experienced when electronic bill inquiry code generates can be inquired, The billing information in each circulation stage before the electronic bill circulation stage experienced can be inquired.
It, just can be after inquiring billing information only when search access right is detail search access right in above-described embodiment, it will Billing information is returned as query result, under the premise of ensureing the data safety of electronic bill, the detail of open electronic bill Inquiry property, to improve the utilization rate of electronic bill related data.
In one embodiment, the billing information returned as query result is encrypted data.S210 include: inquiry with The corresponding bill key of billing information;It is decrypted to obtain the billing information of plaintext according to bill key pair billing information;Response In the billing information of electronic bill inquiry request feedback plaintext.
It should be noted that block chain node can carry out billing information when billing information to be written before data block Data block is written in encrypted bill ciphertext by encryption, to ensure data safety by ciphertext storing data.Wherein, it encrypts Algorithm can be symmetric encipherment algorithm or rivest, shamir, adelman etc..Symmetric encipherment algorithm such as DES (Data Encryption Standard, symmetry algorithm), AES (Advanced Encryption Standard, Advanced Encryption Standard) or IDEA (International Data Encryption Algorithm, international data encryption algorithm) etc..Rivest, shamir, adelman ratio Such as RSA (Rivest, Shamir, Adleman, Encryption Algorithm), DSA (Digital Signature Algorithm, number label Name algorithm) or ECC (Elliptic curve cryptography, elliptic curve encryption algorithm) etc..
In this way, the billing information returned as query result that electronic bill management server receives is to have encrypted number According to.Electronic bill management server can locally search bill key corresponding with billing information, close according to the bill found Key is decrypted billing information to obtain the billing information of plaintext, then the bill in response to electronic bill inquiry request feedback plaintext Information.
Block chain node when the billing information inquired is fed back to electronic bill management server as query result, Bill key can be cooperateed with and be returned.In this way, the bill key pair bill that electronic bill management server can be returned according to collaboration is believed Breath is decrypted to obtain the billing information of plaintext, then the billing information in response to electronic bill inquiry request feedback plaintext.For example, Electronic bill management server can decrypt the billing information for showing plaintext after ciphertext in query page.
Wherein, the corresponding bill key of the billing information of different electronic bills is different.The bill that block chain node returns Key is encrypted bill key, and the key that bill key specifically can be the authorization role to be circulated by participation electronic bill adds Close.Key due to participating in the authorization role of electronic bill circulation has the distribution of electronic bill management server, then electricity Also there is the key of these authorization roles on sub- bill management server, i.e., after can decrypting encryption with the key of these authorization roles Bill key, obtain the bill key of plaintext to decrypt to the billing information that has encrypted.
In above-described embodiment, the billing information recorded in block chain network is all that ensure that number by encrypted ciphertext According to safety, in response to electronic bill inquiry request feedback be plaintext billing information, provide the intuitive of query result and read The property read.
In one embodiment, electronic bill querying method further include: obtain corresponding with user identifier and carry electronics The bill cipher key acquisition request of bill inquiry code;User identifier is being carried out after authentication passes through, feedback with electronic ticket it is investigated that Ask the corresponding bill key of code;The bill key of feedback is for decrypting through inquiry block of the user identifier in block chain network The billing information corresponding with electronic bill inquiry code obtained in chain node.
Specifically, terminal can be to electronic bill management server queries electronic bill, electronic bill management server queries What is fed back is the billing information of ciphertext, and terminal is then using the bill key pair electronic ticket obtained from electronic bill management server According to being decrypted to obtain the billing information of plaintext.
It may also set up the block chain node for being exclusively used in inquiry in block chain network.User can be by terminal not via electronic ticket Electronic bill inquiry is initiated to the block chain node for being exclusively used in inquiry according to management server.But due to remembering in block chain network The billing information of record is all by encrypted ciphertext.User needs the authorization by electronic bill management server, obtains ticket It is believed that ceasing corresponding bill key, the encryption information inquired from the block chain node for being exclusively used in inquiry could be decrypted, be obtained Clear data.
In one embodiment, electronic bill by electronic bill circulation during each circulation stage when, it is dedicated In the block chain node of inquiry, in billing information write-in data block that can be current by electronic bill after completing common recognition.In this way It is exclusively used in that the electronic bill related data of full dose can be stored on the block chain node of inquiry, terminal then can be from being exclusively used in inquiry Billing information is inquired in block chain node.
For example, Fig. 5, which is shown in one embodiment, carries out electronic bill by being exclusively used in the block chain link point of inquiry The timing diagram of inquiry.The computer equipment that the present embodiment is related to includes terminal, electronic bill management server and is exclusively used in inquiring Block chain node.On the one hand, terminal can obtain the electronic bill inquiry code of input, to electricity after logging in by user identifier Sub- bill management server initiates bill cipher key acquisition request.Electronic bill management server get it is corresponding with user identifier, And after carrying the bill cipher key acquisition request of electronic bill inquiry code, authentication is carried out to user identifier and is passed through.It is tested in identity After card passes through, electronic bill management server feeds back bill key corresponding with electronic bill inquiry code to terminal.On the other hand, Terminal can be initiated to carry the electronic bill inquiry request of electronic bill inquiry code to the block chain node for being exclusively used in inquiry, be exclusively used in The block chain node of inquiry electronic bill inquiry code according to entrained by electronic bill inquiry request inquires billing information, will inquire To billing information feed back to terminal.Here the billing information returned is encrypted ciphertext, and terminal then can be used from electronic ticket It is decrypted to obtain the billing information of plaintext according to the bill key pair electronic bill obtained at management server.
In one embodiment, the settable block chain node for being exclusively used in inquiry in block chain network, is for obvious The user setting of search access right.For example for administration or enforce the law what part was set up.
In above-described embodiment, it is exclusively used in the block chain node of inquiry by being arranged, electronic bill management service can be alleviated The inquiry pressure of block chain node corresponding to device and electronic bill management server.
In one embodiment, S206 includes: when determining search access right is true and false search access right, to block chain network In block chain node send carry electronic bill inquiry code existence inquiry instruction.Receive the inquiry that block chain link point returns As a result, comprising: reception area block chain node return, indicate whether exist with electronic ticket entrained by existence inquiry instruction it is investigated that Ask the query result of the corresponding billing information of code.
Wherein, true and false search access right is the permission of the true and false of user query electronic bill.Existence inquiry instruction is inquiry The instruction that billing information whether there is.In the present embodiment, when assert billing information corresponding there are electronic bill inquiry code, table Show that electronic bill inquiry code is true electronic bill inquiry code;Assert and the corresponding billing information of electronic bill inquiry code is not present When, indicate that electronic bill inquiry code is false electronic bill inquiry code.
Specifically, when the search access right that electronic bill management server determines is true and false search access right, to block chain network In block chain node send carry electronic bill inquiry code existence inquiry instruction.Block chain node is then looked into according to existence It askes instruction and carries out the inquiry of billing information existence, that is, inquiry is believed with the presence or absence of bill corresponding with electronic bill inquiry code Breath, and the inquiry knot that whether there is billing information corresponding with electronic bill inquiry code is returned to electronic bill management server Fruit.
In one embodiment, S210 includes: the query result when block chain node feeding back, indicates presence and electronic bill When the corresponding billing information of inquiry code, feedback electronic bill inquiry code is the query result of true electronic bill inquiry code;Work as area The query result of block chain node feeding back, when indicating that billing information corresponding with electronic bill inquiry code is not present, feedback electronic ticket It is the query result of false electronic bill inquiry code according to inquiry code.
Specifically, electronic bill inquiry code is true electronic bill inquiry code, that is, illustrates that the electronic bill of inquiry is true Electronic bill;Electronic bill inquiry code is false electronic bill inquiry code, that is, illustrates that the electronic bill of inquiry is false electricity Sub- bill.
In above-described embodiment, search access right be the true and false search access right when, just need to only inquire with the presence or absence of electronic ticket it is investigated that The corresponding billing information of code is ask, surrender of bills information is not necessarily to, it is open under the premise of ensureing the data safety of electronic bill The true and false inquiry property of electronic bill, to improve the utilization rate of electronic bill related data.
In one embodiment, the electronic bill querying method further include: generate include user identifier and electronic ticket it is investigated that The bill for asking code inquires record;Bill inquiry record is for inquiring the historical query behavior for electronic bill;Bill is inquired Record is uploaded to block chain node;The bill inquiry record of upload is used to indicate block chain node, passes bill is inquired record Other block chain nodes for being handed in block chain network and after completing common recognition, inquire record write-in data block for bill.
Specifically, after electronic bill management server receives electronic bill inquiry request, can extract electronic ticket it is investigated that The user identifier and electronic bill inquiry code carried in request is ask, then according to the user identifier of extraction and electronic bill inquiry code Association generates bill inquiry record.
In one embodiment, block chain node is when receiving electronic bill inquiry request, also recordable current time, The information such as network address entrained by electronic bill inquiry request or terminal iidentification.By the current time, network address and The information such as terminal iidentification are recorded jointly with user identifier and electronic bill inquiry code into bill inquiry record.
Further, the bill of generation can be inquired and be remembered after generating bill inquiry record by electronic bill management server Record is uploaded to block chain node corresponding with electronic bill management server.Block chain corresponding with electronic bill management server Other block chain nodes that bill inquiry record is transferred in block chain network by node again, to know together.Specifically know together Algorithm can refer to the common recognition algorithm in previous embodiment, and details are not described herein.After the completion of common recognition, electronic bill management server Bill can be inquired record and is written in data block by corresponding block chain node.The bill inquiry record that data block is written is used In historical query behavior of the inquiry for electronic bill.In this way, units concerned or department can pass through access block chain network Mode has access to bill inquiry record, to inquire the historical query behavior about electronic bill, and then can analyze the history of record User behavior.
In above-described embodiment, generates the bill including user account and electronic bill inquiry code and inquire record, bill is looked into Consultation record is written in block chain network, be can record the historical query behavior for electronic bill, is looked into convenient for subsequent analysis history Inquiry behavior.
In one embodiment, electronic bill querying method further include: according to entrained by electronic bill inquiry request Electronic bill inquiry code and search access right, from the block chain node in block chain network be synchronized in local billing information into Row inquiry;When inquiring billing information corresponding with electronic bill inquiry code, then in response to electronic bill inquiry request, according to The billing information inquired is fed back;When not inquiring billing information corresponding with electronic bill inquiry code, then execute to Block chain node in block chain network sends the step that the inquiry instruction of electronic bill inquiry code is matched and carried with search access right Suddenly.
Specifically, electronic bill management server, can from block chain node corresponding with electronic bill management server, The data that data block is written are synchronized to local.Wherein, carry out data synchronous opportunity can be according to default setting when Between period periodic synchronization;It is also possible to write data into data field in block chain node corresponding with electronic bill management server It is synchronized when block;It can also be and synchronized according to synchronic command.
It, can be preferentially from area in this way, electronic bill management server is after determining search access right corresponding to user identifier Block chain node in block chain network, which is synchronized in local billing information, to be inquired, to improve inquiry response efficiency.And When inquiring billing information corresponding with electronic bill inquiry code, in response to electronic bill inquiry request, according to the ticket inquired It is believed that breath is fed back.Such as search access right be detail search access right when, then inquire the search access right model of the detail search access right Interior billing information is enclosed, the billing information inquired is fed back into terminal.Such as search access right be the true and false search access right when, then look into It askes and whether there is billing information corresponding with electronic bill inquiry code, there is billing information corresponding with electronic bill inquiry code It is the true query result of feedback electronic bill, is not finding billing information corresponding with electronic bill inquiry code locally When, block chain link point need to be continued through and inquired, fed back according to the query result of block chain node.It in this way can be to avoid Not in time from inquiry error caused by block chain node synchrodata.
Electronic bill management server not when local search is to billing information corresponding with electronic bill inquiry code, then to Block chain node in block chain network sends the inquiry instruction that electronic bill inquiry code is matched and carried with search access right, leads to Block chain link point is crossed to be inquired.Carrying out inquiry by block chain link point can refer in previous embodiment, and details are not described herein.
Fig. 6 shows the timing diagram that electronic bill is inquired in one embodiment.With reference to Fig. 6, meter involved in the present embodiment Calculating machine equipment includes terminal, electronic bill management server and block chain node corresponding with electronic bill management server. Terminal can inquired by query page to the electronic bill that electronic bill management server initiates to carry electronic bill inquiry code Request, electronic bill management server user identifier according to corresponding to electronic bill inquiry request determine search access right, and root According to electronic bill inquiry code entrained by the search access right and electronic bill inquiry request, from electronic bill management server Corresponding block chain node, which is synchronized in local billing information, to be inquired.
When electronic bill management server queries are to billing information corresponding with electronic bill inquiry code, then in response to electricity Sub- bill inquiry request is fed back according to the billing information inquired to terminal.When electronic bill management server do not inquire with When the corresponding billing information of electronic bill inquiry code, then to block chain node corresponding with electronic bill management server send with Search access right matching and the inquiry instruction for carrying electronic bill inquiry code.Block chain corresponding with electronic bill management server Node, the electronic bill inquiry code according to entrained by inquiry instruction carry out electronic bill and inquire to obtain query result, inquiry is tied Fruit is back to electronic bill management server, and electronic bill management server is again in response to electronic bill inquiry request, according to looking into Result is ask to feed back to terminal.
Wherein, electronic bill management server can be sent into block chain node corresponding with electronic bill management server Data synchronization request, the corresponding block chain node of electronic bill management server feed back write-in data in response to data synchronization request The billing information of block.
In the present embodiment, it is preferentially inquired from local, improves inquiry response efficiency;And it is not inquired locally When transfer to block chain querying node, to ensure going on smoothly for inquiry as far as possible, inquire result corresponding with search access right.
Fig. 7 is the deployment diagram in a specific embodiment about the data processing system of electronic bill.In specific area In block chain electronic invoice application scenarios, with reference to Fig. 7, alliance's chain is formed including at least 4 block chain nodes in block chain network, Block chain node respectively corresponding with tax office server, it is block chain node corresponding with enterprise of making out an invoice, public with electronic bill The corresponding block chain node of server and block chain node corresponding with reimbursement enterprise.Under normal conditions, the equipment of each role It is interacted with corresponding block chain link point.Wherein, electronic bill public servicer is used to save the area issued for consumer Block chain electronic invoice, electronic bill utility implement body can be wechat server etc..
On the one hand tax office server passes through reverse proxy service and is provided out access interface (connects the inside of tax office terminal Mouthful, and to the external interface of enterprise customer) access for the equipment of each role, the identity key of each role of trustship, management The characteristic of each role.On the other hand by synchronization means in real time from the block chain network module in corresponding block chain node In be synchronously written the data of block chain network (or having known together to be written), with the block chain electronic invoice related data to each role It is inquired and is counted.
On the one hand pass through reverse proxy service is provided out access interface to each block chain node in block chain network, for phase The equipment answered accesses and (e.g., submits an expense account corresponding block chain node of equipment access reimbursement enterprise of enterprise etc.).On the other hand logical It crosses the corresponding equipment of block chain electronic invoice application platform reception and (e.g., submits an expense account enterprise by the data that reverse proxy service is sent Equipment uploads data to the corresponding block chain node of reimbursement enterprise, i.e., is transmitted data by the interface that reverse proxy service provides To block chain electronic invoice application platform etc.).Block chain electronic invoice application platform passes data to block chain network mould again Block.The block chain network module of each block chain node collectively forms common recognition network, after reaching common understanding in common recognition network, then will Block chain network module is written in data.It further include cache database in block chain node, for caching various data, such as from system Enterprise's public key etc. that central server obtains.
The deployment diagram can further include block chain network modular system central server, save the enterprise's mark and public affairs of each enterprise The mapping of key is isolated with tax office server, be mainly used for carrying out identification authentication (e.g., limitation only has tax office that could issue invoice, Change constraint condition relevant to enterprise).The subsequent operation for needing centralization is uniformly put into this system centre server It executes.
Wherein, reverse proxy service specifically can be nginx.Block chain electronic invoice application platform realizes block chain electricity The main business logic of sub- invoice, and externally exposure exploitation sdk and api interface, are connect for third party by reverse proxy service Enter to interact.Block chain network module can specifically be realized based on Tencent's bottom block chain technology (trustSQL).Buffer zone Mysql database realizing can specifically be passed through.It is appreciated that the present embodiment is used for for example, not to employed in specific implementation Implementation be defined.
In specific application scenarios, electronic bill specifically can be block chain electronic invoice, electronic bill management service Implement body can be tax office server, and it is corresponding that method, apparatus of making out an invoice specifically can be the electronic bill side of making out an invoice (electronic bill report ticket side) Terminal or server, electronic bill utility implement body can be for provide be derived from block chain node electronic ticket According to common storage service, for example, wechat server.It is opened it is appreciated that enterprise of making out an invoice both can be used as the electronic bill side of making out an invoice Have electronic bill, and can be used as electronic bill report ticket side reimbursement electronic bill.
User identifier that user's toll score of the game is matched or with visitor's identity logs query page after, can be defeated in query page Enter block chain electronic invoice inquiry code, to initiate block chain electronic invoice inquiry request to tax office server.Tax office server exists After receiving block chain electronic invoice inquiry request, determined according to user identifier corresponding to block chain electronic invoice inquiry request Search access right, and the block chain electronic invoice according to entrained by the search access right and block chain electronic invoice inquiry request is inquired Code, is inquired being synchronized in local billing information from block chain node corresponding with tax office server.
When tax office server inquires billing information corresponding with block chain electronic invoice inquiry code, then in response to block Chain electronic invoice inquiry request is fed back according to the billing information inquired to terminal.When tax office server does not inquire and block When the corresponding billing information of chain electronic invoice inquiry code, then sends to block chain node corresponding with tax office server and weigh with inquiring Limit matching and the inquiry instruction for carrying block chain electronic invoice inquiry code.Block chain node corresponding with tax office server, according to Block chain electronic invoice inquiry code entrained by inquiry instruction carries out block chain electronic invoice and inquires and obtain query result, will look into It askes result and is back to tax office server, tax office server is again in response to block chain electronic invoice inquiry request, according to query result It is fed back to terminal.
It should be understood that although each step in the flow chart of the various embodiments described above is successively shown according to the instruction of arrow Show, but these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, this There is no stringent sequences to limit for the execution of a little steps, these steps can execute in other order.Moreover, above-mentioned each implementation At least part step in example may include that perhaps these sub-steps of multiple stages or stage be not necessarily for multiple sub-steps It is to execute completion in synchronization, but can execute at different times, the execution sequence in these sub-steps or stage It is not necessarily and successively carries out, but can be at least part wheel of the sub-step or stage of other steps or other steps Stream alternately executes.
As shown in figure 8, in one embodiment, providing a kind of electronic bill inquiry unit 800.Referring to Fig. 8, the electronics Bill inquiry unit 800 includes: to obtain module 801, determining module 802, sending module 803, receiving module 804 and feedback module 805。
Module 801 is obtained, for obtaining electronic bill inquiry that is corresponding with user identifier and carrying electronic bill inquiry code Request.
Determining module 802, for determining search access right corresponding with user identifier.
Sending module 803 matches with search access right for the block chain node transmission into block chain network and carries electricity The inquiry instruction of sub- bill inquiry code.
Receiving module 804, for receiving the query result of block chain link point return;Query result is by block chain node in root It is obtained after carrying out electronic bill inquiry according to electronic bill inquiry code entrained by inquiry instruction.
Feedback module 805, for being fed back according to query result in response to electronic bill inquiry request.
In one embodiment, which is located in electronic bill management server.Obtain module 801 It is also used to receive terminal and receives the electronic bill inquiry request triggered after electronic bill inquiry code in query page;Wherein, it looks into The page is ask to be provided by electronic bill management server;Electronic bill inquiry request is stepped on by user identifier in query page by terminal It is triggered after record;User identifier is distributed by electronic bill management server.
In one embodiment, sending module 803 is also used to when determining search access right is detail search access right, to area Block chain node in block chain network sends the detail inquiry instruction for carrying electronic bill inquiry code.Receiving module 804 is also used to Block chain link point is received after the electronic bill inquiry code according to entrained by detail inquiry instruction inquires billing information, as looking into Ask the billing information that result returns.
In one embodiment, the billing information returned as query result is encrypted data.Feedback module 805 is also used In inquiry bill key corresponding with billing information;It is decrypted to obtain the bill letter of plaintext according to bill key pair billing information Breath;In response to the billing information of electronic bill inquiry request feedback plaintext.
In one embodiment, module 801 is obtained to be also used to obtain corresponding with user identifier and carry electronic bill inquiry The bill cipher key acquisition request of code.Feedback module 805 is also used to after carrying out authentication to user identifier and passing through, feedback and electricity The corresponding bill key of sub- bill inquiry code;The bill key of feedback is for decrypting through user identifier in block chain network The billing information corresponding with electronic bill inquiry code obtained in inquiry block chain link point.
In one embodiment, sending module 803 is also used to when determining search access right is true and false search access right, to area Block chain node in block chain network sends the existence inquiry instruction for carrying electronic bill inquiry code.Receiving module 804 is also used In receive block chain link point return, indicate whether exist it is corresponding with electronic bill inquiry code entrained by existence inquiry instruction Billing information query result.
In one embodiment, feedback module 805 is also used to the query result when block chain node feeding back, indicate to exist with When the corresponding billing information of electronic bill inquiry code, feedback electronic bill inquiry code is the inquiry knot of true electronic bill inquiry code Fruit;When the query result of block chain node feeding back, indicate to feed back there is no when billing information corresponding with electronic bill inquiry code Electronic bill inquiry code is the query result of false electronic bill inquiry code.
In one embodiment, electronic bill inquiry unit 800 further include: logging modle 806 includes user for generating The bill of mark and electronic bill inquiry code inquires record;Bill inquiry record is for inquiring the historical query for electronic bill Behavior;Bill inquiry record is uploaded to block chain node;The bill inquiry record of upload is used to indicate block chain node, is inciting somebody to action After bill inquiry records other block chain nodes being transferred in block chain network and completes common recognition, bill is inquired into record write-in Data block.
As shown in figure 9, in one embodiment, electronic bill inquiry unit 800 further include: logging modle 806 and inquiry Module 807.
Enquiry module 807, for electronic bill inquiry code and search access right according to entrained by electronic bill inquiry request, It is inquired being synchronized in local billing information from the block chain node in block chain network.
Feedback module 805 is also used to when inquiring billing information corresponding with electronic bill inquiry code, then in response to electricity Sub- bill inquiry request, is fed back according to the billing information inquired.
Sending module 803 is also used to when not inquiring billing information corresponding with electronic bill inquiry code, to block chain Block chain node in network sends the inquiry instruction that electronic bill inquiry code is matched and carried with search access right.
Figure 10 shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be figure Electronic bill management server 120 in 1.As shown in Figure 10, which includes the processing connected by system bus Device, memory and network interface.Wherein, memory includes non-volatile memory medium and built-in storage.The computer equipment Non-volatile memory medium is stored with operating system, can also be stored with computer program, which is executed by processor When, it may make processor to realize electronic bill querying method.Computer program can also be stored in the built-in storage, the computer When program is executed by processor, processor may make to execute electronic bill querying method.It will be understood by those skilled in the art that figure Structure shown in 10, only the block diagram of part-structure relevant to application scheme, is not constituted to application scheme institute The restriction for the computer equipment being applied thereon, specific computer equipment may include than more or fewer portions as shown in the figure Part perhaps combines certain components or with different component layouts.
In one embodiment, electronic bill inquiry unit provided by the present application can be implemented as a kind of computer program Form, computer program can be run in computer equipment as shown in Figure 10, the non-volatile memory medium of computer equipment The each program module for forming the electronic bill inquiry unit can be stored, for example, acquisition module 801 shown in Fig. 8, determining module 802, sending module 803, receiving module 804 and feedback module 805 etc..The computer program of each program module composition to locate Reason device executes the step in the electronic bill querying method of each embodiment of the application described in this specification.
For example, computer equipment shown in Fig. 10 can pass through obtaining in electronic bill inquiry unit 800 as shown in Figure 8 Modulus block 801 obtains electronic bill inquiry request that is corresponding with user identifier and carrying electronic bill inquiry code.By determining mould Block 802 determines search access right corresponding with user identifier.Pass through block chain node hair of the sending module 803 into block chain network Send the inquiry instruction that electronic bill inquiry code is matched and carried with search access right.Block chain link point is received by receiving module 804 The query result of return;Query result carries out electricity in the electronic bill inquiry code according to entrained by inquiry instruction as block chain node It is obtained after sub- bill inquiry.By feedback module 805 in response to electronic bill inquiry request, fed back according to query result.
In one embodiment, a kind of computer readable storage medium is provided, is deposited on the computer readable storage medium Computer program is contained, when which is executed by processor, so that processor executes following steps: obtaining and mark with user Know electronic bill inquiry request that is corresponding and carrying electronic bill inquiry code;Determine search access right corresponding with user identifier;To Block chain node in block chain network sends the inquiry instruction that electronic bill inquiry code is matched and carried with search access right;It connects Receive the query result that block chain node returns;Query result is as block chain node in the electronic bill according to entrained by inquiry instruction Inquiry code obtains after carrying out electronic bill inquiry;In response to electronic bill inquiry request, fed back according to query result.
In one embodiment, which is located in electronic bill management server.It obtains and uses Family mark is corresponding and carries the electronic bill inquiry request of electronic bill inquiry code, comprising: receives terminal and receives in query page The electronic bill inquiry request triggered after to electronic bill inquiry code;Wherein, query page is mentioned by electronic bill management server For;Electronic bill inquiry request is triggered after query page login by terminal by user identifier;User identifier is by electronic bill Management server is distributed.
In one embodiment, the block chain node transmission into block chain network matches with search access right and carries electricity The inquiry instruction of sub- bill inquiry code includes: when determining search access right is detail search access right, into block chain network Block chain node sends the detail inquiry instruction for carrying electronic bill inquiry code.The query result that block chain link point returns is received, It include: to receive block chain link point after the electronic bill inquiry code according to entrained by detail inquiry instruction inquires billing information, The billing information returned as query result.
In one embodiment, the billing information returned as query result is encrypted data.According to response in electronics Bill inquiry request, is fed back according to query result, comprising: inquiry bill key corresponding with billing information;According to bill Key pair billing information is decrypted to obtain the billing information of plaintext;In response to the bill of electronic bill inquiry request feedback plaintext Information.
In one embodiment, which also makes processor execute following steps: obtaining and user identifier pair Answer and carry the bill cipher key acquisition request of electronic bill inquiry code;After carrying out authentication to user identifier and passing through, feedback Bill key corresponding with electronic bill inquiry code;The bill key of feedback is for decrypting through user identifier in block chain network In inquiry block chain link point in the billing information corresponding with electronic bill inquiry code that obtains.
In one embodiment, the block chain node transmission into block chain network matches with search access right and carries electricity The inquiry instruction of sub- bill inquiry code includes: when determining search access right is true and false search access right, into block chain network Block chain node sends the existence inquiry instruction for carrying electronic bill inquiry code.Receive the inquiry knot that block chain link point returns Fruit, comprising: receive block chain link point return, indicate whether exist and electronic bill entrained by existence inquiry instruction inquire The query result of the corresponding billing information of code.
In one embodiment, it is fed back according to response in electronic bill inquiry request according to query result, comprising: When the query result of block chain node feeding back, when indicating to have billing information corresponding with electronic bill inquiry code, feedback electronic Bill inquiry code is the query result of true electronic bill inquiry code;When the query result of block chain node feeding back, expression is not deposited In billing information corresponding with electronic bill inquiry code, feedback electronic bill inquiry code is looking into for false electronic bill inquiry code Ask result.
In one embodiment, which also makes processor execute following steps: generating includes user identifier Record is inquired with the bill of electronic bill inquiry code;Bill inquiry record is for inquiring the historical query row for electronic bill For;Bill inquiry record is uploaded to block chain node;The bill inquiry record of upload is used to indicate block chain node, by ticket It is investigated that other block chain nodes that consultation record is transferred in block chain network and after completing common recognition, inquire record write-in number for bill According to block.
In one embodiment, which also makes processor execute following steps: being inquired according to electronic bill Request entrained electronic bill inquiry code and search access right, it is local being synchronized to from the block chain node in block chain network It is inquired in billing information;When inquiring billing information corresponding with electronic bill inquiry code, then in response to electronic bill Inquiry request is fed back according to the billing information inquired;Believe when not inquiring bill corresponding with electronic bill inquiry code When breath, then the block chain node transmission executed into block chain network matches with search access right and carries electronic bill inquiry code Inquiry instruction the step of.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, when computer program is executed by processor, so that processor executes following steps: obtaining and user identifier pair Answer and carry the electronic bill inquiry request of electronic bill inquiry code;Determine search access right corresponding with user identifier;To block Block chain node in chain network sends the inquiry instruction that electronic bill inquiry code is matched and carried with search access right;Reception area The query result that block chain node returns;Query result is inquired as block chain node in the electronic bill according to entrained by inquiry instruction Code obtains after carrying out electronic bill inquiry;In response to electronic bill inquiry request, fed back according to query result.
In one embodiment, which is located in electronic bill management server.It obtains and uses Family mark is corresponding and carries the electronic bill inquiry request of electronic bill inquiry code, comprising: receives terminal and receives in query page The electronic bill inquiry request triggered after to electronic bill inquiry code;Wherein, query page is mentioned by electronic bill management server For;Electronic bill inquiry request is triggered after query page login by terminal by user identifier;User identifier is by electronic bill Management server is distributed.
In one embodiment, the block chain node transmission into block chain network matches with search access right and carries electricity The inquiry instruction of sub- bill inquiry code includes: when determining search access right is detail search access right, into block chain network Block chain node sends the detail inquiry instruction for carrying electronic bill inquiry code.The query result that block chain link point returns is received, It include: to receive block chain link point after the electronic bill inquiry code according to entrained by detail inquiry instruction inquires billing information, The billing information returned as query result.
In one embodiment, the billing information returned as query result is encrypted data.According to response in electronics Bill inquiry request, is fed back according to query result, comprising: inquiry bill key corresponding with billing information;According to bill Key pair billing information is decrypted to obtain the billing information of plaintext;In response to the bill of electronic bill inquiry request feedback plaintext Information.
In one embodiment, which also makes processor execute following steps: obtaining and user identifier pair Answer and carry the bill cipher key acquisition request of electronic bill inquiry code;After carrying out authentication to user identifier and passing through, feedback Bill key corresponding with electronic bill inquiry code;The bill key of feedback is for decrypting through user identifier in block chain network In inquiry block chain link point in the billing information corresponding with electronic bill inquiry code that obtains.
In one embodiment, the block chain node transmission into block chain network matches with search access right and carries electricity The inquiry instruction of sub- bill inquiry code includes: when determining search access right is true and false search access right, into block chain network Block chain node sends the existence inquiry instruction for carrying electronic bill inquiry code.Receive the inquiry knot that block chain link point returns Fruit, comprising: receive block chain link point return, indicate whether exist and electronic bill entrained by existence inquiry instruction inquire The query result of the corresponding billing information of code.
In one embodiment, it is fed back according to response in electronic bill inquiry request according to query result, comprising: When the query result of block chain node feeding back, when indicating to have billing information corresponding with electronic bill inquiry code, feedback electronic Bill inquiry code is the query result of true electronic bill inquiry code;When the query result of block chain node feeding back, expression is not deposited In billing information corresponding with electronic bill inquiry code, feedback electronic bill inquiry code is looking into for false electronic bill inquiry code Ask result.
In one embodiment, which also makes processor execute following steps: generating includes user identifier Record is inquired with the bill of electronic bill inquiry code;Bill inquiry record is for inquiring the historical query row for electronic bill For;Bill inquiry record is uploaded to block chain node;The bill inquiry record of upload is used to indicate block chain node, by ticket It is investigated that other block chain nodes that consultation record is transferred in block chain network and after completing common recognition, inquire record write-in number for bill According to block.
In one embodiment, which also makes processor execute following steps: being inquired according to electronic bill Request entrained electronic bill inquiry code and search access right, it is local being synchronized to from the block chain node in block chain network It is inquired in billing information;When inquiring billing information corresponding with electronic bill inquiry code, then in response to electronic bill Inquiry request is fed back according to the billing information inquired;Believe when not inquiring bill corresponding with electronic bill inquiry code When breath, then the block chain node transmission executed into block chain network matches with search access right and carries electronic bill inquiry code Inquiry instruction the step of.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
Only several embodiments of the present invention are expressed for above embodiments, and the description thereof is more specific and detailed, but can not Therefore limitations on the scope of the patent of the present invention are interpreted as.It should be pointed out that for those of ordinary skill in the art, Without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection model of the invention It encloses.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (15)

1. a kind of electronic bill querying method, comprising:
Obtain electronic bill inquiry request that is corresponding with user identifier and carrying electronic bill inquiry code;
Determine search access right corresponding with the user identifier;
Block chain node transmission into block chain network matches with the search access right and carries the electronic bill inquiry code Inquiry instruction;
Receive the query result that the block chain node returns;The query result is being looked into according to as the block chain node It askes after the entrained electronic bill inquiry code of instruction carries out electronic bill inquiry and obtains;
In response to the electronic bill inquiry request, fed back according to the query result.
2. the method according to claim 1, wherein be applied to electronic bill management server, it is described acquisition with User identifier is corresponding and carries the electronic bill inquiry request of electronic bill inquiry code, comprising:
It receives terminal and receives the electronic bill inquiry request triggered after electronic bill inquiry code in query page;
Wherein, the query page is provided by the electronic bill management server;The electronic bill inquiry request is by described Terminal is triggered after query page login by user identifier;The user identifier is by the electronic bill management server It is distributed.
3. the method according to claim 1, wherein the block chain node into block chain network send with The search access right matches and the inquiry instruction of the carrying electronic bill inquiry code includes:
When the determining search access right is detail search access right, the block chain node into block chain network, which is sent, carries institute State the detail inquiry instruction of electronic bill inquiry code;
The query result for receiving the block chain node and returning, comprising:
It receives the block chain node and inquires bill in the electronic bill inquiry code according to entrained by the detail inquiry instruction The billing information after information, as query result return.
4. according to the method described in claim 2, it is characterized in that, the billing information returned as query result is Encrypted data;
According to response in the electronic bill inquiry request, fed back according to the query result, comprising:
Inquire bill key corresponding with the billing information;
It is decrypted to obtain the billing information of plaintext according to billing information described in the bill key pair;
The billing information of the plaintext is fed back in response to the electronic bill inquiry request.
5. the method according to claim 1, wherein the method also includes:
Obtain bill cipher key acquisition request that is corresponding with user identifier and carrying electronic bill inquiry code;
After carrying out authentication to the user identifier and passing through, it is close to feed back bill corresponding with the electronic bill inquiry code Key;The bill key of feedback is for decrypting through the user identifier in the inquiry block chain link point in block chain network The billing information corresponding with the electronic bill inquiry code obtained.
6. the method according to claim 1, wherein the block chain node into block chain network send with The search access right matches and the inquiry instruction of the carrying electronic bill inquiry code includes:
When the determining search access right is true and false search access right, the block chain node into block chain network, which is sent, carries institute State the existence inquiry instruction of electronic bill inquiry code;
The query result for receiving the block chain node and returning, comprising:
Receive it is that the block chain node returns, indicate whether to exist and electronic bill entrained by the existence inquiry instruction The query result of the corresponding billing information of inquiry code.
7. according to the method described in claim 6, it is characterized in that, described according to response in the electronic bill inquiry request, It is fed back according to the query result, comprising:
When the query result of the block chain node feeding back, indicate there is billing information corresponding with the electronic bill inquiry code When, feed back the query result that the electronic bill inquiry code is true electronic bill inquiry code;
When the query result of the block chain node feeding back, indicate that there is no bills corresponding with the electronic bill inquiry code to believe When breath, the query result that the electronic bill inquiry code is false electronic bill inquiry code is fed back.
8. the method according to claim 1, wherein the method also includes:
It generates the bill including the user identifier and the electronic bill inquiry code and inquires record;The bill inquiry record is used In historical query behavior of the inquiry for the electronic bill;
Bill inquiry record is uploaded to the block chain node;The bill inquiry record uploaded is used to indicate described Block chain node in other block chain nodes that bill inquiry record is transferred in the block chain network and is completed altogether After knowledge, the bill is inquired into record write-in data block.
9. the method according to claim 1, wherein the method also includes:
According to electronic bill inquiry code entrained by the electronic bill inquiry request and the search access right, from block link network Block chain node in network, which is synchronized in local billing information, to be inquired;
When inquiring billing information corresponding with the electronic bill inquiry code, then
In response to the electronic bill inquiry request, fed back according to the billing information inquired;
When not inquiring billing information corresponding with the electronic bill inquiry code, then
The block chain node transmission into block chain network is executed to match with the search access right and carry the electronic ticket According to inquiry code inquiry instruction the step of.
10. a kind of electronic bill inquiry unit, comprising:
Module is obtained, for obtaining electronic bill inquiry request that is corresponding with user identifier and carrying electronic bill inquiry code;
Determining module, for determining search access right corresponding with the user identifier;
Sending module is sent for the block chain node into block chain network described in matching and carrying with the search access right The inquiry instruction of electronic bill inquiry code;
Receiving module, the query result returned for receiving the block chain node;The query result is by the block chain link Point obtains after the electronic bill inquiry code according to entrained by the inquiry instruction carries out electronic bill inquiry;
Feedback module, for being fed back according to the query result in response to the electronic bill inquiry request.
11. device according to claim 10, which is characterized in that the sending module is also used to when the determining inquiry When permission is detail search access right, the block chain node into block chain network, which is sent, carries the bright of the electronic bill inquiry code Thin inquiry instruction;
The receiving module is also used to receive the block chain node in the electronic ticket according to entrained by the detail inquiry instruction The billing information after inquiring billing information according to inquiry code, as query result return.
12. device according to claim 10, which is characterized in that the sending module is also used to when the determining inquiry When permission is true and false search access right, the block chain node into block chain network, which is sent, carries depositing for the electronic bill inquiry code In property inquiry instruction;
The receiving module be also used to receive it is that the block chain node returns, indicate whether to exist and refer to existence inquiry Enable the query result of the entrained corresponding billing information of electronic bill inquiry code.
13. device according to claim 10, which is characterized in that described device further include:
Enquiry module is weighed for the electronic bill inquiry code according to entrained by the electronic bill inquiry request and the inquiry Limit, is inquired being synchronized in local billing information from the block chain node in block chain network;
The feedback module is also used to when inquiring billing information corresponding with the electronic bill inquiry code, then in response to institute Electronic bill inquiry request is stated, is fed back according to the billing information inquired;
The sending module is also used to when not inquiring billing information corresponding with the electronic bill inquiry code, to block chain Block chain node in network sends the inquiry instruction that the electronic bill inquiry code is matched and carried with the search access right.
14. a kind of computer readable storage medium, computer program, the meter are stored on the computer readable storage medium When calculation machine program is executed by processor, so that the processor executes the step of method as claimed in any one of claims 1-9 wherein Suddenly.
15. a kind of computer equipment, including memory and processor, computer program, the meter are stored in the memory When calculation machine program is executed by the processor, so that the processor executes method as claimed in any one of claims 1-9 wherein The step of.
CN201810990815.7A 2018-08-28 2018-08-28 Electronic bill query method, device, storage medium and computer equipment Active CN109255084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810990815.7A CN109255084B (en) 2018-08-28 2018-08-28 Electronic bill query method, device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810990815.7A CN109255084B (en) 2018-08-28 2018-08-28 Electronic bill query method, device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN109255084A true CN109255084A (en) 2019-01-22
CN109255084B CN109255084B (en) 2023-04-25

Family

ID=65050430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810990815.7A Active CN109255084B (en) 2018-08-28 2018-08-28 Electronic bill query method, device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN109255084B (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109858420A (en) * 2019-01-24 2019-06-07 国信电子票据平台信息服务有限公司 A kind of bill processing system and processing method
CN109918926A (en) * 2019-02-28 2019-06-21 浪潮软件股份有限公司 Data staging classification method for authenticating, node and block catenary system based on block chain
CN109919745A (en) * 2019-01-28 2019-06-21 航天信息股份有限公司 A kind of electronic invoice transmitting state management-control method and system
CN110276003A (en) * 2019-06-05 2019-09-24 上海票据交易所股份有限公司 Bill querying method and device based on information registration
CN110413570A (en) * 2019-06-25 2019-11-05 大唐软件技术股份有限公司 A kind of document index and search method and its device
CN110428334A (en) * 2019-08-09 2019-11-08 中国工商银行股份有限公司 Bill processing method and device based on block chain network
CN110458631A (en) * 2019-07-31 2019-11-15 阿里巴巴集团控股有限公司 Note number distribution method, device and electronic equipment based on block chain
CN110471932A (en) * 2019-08-13 2019-11-19 爱信诺征信有限公司 Invoice management method and system based on block chain
CN110555029A (en) * 2019-09-06 2019-12-10 腾讯科技(深圳)有限公司 ticket management method and device based on block chain and storage medium
CN110598454A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device in block chain, storage medium and computer equipment
CN110597886A (en) * 2019-09-24 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device and computer storage medium
CN110599347A (en) * 2019-09-25 2019-12-20 腾讯科技(深圳)有限公司 Bill processing method, device, computer readable storage medium and computer equipment
CN110598394A (en) * 2019-03-28 2019-12-20 腾讯科技(深圳)有限公司 Authority verification method and device and storage medium
CN110674516A (en) * 2019-09-18 2020-01-10 腾讯科技(深圳)有限公司 Permission configuration method and device of electronic bill management system and computer equipment
CN110675146A (en) * 2019-08-30 2020-01-10 深圳壹账通智能科技有限公司 Method and medium for processing electronic certificate transaction record and computer equipment
CN110866816A (en) * 2019-11-19 2020-03-06 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network and storage medium
CN111026789A (en) * 2019-11-29 2020-04-17 支付宝(杭州)信息技术有限公司 Block chain-based electronic bill query method and device and electronic equipment
CN112328984A (en) * 2020-11-24 2021-02-05 深圳市鹰硕技术有限公司 Data security management method and system applied to big data
CN114268953A (en) * 2020-09-14 2022-04-01 中国移动通信集团重庆有限公司 Base station authentication method, query node, system and equipment
CN114677188A (en) * 2022-05-25 2022-06-28 国网浙江省电力有限公司 Full-amount acquisition method and device suitable for paperless certificate data
CN117892354A (en) * 2024-03-11 2024-04-16 云账户技术(天津)有限公司 Electronic receipt management method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140052641A1 (en) * 2012-08-20 2014-02-20 Tsinghua University Electronic Invoice Issuing System For Electronic Commerce Website
CN103903171A (en) * 2014-04-02 2014-07-02 浪潮软件集团有限公司 Interactive network invoice authenticity checking method
CN106952124A (en) * 2017-03-16 2017-07-14 北京牛链科技有限公司 Electronic bill management system and method based on distribution book keeping operation
CN107077682A (en) * 2016-12-23 2017-08-18 深圳前海达闼云端智能科技有限公司 Method and device for inquiring state information of electronic ticket and block link point

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140052641A1 (en) * 2012-08-20 2014-02-20 Tsinghua University Electronic Invoice Issuing System For Electronic Commerce Website
CN103903171A (en) * 2014-04-02 2014-07-02 浪潮软件集团有限公司 Interactive network invoice authenticity checking method
CN107077682A (en) * 2016-12-23 2017-08-18 深圳前海达闼云端智能科技有限公司 Method and device for inquiring state information of electronic ticket and block link point
CN106952124A (en) * 2017-03-16 2017-07-14 北京牛链科技有限公司 Electronic bill management system and method based on distribution book keeping operation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张庆胜等: "基于区块链的电子发票系统研究", 《信息安全研究》 *

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109858420A (en) * 2019-01-24 2019-06-07 国信电子票据平台信息服务有限公司 A kind of bill processing system and processing method
CN109919745A (en) * 2019-01-28 2019-06-21 航天信息股份有限公司 A kind of electronic invoice transmitting state management-control method and system
CN109918926A (en) * 2019-02-28 2019-06-21 浪潮软件股份有限公司 Data staging classification method for authenticating, node and block catenary system based on block chain
CN109918926B (en) * 2019-02-28 2023-03-14 浪潮软件股份有限公司 Data classification authentication method based on block chain, node and block chain system
CN110598394A (en) * 2019-03-28 2019-12-20 腾讯科技(深圳)有限公司 Authority verification method and device and storage medium
CN110276003A (en) * 2019-06-05 2019-09-24 上海票据交易所股份有限公司 Bill querying method and device based on information registration
CN110413570A (en) * 2019-06-25 2019-11-05 大唐软件技术股份有限公司 A kind of document index and search method and its device
CN110458631A (en) * 2019-07-31 2019-11-15 阿里巴巴集团控股有限公司 Note number distribution method, device and electronic equipment based on block chain
CN110428334A (en) * 2019-08-09 2019-11-08 中国工商银行股份有限公司 Bill processing method and device based on block chain network
CN110471932A (en) * 2019-08-13 2019-11-19 爱信诺征信有限公司 Invoice management method and system based on block chain
CN110675146A (en) * 2019-08-30 2020-01-10 深圳壹账通智能科技有限公司 Method and medium for processing electronic certificate transaction record and computer equipment
CN110555029A (en) * 2019-09-06 2019-12-10 腾讯科技(深圳)有限公司 ticket management method and device based on block chain and storage medium
CN110555029B (en) * 2019-09-06 2024-05-14 腾讯科技(深圳)有限公司 Ticket management method, device and storage medium based on block chain
CN110674516A (en) * 2019-09-18 2020-01-10 腾讯科技(深圳)有限公司 Permission configuration method and device of electronic bill management system and computer equipment
CN110598454B (en) * 2019-09-20 2021-07-06 腾讯科技(深圳)有限公司 Data processing method and device in block chain, storage medium and computer equipment
CN110598454A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device in block chain, storage medium and computer equipment
CN110597886A (en) * 2019-09-24 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device and computer storage medium
CN110599347A (en) * 2019-09-25 2019-12-20 腾讯科技(深圳)有限公司 Bill processing method, device, computer readable storage medium and computer equipment
CN110866816A (en) * 2019-11-19 2020-03-06 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network and storage medium
CN111026789A (en) * 2019-11-29 2020-04-17 支付宝(杭州)信息技术有限公司 Block chain-based electronic bill query method and device and electronic equipment
CN111026789B (en) * 2019-11-29 2020-12-15 蚂蚁区块链科技(上海)有限公司 Block chain-based electronic bill query method and device and electronic equipment
CN114268953A (en) * 2020-09-14 2022-04-01 中国移动通信集团重庆有限公司 Base station authentication method, query node, system and equipment
CN114268953B (en) * 2020-09-14 2023-08-15 中国移动通信集团重庆有限公司 Base station authentication method, query node, system and equipment
CN112328984A (en) * 2020-11-24 2021-02-05 深圳市鹰硕技术有限公司 Data security management method and system applied to big data
CN112328984B (en) * 2020-11-24 2024-02-09 深圳市鹰硕技术有限公司 Data security management method and system applied to big data
CN114677188B (en) * 2022-05-25 2022-08-26 国网浙江省电力有限公司 Full-amount acquisition method and device suitable for paperless certificate data
CN114677188A (en) * 2022-05-25 2022-06-28 国网浙江省电力有限公司 Full-amount acquisition method and device suitable for paperless certificate data
CN117892354A (en) * 2024-03-11 2024-04-16 云账户技术(天津)有限公司 Electronic receipt management method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109255084B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN109255084A (en) Electronic bill querying method, device, storage medium and computer equipment
CN110400188B (en) Electronic bill generating method, electronic bill generating device, storage medium and computer equipment
CN110428293B (en) Data processing method, device, storage medium and equipment for electronic bill
CN108961030B (en) Data processing method, apparatus, system, medium, and device for electronic ticket
CN109165943B (en) Data processing method, device, storage medium and equipment for electronic bill
US20210049596A1 (en) Resource transfer data management method and apparatus, and storage medium
CN110599181B (en) Data processing method, device and equipment based on block chain and storage medium
CN109191272A (en) About the data processing method of electronic bill, device, storage medium and equipment
CN110599266B (en) Electronic bill data processing method and device, computer equipment and storage medium
TW202032960A (en) Method and device for data processing based on blockchain
CN109191219A (en) About the data processing method of electronic bill, device, storage medium and equipment
CN110599137A (en) Electronic bill data processing method and device and computer equipment
CN110400131A (en) About the data processing method of electronic bill, device, storage medium and equipment
CN110633963A (en) Electronic bill processing method, electronic bill processing device, computer-readable storage medium and equipment
WO2020088074A1 (en) Privacy transaction method and apparatus based on blockchain, and application method and apparatus therefor
CN110378755A (en) Electronic invoice generation method, device, computer equipment and storage medium
WO2020125234A1 (en) Blockchain-based data processing method and apparatus
WO2021204044A1 (en) Correction of blockchain data
CN110599270B (en) Electronic bill generation method and device and computer equipment
CN109359485A (en) Invoice data shared system and method based on block chain
CN113011974A (en) Transaction information evidence storing method and system based on block chain
CN109948370A (en) A kind of method for processing business based on block chain, device and electronic equipment
CN110351292A (en) Private key management method, device, equipment and storage medium
CN115705601A (en) Data processing method and device, computer equipment and storage medium
CA3173536A1 (en) Cryptosystem, systems, methods and applications for zero-knowledge anonymously-individualized marketing and loyalty management based on end-to-end encrypted transfer of statements like receipts or script

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20190118

Address after: 518000 Tencent Building 2401, Maling Community Science and Technology Center, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: SHENZHEN ZHISHUILIAN TECHNOLOGY Co.,Ltd.

Address before: 518000 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 Floors

Applicant before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant