CN110597886A - Data processing method and device and computer storage medium - Google Patents

Data processing method and device and computer storage medium Download PDF

Info

Publication number
CN110597886A
CN110597886A CN201910906459.0A CN201910906459A CN110597886A CN 110597886 A CN110597886 A CN 110597886A CN 201910906459 A CN201910906459 A CN 201910906459A CN 110597886 A CN110597886 A CN 110597886A
Authority
CN
China
Prior art keywords
bill
information corresponding
characteristic value
result
transaction 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.)
Pending
Application number
CN201910906459.0A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen 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 CN201910906459.0A priority Critical patent/CN110597886A/en
Publication of CN110597886A publication Critical patent/CN110597886A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/10Tax strategies

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention provides a data processing method, a data processing device and a computer storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining a bill verification request aiming at a first bill, wherein the bill verification request carries a characteristic value of transaction information corresponding to the first bill, inquiring bill information related to the characteristic value of the transaction information corresponding to the first bill from a block chain by the node to obtain an inquiry result of the first bill, generating a verification result aiming at the first bill according to the inquiry result, and sending the verification result of the first bill to a client, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill, so that the bill can be conveniently verified through the block chain, and the accuracy of the inquiry result is effectively guaranteed.

Description

Data processing method and device and computer storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus, and a computer storage medium.
Background
At present, the authenticity of invoices, whether tax payment is finished or not and the like need to be checked in many application scenarios, for example, when an enterprise reimburses invoices provided by employees, the enterprise needs to verify the authenticity of the invoices provided by the employees, the enterprise can usually log in a platform specified by a tax authority to inquire, a series of information such as invoice codes, invoice numbers, invoicing dates and invoicing amounts is generally required to be input to finish inquiry, the operation steps are complicated, and the risk that data is easily tampered exists, so that the accuracy of inquiry results is low. Therefore, how to provide an efficient and accurate bill verification method becomes an urgent problem to be solved.
Disclosure of Invention
Embodiments of the present invention provide a data processing method, apparatus, and computer storage medium, which can conveniently verify a ticket through a block chain and effectively ensure accuracy of a query result.
In a first aspect, an embodiment of the present invention provides a data processing method, which is applied to a blockchain network, where the blockchain network includes a plurality of nodes, and the method includes:
acquiring a bill verification request aiming at a first bill, wherein the bill verification request carries a characteristic value of transaction information corresponding to the first bill;
inquiring bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain an inquiry result of the first bill;
and generating a verification result aiming at the first bill according to the query result, and sending the verification result of the first bill to a client, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
In a second aspect, an embodiment of the present invention provides a data processing method, which is applied to a client, and the method includes:
acquiring an identifier of a first bill input by a user;
acquiring a characteristic value of the transaction information corresponding to the first bill by using the identifier of the first bill;
sending a bill validation request aiming at the first bill to a node of a block chain network, wherein the bill validation request carries a characteristic value of the transaction information corresponding to the first bill, and is used for indicating the node of the block chain network to inquire the bill information relevant to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain an inquiry result of the first bill and generating a validation result aiming at the first bill according to the inquiry result;
receiving a verification result of the first bill sent by a node of the block chain network, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
In a third aspect, an embodiment of the present invention provides a data processing apparatus, which is applied to a blockchain network, where the blockchain network includes a plurality of nodes, and the apparatus includes:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a bill verification request aiming at a first bill, and the bill verification request carries a characteristic value of transaction information corresponding to the first bill;
the query module is used for querying bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain a query result of the first bill;
the generating module is used for generating a verification result aiming at the first bill according to the query result;
and the sending module is used for sending a verification result of the first bill to a client, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
In a fourth aspect, an embodiment of the present invention provides a data processing apparatus, which is applied to a client, where the apparatus includes:
the acquisition module is used for acquiring the identification of the first bill input by the user;
the acquisition module is further used for acquiring the characteristic value of the transaction information corresponding to the first bill by using the identifier of the first bill;
a sending module, configured to send a bill validation request for the first bill to a node of a block chain network, where the bill validation request carries a feature value of the transaction information corresponding to the first bill, and the bill validation request is used to instruct the node of the block chain network to query, from a block chain, bill information related to the feature value of the transaction information corresponding to the first bill to obtain a query result of the first bill, and generate a validation result for the first bill according to the query result;
and the receiving module is used for receiving a verification result of the first bill sent by a node of the block chain network, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
In a fifth aspect, an embodiment of the present invention provides a node device, where the client includes a processor, a network interface, and a storage device, where the processor, the network interface, and the storage device are connected to each other, where the network interface is controlled by the processor to send and receive data, and the storage device is used to store a computer program, where the computer program includes program instructions, and the processor is configured to call the program instructions to execute the data processing method according to the first aspect.
In a sixth aspect, an embodiment of the present invention provides a client, where the node device includes a processor, a network interface, and a storage device, where the processor, the network interface, and the storage device are connected to each other, where the network interface is controlled by the processor to send and receive data, and the storage device is used to store a computer program, where the computer program includes program instructions, and the processor is configured to call the program instructions to execute the data processing method according to the second aspect.
In a seventh aspect, an embodiment of the present invention provides a computer storage medium, where program instructions are stored in the computer storage medium, and when the program instructions are executed, the computer storage medium is used to implement the data processing method according to the first aspect or the second aspect.
The embodiment of the invention can acquire the bill verification request aiming at the first bill, the bill verification request carries the characteristic value of the transaction information corresponding to the first bill, the node inquires the bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain the inquiry result of the first bill, the verification result aiming at the first bill can be generated according to the inquiry result, and the verification result of the first bill is sent to the client, and the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill, so that the bill can be conveniently verified through the block chain, and the accuracy of the inquiry result is effectively ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1a is a block diagram of a data processing system according to an embodiment of the present invention;
fig. 1b is a schematic structural diagram of a block chain according to an embodiment of the present invention;
FIG. 1c is a schematic diagram of a process for generating a new block according to an embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another data processing method provided by the embodiment of the invention;
FIG. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 5 is a block diagram of another data processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a node device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a client according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Aiming at the problems that the operation is complicated, the data is easy to be falsified, the accuracy is low and the like when bills such as invoices and the like are verified at present, the embodiment of the invention provides a data processing method, which can conveniently verify the bills through a block chain and effectively ensure the accuracy and the reliability of a query result.
Referring to fig. 1a, it is a schematic diagram of an architecture of a data processing system according to an embodiment of the present invention, the data processing system includes a blockchain network 10, a client 20, and a tax office server 30, wherein:
the blockchain network 10 refers to a network for performing data sharing between nodes, and a plurality of nodes 101 may be included in the blockchain network. Each node 101 may receive input information and maintain shared data (i.e., blockchains) within the blockchain network based on the received input information while operating normally. In order To ensure information intercommunication in the blockchain network, each node may have information connection, and any two nodes may implement Peer-To-Peer (P2P) communication, and specifically may perform P2P communication through a wired communication link or a wireless communication link. For example, when any node in the blockchain network receives input information, other nodes acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the blockchain network are consistent.
The client 20 and the tax office server 30 may access the blockchain network and may communicate with nodes in the blockchain network, such as initiating service requests to the nodes, obtaining data from the nodes, and so forth. The client 20 may also communicate with the tax office server 30, where the client 20 may specifically be a smart phone, a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted intelligent terminal, and the like, and the embodiment of the present invention is not limited thereto.
It should be noted that the number of nodes shown in fig. 1a is only illustrative, and any number of nodes may be deployed according to actual needs, and the client 20 and the tax office server 30 may communicate with the same node in the blockchain network or communicate with different nodes in the blockchain network respectively.
Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store node identifiers of other nodes in the blockchain network, so that the generated block can be broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an Internet Protocol (IP) address or any other information that can be used to identify the node, and the table is described by taking the IP address as an example.
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
Each node in the blockchain network stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 1b, the block chain is composed of a plurality of blocks, the starting block comprises a block head and a block main body, the block head stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 1c, when a node where the block chain is located receives input information, the input information is verified, after the verification is completed, the input information is stored in a memory pool, and a hash tree used for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the block chain network where the newly generated blocks are located according to the node identifications of the other nodes in the block chain network, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
The intelligent contract can be operated on the nodes of the block chain network, the intelligent contract is realized by codes executed when a certain condition is met, developers can define contract logic through a programming language, issue the contract logic to the block chain (intelligent contract registration), and call keys or other events to trigger execution according to the logic of contract terms to complete the contract logic and simultaneously provide the functions of upgrading and cancelling the intelligent contract.
In some possible embodiments, a node 101 of the block chain network may obtain a bill validation request submitted by the client 20 or the tax authority server 30 for the first bill, where the bill validation request carries a characteristic value (e.g., a hash value) of the transaction information corresponding to the first bill, and the node 101 queries, from the block chain, bill information related to the characteristic value of the transaction information corresponding to the first bill to obtain a query result of the first bill, generates a validation result for the first bill according to the query result, and sends the validation result of the first bill to the client, where the validation result indicates authenticity of the first bill and/or tax payment conditions (including completed tax payment or incomplete tax payment) of the first bill, so that the bill can be validated conveniently through the block chain and accuracy of the query result is effectively ensured.
In some possible embodiments, when acquiring a bill validation request for a first bill, a node 101 of the blockchain network may query, on one hand, bill information related to a feature value of transaction information corresponding to the first bill from the blockchain to obtain a first query result, and on the other hand, may broadcast the bill validation request to other nodes 101 in the plurality of nodes included in the blockchain network 10, so that the other nodes 101 also query the first bill, that is, query, from the blockchain, bill information related to the feature value of the transaction information corresponding to the first bill to obtain a second query result, so that the node 101 uses the first query result of itself and the second query result of the other nodes 101 together as query results for the first bill, and can further improve the reliability in bill validation by combining the query results of the plurality of nodes, and ensuring the validity of the verification result.
The implementation details of the technical scheme of the embodiment of the invention are explained in detail as follows:
referring to fig. 2, it is a schematic flow chart of a data processing method provided by the data processing system shown in fig. 1a according to an embodiment of the present invention, where the data processing method in the embodiment of the present invention is mainly described from a node side, the data processing method is applied to a block chain network, the block chain network includes a plurality of nodes, and the data processing method includes the following steps:
201. the method comprises the steps that a node obtains a bill verification request aiming at a first bill, wherein the bill verification request carries a characteristic value of transaction information corresponding to the first bill.
The first bill is the bill to be verified for authenticity and/or whether tax payment is finished.
Specifically, when a user (e.g., an enterprise, a merchant, etc.) needs to authenticate a first ticket, a ticket authentication request for the first ticket may be submitted to a node of the blockchain network through a client using an interface (e.g., a Remote Procedure Call (RPC) interface) provided by the node, alternatively, the client may send an identifier (e.g., an invoice number) of the first ticket to the tax office server, and the tax office server may obtain a characteristic value of the transaction information corresponding to the first ticket by using the identifier of the first ticket, and submits a bill validation request for the first bill to a node of the blockchain network according to the characteristic value of the transaction information corresponding to the first bill, the ticket verification request carries a characteristic value (such as a hash value) of the transaction information corresponding to the first ticket, the node receiving the ticket validation request may be any one of a plurality of nodes included in the blockchain network.
202. And the node inquires bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain an inquiry result of the first bill.
Specifically, the node queries bill information related to the first bill in the block from the block chain according to the feature value of the transaction information corresponding to the first bill, and obtains a query result, where the query result may include information such as whether the first bill exists and whether the first bill completes tax payment.
203. And the node generates a verification result aiming at the first bill according to the query result and sends the verification result of the first bill to a client, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
Specifically, the node may generate a verification result for the first ticket according to the query result, and send the verification result for the first ticket to the client corresponding to the user, where the verification result indicates the authenticity of the first ticket and/or the tax payment condition of the first ticket, and if the query result indicates that the first ticket exists and the first ticket has completed tax payment, the verification result for the first ticket may be: the first bill is a true bill and has completed tax payment, and if the query result indicates that the first bill exists and the first bill has not completed tax payment, the verification result of the first bill may be: the first bill is a true bill and tax payment is not completed, and if the query result indicates that the first bill does not exist, the verification result of the first bill may be: the first bill is a fake bill.
In the embodiment of the invention, the node can acquire the bill verification request aiming at the first bill, the bill verification request carries the characteristic value of the transaction information corresponding to the first bill, the node inquires the bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain the inquiry result of the first bill, the verification result aiming at the first bill can be generated according to the inquiry result, and the verification result of the first bill is sent to the client, and the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill, so that the bill can be conveniently verified through the block chain, and the accuracy and the credibility of the inquiry result are effectively ensured.
In some possible embodiments, when acquiring a ticket validation request for a first ticket, a node may broadcast the ticket validation request to at least one other node in a plurality of nodes included in a blockchain network, so that the other nodes query the first ticket and obtain a query result (denoted as a second query result), and thus the node may determine a validation result for the first ticket by combining its query result (denoted as the first query result) and the second query results of the other nodes, and may further improve the reliability in validating the ticket by combining the query results of the plurality of nodes, and ensure the validity of the validation result.
In some possible embodiments, the client may also send a ticket validation request for the first ticket to a plurality of nodes in the blockchain network respectively, and can designate a node to be responsible for collecting the query results of other nodes, determine the verification result of the first bill based on the query results, return the verification result to the client, or each node can also send the query result of the node to the client, the client determines the verification result of the first bill according to the query result of each node, thereby further improving the credibility of the bill verification by combining the query results of a plurality of nodes, ensuring the validity of the verification result, in addition, the client directly sends the bill validation request to each node, so that malicious tampering on the bill validation request possibly caused when one node forwards the bill validation request to other nodes can be avoided.
In some possible embodiments, the specific way for a node to determine the verification result of the first ticket by combining the first query result of the node with the second query results of other nodes may be: the node calls the intelligent contract to determine the number of nodes which inquire the bill information of the first bill and the first bill has completed tax payment according to the first inquiry result and the second inquiry results of other nodes, if the number of the nodes meets the preset condition indicated by the intelligent contract, a verification result that the first bill is the real bill and the tax payment is completed can be generated, and if the number of the nodes does not meet the preset condition indicated by the intelligent contract, a verification result that the first bill is the false bill and the tax payment is not completed is generated, wherein the preset condition can be that the number of the nodes is larger than or equal to a preset value, and the preset value can be a specified proportion of the total number of the nodes participating in the verification (such as 1/2 or 2/3). For example, 10 nodes in the blockchain network participate in the verification of the first ticket, the preset condition may be that the ticket information of the first ticket can be queried and the number of nodes where the first ticket has completed tax payment is greater than or equal to 6, that is, the query result of more than half of nodes is taken as the criterion. Of course, in a scene with a strict requirement, the number of the preset values may also be 8, and the embodiment of the present invention is not limited.
In some possible embodiments, when detecting that a bill (denoted as a second bill) completes tax payment, the tax office server may notify a node of the blockchain network, and specifically, may send a characteristic value of transaction information corresponding to the second bill to the node of the blockchain network, and after receiving the characteristic value of the transaction information corresponding to the second bill completing tax payment, the node may write the information that the second bill completes tax payment into the blockchain, so as to verify whether the bill completes tax payment later, thereby implementing uplink of tax payment information, and preventing data from being tampered.
Referring to fig. 3, it is a schematic flow chart of another data processing method provided by the data processing system shown in fig. 1a according to an embodiment of the present invention, where the data processing method of the embodiment of the present invention is mainly described from a client side, and the data processing method includes the following steps:
301. the client acquires the identification of the first bill input by the user.
302. And the client acquires the characteristic value of the transaction information corresponding to the first bill by using the identifier of the first bill.
303. The client sends a bill validation request aiming at the first bill to a node of a block chain network, wherein the bill validation request carries a characteristic value of the transaction information corresponding to the first bill, and the bill validation request is used for indicating the node of the block chain network to inquire bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain, obtain an inquiry result of the first bill and generate a validation result aiming at the first bill according to the inquiry result.
304. And the client receives a verification result of the first bill sent by a node of the block chain network, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
Further, the client may display the verification result to the user to prompt the user whether the first bill is true or false and/or whether the first bill completes tax payment.
The specific implementation of steps 301 to 304 may be referred to in the foregoing embodiments, and will not be described herein again.
In the embodiment of the invention, a client can obtain the identification of a first bill input by a user, obtain the characteristic value of the transaction information corresponding to the first bill by using the identification of the first bill, send a bill verification request aiming at the first bill to a node of a block chain network, instruct the node of the block chain network to inquire the bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain the inquiry result of the first bill, and generate the verification result aiming at the first bill according to the inquiry result.
Referring to fig. 4, a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention is shown, where the data processing apparatus according to the embodiment of the present invention is applied to a blockchain network, the blockchain network includes a plurality of nodes, and the apparatus includes:
an obtaining module 401, configured to obtain a ticket verification request for a first ticket, where the ticket verification request carries a feature value of transaction information corresponding to the first ticket;
a query module 402, configured to query, from a blockchain, ticket information related to a feature value of the transaction information corresponding to the first ticket, to obtain a query result of the first ticket;
a generating module 403, configured to generate a verification result for the first ticket according to the query result;
a sending module 404, configured to send, to a client, a verification result of the first ticket, where the verification result indicates authenticity of the first ticket and/or a tax payment condition of the first ticket.
Optionally, the query module 402 is specifically configured to:
inquiring bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain a first inquiry result;
broadcasting the bill validation request to other nodes in the plurality of nodes, wherein the bill validation request is used for indicating the other nodes to inquire bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain and obtain a second inquiry result;
and taking the first query result and the second query result of the other node as the query result of the first bill.
Optionally, the apparatus further includes a receiving module 405 and a writing module 406, wherein:
the receiving module 405 is configured to receive a characteristic value of transaction information corresponding to a second bill sent by the tax authority server when it is detected that the second bill completes tax payment;
the writing module 406 is configured to write the information that the second ticket completes tax payment into the block chain according to the feature value of the transaction information corresponding to the second ticket.
Optionally, the obtaining module 401 is specifically configured to:
receiving a bill verification request aiming at a first bill sent by a client, wherein the bill verification request is generated by the client by utilizing the identification of the first bill to obtain the characteristic value of the transaction information corresponding to the first bill after receiving the input identification of the first bill and according to the characteristic value of the transaction information corresponding to the first bill.
Optionally, the obtaining module 401 is specifically configured to:
receiving a bill verification request aiming at a first bill sent by a tax bureau server, wherein the bill verification request is generated by the tax bureau server after receiving an identifier of the first bill sent by a client, acquiring a characteristic value of transaction information corresponding to the first bill by using the identifier of the first bill, and generating the characteristic value according to the characteristic value of the transaction information corresponding to the first bill.
Optionally, the generating module 403 is specifically configured to:
calling an intelligent contract to determine the number of nodes which inquire the bill information of the first bill and the first bill has finished tax payment according to the first inquiry result and the second inquiry results of other nodes;
if the number of the nodes meets the preset condition indicated by the intelligent contract, generating a verification result that the first bill is true bill data and taxes are finished;
if the node number does not meet the preset condition indicated by the intelligent contract, generating a verification result that the first bill is a false bill and tax payment is not finished;
the preset condition comprises that the number of the nodes is larger than or equal to a preset numerical value.
It should be noted that the functions of each functional module of the data processing apparatus according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Referring to fig. 5, a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention is shown, where the data processing apparatus according to the embodiment of the present invention is applied to a client, and the apparatus includes:
an obtaining module 501, configured to obtain an identifier of a first ticket input by a user;
the obtaining module 501 is further configured to obtain a feature value of the transaction information corresponding to the first ticket by using the identifier of the first ticket;
a sending module 502, configured to send a bill validation request for the first bill to a node of a blockchain network, where the bill validation request carries a feature value of the transaction information corresponding to the first bill, and the bill validation request is used to instruct the node of the blockchain network to query, from a blockchain, bill information related to the feature value of the transaction information corresponding to the first bill to obtain a query result of the first bill, and generate a validation result for the first bill according to the query result;
a receiving module 503, configured to receive a verification result of the first ticket sent by a node of the block chain network, where the verification result indicates authenticity of the first ticket and/or a tax payment condition of the first ticket.
It should be noted that the functions of each functional module of the data processing apparatus according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Referring to fig. 6, it is a schematic structural diagram of a node device according to an embodiment of the present invention, where the node device includes a power supply module and other structures, and includes a processor 601, a storage device 602, and a network interface 603. The processor 601, the storage device 602, and the network interface 603 may exchange data therebetween.
The storage device 602 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the storage device 602 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid-state drive (SSD), etc.; the storage means 602 may also comprise a combination of memories of the kind described above.
The processor 601 may be a Central Processing Unit (CPU) 601. In one embodiment, the processor 601 may also be a Graphics Processing Unit (GPU) 601. The processor 601 may also be a combination of a CPU and a GPU. In one embodiment, the storage device 602 is used to store program instructions. The processor 601 may call the program instructions to perform the following operations:
acquiring a bill verification request aiming at a first bill, wherein the bill verification request carries a characteristic value of transaction information corresponding to the first bill;
inquiring bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain an inquiry result of the first bill;
generating a verification result aiming at the first bill according to the query result;
and sending a verification result of the first bill to a client, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
Optionally, the processor 601 is specifically configured to:
inquiring bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain a first inquiry result;
broadcasting the bill validation request to other nodes in the plurality of nodes, wherein the bill validation request is used for indicating the other nodes to inquire bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain and obtain a second inquiry result;
and taking the first query result and the second query result of the other node as the query result of the first bill.
Optionally, the processor 601 is further configured to:
receiving a characteristic value of transaction information corresponding to a second bill sent by a tax bureau server when detecting that the second bill completes tax payment;
and writing the information of completing tax payment of the second bill into the block chain according to the characteristic value of the transaction information corresponding to the second bill.
Optionally, the processor 601 is specifically configured to:
receiving a bill verification request aiming at a first bill sent by a client, wherein the bill verification request is generated by the client by utilizing the identification of the first bill to obtain the characteristic value of the transaction information corresponding to the first bill after receiving the input identification of the first bill and according to the characteristic value of the transaction information corresponding to the first bill.
Optionally, the processor 601 is specifically configured to:
receiving a bill verification request aiming at a first bill sent by a tax bureau server, wherein the bill verification request is generated by the tax bureau server after receiving an identifier of the first bill sent by a client, acquiring a characteristic value of transaction information corresponding to the first bill by using the identifier of the first bill, and generating the characteristic value according to the characteristic value of the transaction information corresponding to the first bill.
Optionally, the processor 601 is specifically configured to:
calling an intelligent contract to determine the number of nodes which inquire the bill information of the first bill and the first bill has finished tax payment according to the first inquiry result and the second inquiry results of other nodes;
if the number of the nodes meets the preset condition indicated by the intelligent contract, generating a verification result that the first bill is true bill data and taxes are finished;
if the node number does not meet the preset condition indicated by the intelligent contract, generating a verification result that the first bill is a false bill and tax payment is not finished;
the preset condition comprises that the number of the nodes is larger than or equal to a preset numerical value.
In a specific implementation, the processor 601, the storage device 602, and the network interface 603 described in this embodiment of the present invention may execute the implementation described in the related embodiment of the data processing method provided in fig. 2 in this embodiment of the present invention, and may also execute the implementation described in the related embodiment of the data processing device provided in fig. 4 in this embodiment of the present invention, which is not described herein again.
Fig. 7 is a schematic structural diagram of a client according to an embodiment of the present invention, where the client includes a power supply module and other structures, and includes a processor 701, a storage device 702, and a network interface 703. The processor 701, the storage 702, and the network interface 703 may exchange data with each other.
The storage 702 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the storage device 702 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid-state drive (SSD), or the like; the storage means 702 may also comprise a combination of memories of the kind described above.
The processor 701 may be a Central Processing Unit (CPU) 701. In one embodiment, the processor 701 may also be a Graphics Processing Unit (GPU) 701. The processor 701 may also be a combination of a CPU and a GPU. In one embodiment, the storage 702 is used to store program instructions. The processor 701 may call the program instructions to perform the following operations:
acquiring an identifier of a first bill input by a user;
acquiring a characteristic value of the transaction information corresponding to the first bill by using the identifier of the first bill;
sending a bill validation request aiming at the first bill to a node of a block chain network, wherein the bill validation request carries a characteristic value of the transaction information corresponding to the first bill, and is used for indicating the node of the block chain network to inquire the bill information relevant to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain an inquiry result of the first bill and generating a validation result aiming at the first bill according to the inquiry result;
receiving a verification result of the first bill sent by a node of the block chain network, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
In a specific implementation, the processor 701, the storage device 702, and the network interface 703 described in this embodiment of the present invention may execute the implementation described in the related embodiment of the data processing method provided in fig. 3 in this embodiment of the present invention, and may also execute the implementation described in the related embodiment of the data processing device provided in fig. 5 in this embodiment of the present invention, which is not described herein again.
Embodiments of the present invention further provide a computer storage medium, in which program instructions are stored, and when the program instructions are executed, the computer storage medium is configured to implement the corresponding method described in the above embodiments.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like, and may specifically be a processor in the computer device) to execute all or part of the steps of the above-described method according to the embodiments of the present invention. The storage medium may include: a U-disk, a removable hard disk, a magnetic disk, an optical disk, a Read-Only Memory (ROM) or a Random Access Memory (RAM), and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A data processing method applied to a blockchain network, the blockchain network comprising a plurality of nodes, the method comprising:
acquiring a bill verification request aiming at a first bill, wherein the bill verification request carries a characteristic value of transaction information corresponding to the first bill;
inquiring bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain an inquiry result of the first bill;
and generating a verification result aiming at the first bill according to the query result, and sending the verification result of the first bill to a client, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
2. The method of claim 1, wherein the querying from the blockchain for the ticket information related to the characteristic value of the transaction information corresponding to the first ticket to obtain the query result of the first ticket comprises:
inquiring bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain a first inquiry result;
broadcasting the bill validation request to other nodes in the plurality of nodes, wherein the bill validation request is used for indicating the other nodes to inquire bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain and obtain a second inquiry result;
and taking the first query result and the second query result of the other node as the query result of the first bill.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving a characteristic value of transaction information corresponding to a second bill sent by a tax bureau server when detecting that the second bill completes tax payment;
and writing the information of completing tax payment of the second bill into the block chain according to the characteristic value of the transaction information corresponding to the second bill.
4. The method of claim 1, wherein obtaining a ticket validation request for a first ticket comprises:
receiving a bill verification request aiming at a first bill sent by a client, wherein the bill verification request is generated by the client by utilizing the identification of the first bill to obtain the characteristic value of the transaction information corresponding to the first bill after receiving the input identification of the first bill and according to the characteristic value of the transaction information corresponding to the first bill.
5. The method of claim 1, wherein obtaining a ticket validation request for a first ticket comprises:
receiving a bill verification request aiming at a first bill sent by a tax bureau server, wherein the bill verification request is generated by the tax bureau server after receiving an identifier of the first bill sent by a client, acquiring a characteristic value of transaction information corresponding to the first bill by using the identifier of the first bill, and generating the characteristic value according to the characteristic value of the transaction information corresponding to the first bill.
6. The method of claim 2, wherein generating a validation result for the first ticket based on the query result comprises:
calling an intelligent contract to determine the number of nodes which inquire the bill information of the first bill and the first bill has finished tax payment according to the first inquiry result and the second inquiry results of other nodes;
if the number of the nodes meets the preset condition indicated by the intelligent contract, generating a verification result that the first bill is true bill data and taxes are finished;
if the node number does not meet the preset condition indicated by the intelligent contract, generating a verification result that the first bill is a false bill and tax payment is not finished;
the preset condition comprises that the number of the nodes is larger than or equal to a preset numerical value.
7. A data processing method is applied to a client, and the method comprises the following steps:
acquiring an identifier of a first bill input by a user;
acquiring a characteristic value of the transaction information corresponding to the first bill by using the identifier of the first bill;
sending a bill validation request aiming at the first bill to a node of a block chain network, wherein the bill validation request carries a characteristic value of the transaction information corresponding to the first bill, and is used for indicating the node of the block chain network to inquire the bill information relevant to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain an inquiry result of the first bill and generating a validation result aiming at the first bill according to the inquiry result;
receiving a verification result of the first bill sent by a node of the block chain network, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
8. A data processing apparatus for use in a blockchain network comprising a plurality of nodes, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a bill verification request aiming at a first bill, and the bill verification request carries a characteristic value of transaction information corresponding to the first bill;
the query module is used for querying bill information related to the characteristic value of the transaction information corresponding to the first bill from the block chain to obtain a query result of the first bill;
the generating module is used for generating a verification result aiming at the first bill according to the query result;
and the sending module is used for sending a verification result of the first bill to a client, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
9. A data processing apparatus, applied to a client, the apparatus comprising:
the acquisition module is used for acquiring the identification of the first bill input by the user;
the acquisition module is further used for acquiring the characteristic value of the transaction information corresponding to the first bill by using the identifier of the first bill;
a sending module, configured to send a bill validation request for the first bill to a node of a block chain network, where the bill validation request carries a feature value of the transaction information corresponding to the first bill, and the bill validation request is used to instruct the node of the block chain network to query, from a block chain, bill information related to the feature value of the transaction information corresponding to the first bill to obtain a query result of the first bill, and generate a validation result for the first bill according to the query result;
and the receiving module is used for receiving a verification result of the first bill sent by a node of the block chain network, wherein the verification result indicates the authenticity of the first bill and/or the tax payment condition of the first bill.
10. A computer storage medium having stored thereon program instructions for implementing a data processing method according to any one of claims 1 to 6 or a data processing method according to claim 7 when executed.
CN201910906459.0A 2019-09-24 2019-09-24 Data processing method and device and computer storage medium Pending CN110597886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910906459.0A CN110597886A (en) 2019-09-24 2019-09-24 Data processing method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910906459.0A CN110597886A (en) 2019-09-24 2019-09-24 Data processing method and device and computer storage medium

Publications (1)

Publication Number Publication Date
CN110597886A true CN110597886A (en) 2019-12-20

Family

ID=68862938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910906459.0A Pending CN110597886A (en) 2019-09-24 2019-09-24 Data processing method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN110597886A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111275462A (en) * 2020-01-22 2020-06-12 腾讯科技(深圳)有限公司 Bill verification method and device based on block chain network and storage medium
CN116090020A (en) * 2023-04-13 2023-05-09 中国人民解放军海军潜艇学院 Block chain-based information storage method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109191272A (en) * 2018-08-17 2019-01-11 腾讯科技(深圳)有限公司 About the data processing method of electronic bill, device, storage medium and equipment
CN109255084A (en) * 2018-08-28 2019-01-22 腾讯科技(深圳)有限公司 Electronic bill querying method, device, storage medium and computer equipment
CN110019326A (en) * 2018-12-25 2019-07-16 阿里巴巴集团控股有限公司 True from false of bills verification method and device and electronic equipment based on block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109191272A (en) * 2018-08-17 2019-01-11 腾讯科技(深圳)有限公司 About the data processing method of electronic bill, device, storage medium and equipment
CN109255084A (en) * 2018-08-28 2019-01-22 腾讯科技(深圳)有限公司 Electronic bill querying method, device, storage medium and computer equipment
CN110019326A (en) * 2018-12-25 2019-07-16 阿里巴巴集团控股有限公司 True from false of bills verification method and device and electronic equipment based on block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111275462A (en) * 2020-01-22 2020-06-12 腾讯科技(深圳)有限公司 Bill verification method and device based on block chain network and storage medium
CN116090020A (en) * 2023-04-13 2023-05-09 中国人民解放军海军潜艇学院 Block chain-based information storage method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111343142B (en) Data processing method and device based on block chain network and storage medium
CN107396360B (en) Block verification method and device
WO2020024968A1 (en) Resource transfer data management method and apparatus, and storage medium
US10387856B2 (en) Online payment method, system, and apparatus
CN108513669A (en) Crowd funding information processing method and device based on block chain, storage medium and electronic equipment
CN110599349B (en) Data processing method based on block chain network, related equipment and storage medium
CN111507717B (en) Data processing method, device, block node and computer readable storage medium
CN111191292A (en) Accounting method, accounting device, accounting system and computer-readable storage medium
CN111460458B (en) Data processing method, related device and computer storage medium
CN110599275A (en) Data processing method and device based on block chain network and storage medium
CN110738471B (en) Bill management method based on blockchain network and related equipment
CN110597918A (en) Account management method and device and computer readable storage medium
CN110852648A (en) Data processing method and device and computer storage medium
CN111488626A (en) Data processing method, device, equipment and medium based on block chain
CN110955724A (en) Data processing method and device based on block chain, node equipment and storage medium
CN110880147A (en) Transaction processing method, related equipment and computer storage medium
CN110659993A (en) Resource management method and device based on block chain network
CN110597886A (en) Data processing method and device and computer storage medium
CN112287311A (en) Service implementation method and device based on block chain
CN111325586B (en) Bill generation method, device, server and medium based on block chain network
CN110955919A (en) Data processing method based on block chain network, related device and storage medium
CN110598479B (en) Data processing method, device and computer readable storage medium
CN111932326A (en) Data processing method based on block chain network and related equipment
CN112052267A (en) Data query method, equipment, server and storage medium
CN109859041B (en) Block chain-based fund transaction real-time updating method and system and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination