CN106372868B - Verification method and device for transaction data written into block chain - Google Patents

Verification method and device for transaction data written into block chain Download PDF

Info

Publication number
CN106372868B
CN106372868B CN201610806550.1A CN201610806550A CN106372868B CN 106372868 B CN106372868 B CN 106372868B CN 201610806550 A CN201610806550 A CN 201610806550A CN 106372868 B CN106372868 B CN 106372868B
Authority
CN
China
Prior art keywords
transaction data
node
verification result
blockchain network
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610806550.1A
Other languages
Chinese (zh)
Other versions
CN106372868A (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.)
Union Mobile Pay Co Ltd
Original Assignee
Union Mobile Pay 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 Union Mobile Pay Co Ltd filed Critical Union Mobile Pay Co Ltd
Priority to CN201610806550.1A priority Critical patent/CN106372868B/en
Publication of CN106372868A publication Critical patent/CN106372868A/en
Application granted granted Critical
Publication of CN106372868B publication Critical patent/CN106372868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention relates to the technical field of internet, in particular to a method and a device for verifying transaction data written into a blockchain, which are used for verifying the transaction data written into the blockchain. In the embodiment of the invention, a verification request of first transaction data is sent to a first node in a block chain network, wherein the verification request carries a first address identifier of the first transaction data; receiving a verification result sent by a first node, wherein the verification result indicates that the blockchain of the first node contains the first transaction data when the verification result is first state information, and indicates that the blockchain of the first node does not contain the first transaction data when the verification result is second state information; if the verification result of the first transaction data is the second state information, the first transaction data is sent to the blockchain network again; the problem of loss of the first transaction data caused by downtime of the second node in the block chain network is avoided, and the safety and reliability of the transaction data are effectively guaranteed.

Description

Verification method and device for transaction data written into block chain
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a verification method and device for transaction data written into a block chain.
Background
A Blockchain (Blockchain) is a mode of citizen participation accounting and has the characteristics of decentralization and distrust. The blockchain is most important to solve the intermediary credit problem. In the past, it was difficult for two people who did not know and trust each other to achieve collaboration, and had to rely on a third party. Such as payment activity, any transfer in the past must exist with an institution such as a bank or a payment instrument. However, through the blockchain technology, the bitcoin is the first time that human beings realize the transfer behavior that two parties can mutually trust without any intermediary mechanism, which is a major breakthrough of the blockchain, and therefore, the blockchain is more and more concerned by people.
In the process of using the block chain, a large amount of data flows into the block chain during a peak period of a transaction, and when the data amount reaches or exceeds the processing capacity of the block chain, a large amount of broadcast data can be flooded in a network and cannot be processed, a large amount of network broadband is occupied, and normal services cannot run or even completely break down. In the prior art, partial data is abandoned and recorded through a custom rule to ensure the processing capacity of the transaction in the network, so that partial transaction data is lost, and if a node which is processing the data is down, all data which is received by the node and is not broadcasted cannot be processed, so that the problem of data loss is caused.
Disclosure of Invention
The invention provides a data verification method and device for a block chain, which are used for solving the problem that data is lost due to the fact that a node for processing data in the block chain is down in the prior art.
The method comprises the following steps:
sending a verification request of first transaction data to a first node in a blockchain network, wherein the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
receiving a verification result sent by the first node, wherein the verification result indicates that the block chain of the first node contains the first transaction data when the verification result is first state information, and the verification result indicates that the block chain of the first node does not contain the first transaction data when the verification result is second state information;
and if the verification result of the first transaction data is second state information, retransmitting the first transaction data to the blockchain network.
Optionally, before sending the verification request of the first transaction data to the first node in the blockchain network, the method further includes:
receiving the first transaction data sent by an application and storing the first transaction data;
and sending the first transaction data to the blockchain network and receiving the first address identifier corresponding to the first transaction data fed back by the blockchain network.
Optionally, storing the first transaction data comprises:
storing the first transaction data, generating a first storage identifier of the first transaction data, and recording the first storage identifier to a first text;
after receiving the first address identifier corresponding to the first transaction data fed back by the blockchain network, the method further includes:
recording the first address in an area corresponding to the first storage identifier;
after receiving the verification result of the first transaction data sent by the first node, the method further includes:
and recording the verification result of the first transaction data in the area corresponding to the first storage identifier.
Optionally, if the verification result of the first transaction data is the second status information, resending the first transaction data to the blockchain network includes:
and inquiring the first text, if the verification result of the first transaction data is in a second state, acquiring the first transaction data from the storage area according to the first storage identifier, and resending the first transaction data to the blockchain network.
Optionally, the method further comprises:
and inquiring the first text, and if the verification result of the first transaction data is in a first state, deleting the record of the first transaction data in the first text.
The embodiment of the invention provides a method for verifying transaction data written into a block chain, which comprises the following steps:
a first node in a blockchain network receives a verification request of first transaction data, wherein the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
according to the first address identification, the first node inquires whether the first transaction data is stored in a block chain of the first node;
if the first transaction data is stored, sending a verification result of a first state; and if the first transaction data is not stored, sending a verification result of a second state.
Optionally, before the first node in the blockchain network receives the verification request of the first transaction data, the method further includes:
a second node in the blockchain network receives the first transaction data; the second node is any node in the block chain network;
and the second node generates the first address identification corresponding to the first transaction data and sends the first address identification.
The embodiment of the invention provides a data verification end for verifying transaction data written into a block chain, which comprises the following steps:
a sending module, configured to send a verification request for first transaction data to a first node in a blockchain network, where the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
a receiving module, configured to receive a verification result sent by the first node, where the verification result indicates that the first node includes the first transaction data when the verification result is first state information, and the verification result indicates that the first node does not include the first transaction data when the verification result is second state information;
the sending module is further configured to resend the first transaction data to the blockchain network if the verification result of the first transaction data is the second state information.
Optionally, a storage module is also included,
the receiving module is further configured to receive the first transaction data sent by the application, and receive a first address identifier corresponding to the first transaction data fed back by the blockchain network;
the storage module is used for storing the first transaction data after the receiving module receives the first transaction data;
the sending module is further configured to send the first transaction data to the blockchain network.
Optionally, a recording module is also included,
the recording module is used for recording a first storage identification corresponding to the first transaction data into a first text; after receiving the first address identification and the verification result corresponding to the first transaction data fed back by the blockchain network, recording the first address identification and the verification result corresponding to the first transaction data fed back by the blockchain network into an area corresponding to the first storage identification in a first text.
Optionally, a query module is also included,
the query module is configured to query the first text, and if the verification result of the first transaction data is in the second state, notify the sending module to resend the first transaction data to the blockchain network.
Optionally, comprising:
the query module is further configured to delete the record of the first transaction data in the first text when the verification result of the queried first transaction data is in the first state.
An embodiment of the present invention provides a blockchain network node for verifying transaction data written in a blockchain, including:
a receiving module, configured to receive a verification request for first transaction data, where the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
the query module is used for querying whether the first transaction data is stored in the block chain of the block chain network node according to the first address identifier; if the first transaction data is stored, sending a verification result of a first state; if the first transaction data is not stored, sending a verification result of a second state;
and the sending module is used for sending the verification result of the first transaction data.
Optionally, the system also comprises a generation module,
the receiving module is further used for receiving the first transaction data;
the generating module is configured to generate the first address identifier corresponding to the first transaction data after the receiving module receives the first transaction data;
the sending module is further configured to send the first address identifier.
The embodiment of the invention sends a verification request of first transaction data to any node in the block chain network, wherein the first transaction data is the transaction data sent to the block chain network; the method comprises the steps of verifying a first transaction data processing state through any node, judging whether the first transaction data processing is successful or not, and if the first transaction data processing is unsuccessful, sending the first transaction data to the blockchain network again to enable the blockchain network to process the first transaction data again, so that the problem of first transaction data loss caused by breakdown of a certain node in the blockchain network is avoided, and the safety and reliability of the transaction data are effectively guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a system architecture diagram according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method of a data verification end for verifying transaction data written into a blockchain according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method of verifying transaction data written into a blockchain for a blockchain network node according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for verifying transaction data written into a blockchain according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data verification end for verifying transaction data written into a blockchain according to an embodiment of the present invention;
fig. 6 is a block chain network node for verifying transaction data written into a block chain according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, 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.
Fig. 1 is a schematic diagram illustrating a system architecture to which an embodiment of the present invention is applicable, and as shown in fig. 1, the system architecture to which an embodiment of the present invention is applicable includes an application a101, an application B102, an application C103, and an application D104; a flow control unit 105, a data verification unit 106; a blockchain network 107.
The application A101, the application B102, the application C103 and the application D104 are respectively connected with the flow control unit, and the application A101, the application B102, the application C103 and the application D104 send transaction data to the flow control module at irregular time; the flow control unit is connected with the blockchain network, and sends transaction data received from the application A101, the application B102, the application C103 and the application D104 to the blockchain network at a certain rate, and the flow control unit is connected with the data verification unit for interaction; the data verification unit is connected with the blockchain network and verifies the processing state of the transaction data sent from the application A101, the application B102, the application C103 and the application D104 in the blockchain network; the nodes in the blockchain network may be accounting nodes or normal nodes. In the above embodiment, two units, namely the flow control unit 105 and the data verification unit 106, are provided for convenience of description, in practical applications, the embodiment of the present invention only adds a processing device between an application and a blockchain network, and the processing device has functions of distributing transaction data to the blockchain network and verifying the transaction data.
Fig. 2 is a flowchart illustrating a method of a data verification end for verifying transaction data written into a blockchain according to an embodiment of the present invention. As shown in fig. 2, the method comprises the following steps:
step 201: sending a verification request of first transaction data to a first node in a blockchain network, wherein the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network.
Step 202: and receiving a verification result sent by the first node, wherein the verification result indicates that the block chain of the first node contains the first transaction data when the verification result is first state information, and the verification result indicates that the block chain of the first node does not contain the first transaction data when the verification result is second state information.
Step 203: and if the verification result of the first transaction data is second state information, retransmitting the first transaction data to the blockchain network.
In the above embodiment, the verification request of the first transaction data is sent to the first node in the blockchain network, the processing state of the first transaction data is verified, whether the processing of the first transaction data is successful or not is judged, and if the processing of the first transaction data is unsuccessful, the first transaction data is sent to the blockchain network again, so that the blockchain network processes the first transaction data again, the problem of loss of the first transaction data caused by downtime of the node in the blockchain network is avoided, and the security and reliability of the transaction data are effectively ensured.
Based on the system architecture of fig. 1, in step 201, when the data verification unit needs to verify the first transaction data, according to the read information of the first transaction data, sending a request for verifying the processing of the first transaction data to a first node in the blockchain network, where the request carries a first address identifier of the first transaction data, and the first transaction information corresponds to the first address identifier one to one, so as to ensure the accuracy of verification; randomly sending an authentication request to any node in the blockchain network, wherein the randomness of the authentication ensures that the first transaction data is really distributed to each node in the blockchain network.
In step 202, after receiving the verification result of the first transaction data sent by the first node, recording the verification result of the first transaction data in the area corresponding to the first storage identifier; and then inquiring the first text, and judging whether the received verification result sent by the first node is the first state information or the second state information, namely judging the processing condition of the first transaction data in the block chain network.
In step 203, if the verification result of the first transaction data is the second status information, which indicates that the processing of the first transaction data is unsuccessful, the first transaction data is re-sent to the blockchain network, so that the problem of loss of the first transaction data caused by downtime of a billing node in the blockchain network is avoided, and the security and reliability of the transaction data are effectively ensured.
Optionally, before sending a verification request of first transaction data to a first node in the blockchain network, receiving the first transaction data sent by an application and storing the first transaction data; storing the first transaction data, generating a first storage identifier of the first transaction data, and recording the first storage identifier to a first text; sending the first transaction data to the blockchain network and receiving the first address identifier corresponding to the first transaction data fed back by the blockchain network; recording the first address in an area corresponding to the first storage identifier; after receiving the verification result of the first transaction data sent by the first node, recording the verification result of the first transaction data in the area corresponding to the first storage identifier; in the above embodiment, for each received transaction data, the relevant information of the transaction data is completely recorded in the received accounting process, so that when the first transaction data fails to be processed, the first transaction data can be found for retransmission, and the blockchain network is reprocessed, thereby avoiding the problem of transaction data loss, and ensuring that all transaction data can be recorded in the blockchain network.
Optionally, when the first text is queried, if the verification result of the first transaction data is in the second state, obtaining the first transaction data from the storage area according to the first storage identifier, and resending the first transaction data to the blockchain network; if the verification result of the first transaction data is in a first state, deleting the record of the first transaction data in the first text; the processing condition of the first transaction data in the blockchain network is determined according to whether the returned verification result of the first transaction data is in the first state or the second state, so that the method is concise and clear, the processing state of the first transaction data can be quickly responded, and the first transaction data can be ensured not to be repeatedly sent by deleting the record of the first transaction data.
Fig. 3 is a flowchart illustrating a method for verifying transaction data written in a blockchain for a blockchain network node according to an embodiment of the present invention, including the following steps:
step 301: a first node in a blockchain network receives a verification request of first transaction data, wherein the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
step 302: according to the first address identification, the first node inquires whether the first transaction data is stored in a block chain of the first node;
step 303: if the first transaction data is stored, sending a verification result of a first state; and if the first transaction data is not stored, sending a verification result of a second state.
Fig. 4 is a schematic flow chart of a verification method for transaction data written into a blockchain according to an embodiment of the present invention, including the following steps:
step 401: the data verification unit receives the first transaction data sent by the application and stores the first transaction data;
step 402: the data verification unit generates a first storage identifier of the first transaction data, and records the first storage identifier to a first text;
step 403: the data verification unit sends the first transaction data to the blockchain network;
step 404: a second node in the blockchain network receives the first transaction data; the second node is any node in the block chain network;
step 405: and the second node generates the first address identification corresponding to the first transaction data and sends the first address identification.
Step 406: a data verification unit receives the first address identification corresponding to the first transaction data fed back by the blockchain network; recording the first address in an area corresponding to the first storage identifier in a first text;
step 407: a data verification unit sends a verification request of first transaction data to a first node in a blockchain network, wherein the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
step 408: a first node in a block chain network receives a verification request of first transaction data, wherein the verification request carries a first address identifier of the first transaction data;
step 409: a first node in the block chain network inquires whether the block chain of the first node stores the first transaction data or not according to the first address identifier; if the first transaction data is stored, sending a verification result of a first state; and if the first transaction data is not stored, sending a verification result of a second state.
Step 410: and the data verification unit receives a verification result of the first transaction data sent by the first node and records the verification result of the first transaction data in an area corresponding to the first storage identifier.
Step 411: the data verification unit inquires the first text, if the verification result of the first transaction data is in a second state, the first transaction data is acquired from the storage area according to the first storage identifier, and the first transaction data is retransmitted to the blockchain network; and if the verification result of the first transaction data is in the first state, deleting the record of the first transaction data in the first text.
The embodiment of the present invention provides an example of verifying data written in a block chain, for example, an application a, an application B, an application C, and an application D are respectively connected to a flow control unit, the application a sends transaction data 1 to the flow control unit, the flow control unit stores the transaction data 1 in a storage area after receiving the transaction data 1, generates a storage identifier ID1 corresponding to the transaction data 1, and sends the storage identifier ID1 to a data verification unit; then the flow control unit sends the transaction data 1 to any node in the blockchain network, such as an accounting node a, when the accounting node a receives the transaction data 1, an address identifier corresponding to the transaction data 1 is generated according to the transaction data 1, the address identifier may be but is not limited to a hash value (hash), the address identifier corresponding to the transaction data 1 is marked as a hash1, and the accounting node a sends the generated address identifier hash1 corresponding to the transaction data 1 to the data verification unit and simultaneously broadcasts the transaction data 1 to other nodes in the blockchain network; the data verification unit receives the storage identifier ID1 and the address identifier hash1 corresponding to the transaction data 1, and stores the two into the first text according to the association relationship, as shown in table 1. Of course, the traffic control unit may receive the first address hash1 of the transaction data 1 generated by the accounting node a, and then store the storage identifier ID1 corresponding to the transaction data 1 and the address identifier hash1 in association with each other in the first text.
TABLE 1
Transaction data Storage identity Address identification
Transaction data 1 ID1 hash1
The data verification unit verifies the processing status of the transaction data 1 in the blockchain network after waiting a period of time, which may be set manually.
The flow control unit continuously receives the transaction data sent by the application in the period of time and processes the transaction data, for example, the flow control unit receives the transaction data 2, the transaction data 3 and the transaction data 4 sent by the application B, the application C and the application D, stores the transaction data 2, the transaction data 3 and the transaction data 4 in a storage area, generates a storage identifier ID2, a storage identifier ID3 and a storage identifier ID4 corresponding to the transaction data 2, the transaction data 3 and the transaction data 4, and sends the storage identifier ID2, the storage identifier ID3 and the storage identifier ID4 to the data verification unit; then the flow control unit randomly sends the transaction data 2, the transaction data 3 and the transaction data 4 to an accounting node in the blockchain network, for example, the transaction data 2 and the transaction data 3 are sent to an accounting node b, and the transaction data 4 is sent to an accounting node c; when receiving the transaction data 2 and the transaction data 3, the accounting node b generates address identifications hash2 and hash3 corresponding to the transaction data 2 and the transaction data 3 according to the transaction data 2 and the transaction data 3, sends the generated address identifications hash2 and hash3 corresponding to the transaction data 2 and the transaction data 3 to a data verification unit, and broadcasts the transaction data 2 and the transaction data 3 to other nodes in the blockchain network; when the accounting node c receives the transaction data 4, an address identifier hash4 corresponding to the transaction data 4 is generated according to the transaction data 4, the accounting node c sends the generated address identifier hash4 corresponding to the transaction data 4 to the data verification unit, and meanwhile, the transaction data 4 is broadcast to other nodes in the block chain network;
the data verification unit receives the storage identifier ID2, the storage identifier ID3, the storage identifier ID4, the address identifier hash2, the address identifier hash3 and the address identifier hash4 corresponding to the transaction data 2, the transaction data 3 and the transaction data 4, and stores the storage identifier and the address identifier into the first text according to the association relationship respectively, as shown in table 2.
TABLE 2
Transaction data Storage identity Address identification
Transaction data 1 ID1 hash1
Transaction data 2 ID2 Hash2
Transaction data 3 ID3 Hash3
Transaction data 4 ID4 Hash4
When the accounting node calculates the hash value with a specific format required for generating the block, a part of transaction data stored in the node is recorded in the block, a state identifier is generated in the block, then the block is broadcasted to the blockchain network, other accounting nodes in the blockchain network receive the block, meanwhile, the other accounting nodes compare the transaction data in the block with the transaction data in the node, delete the same transaction data in the node and the block, and complete transaction data synchronization.
When accounting node a calculates hash value α with a specific format required for generating block 1, transaction data 1 and transaction data 2 are recorded in block 1 and a state identifier α is generated in block 1, accounting node a broadcasts block 1 into a blockchain network, accounting node b and accounting node c receive block 1, and simultaneously accounting node b and accounting node c compare transaction data in block 1 with transaction data in the node, delete transaction data 1 and transaction data 2 in the node, and complete transaction data synchronization.
When accounting node c calculates the particular format hash value β required to generate block 1, transaction data 3 and transaction data 4 are recorded into block 2 and a status flag β is generated in block 2, accounting node c crashes and fails to broadcast block 2 into the blockchain network.
After the period of time, the data verification module stores the storage identification and the address identification corresponding to the newly generated transaction data into the second text and starts to check the first text; the data verification module verifies the processing state of each data in the block chain network according to the sequence of the data records.
The data verification module sends a verification request of the transaction data 1 to any node in the blockchain network according to the address identification hash1 of the transaction data 1, any accounting node inquires data stored in the node of the data verification module according to the received address identification hash1 of the transaction data 1, the transaction data 1 is found to be in the valid block 1, any accounting node returns a first state identification corresponding to the transaction data 1 to the data verification unit, and after the data verification unit receives the first state identification corresponding to the transaction data 1, the transaction data 1 is verified to be successfully processed, and then the record of the transaction data 1 is deleted, as shown in table 3.
TABLE 3
Figure BDA0001110432010000131
The data verification module sends a verification request of the transaction data 2 to any node in the blockchain network according to the address identification hash2 of the transaction data 2, any accounting node inquires data stored in the node according to the received address identification hash2 of the transaction data 2, finds that the transaction data 2 is in the valid block 1, returns a first state identification corresponding to the transaction data 2 to the data verification unit, and deletes the record of the transaction data 1 if the data verification unit verifies that the transaction data 2 is successfully processed after receiving the first state identification corresponding to the transaction data 2, as shown in table 4.
TABLE 4
Figure BDA0001110432010000132
The data verification module sends a verification request of the transaction data 3 to any node in the blockchain network according to the address identification hash3 of the transaction data 3, any accounting node inquires data stored in the node according to the received address identification hash3 of the transaction data 3, finds that the transaction data 3 does not exist in an effective block, returns a second state identification corresponding to the transaction data 3 to the data verification unit, and after the data verification unit receives a second state identification corresponding to the transaction data 3, verifies that the transaction data 4 fails to be processed, and temporarily keeps the record of the transaction data, as shown in table 5.
TABLE 5
Figure BDA0001110432010000141
The data verification module sends a verification request of the transaction data 4 to any node in the blockchain network according to the address identification hash4 of the transaction data 4, any accounting node inquires data stored in the node of the data verification module according to the received address identification hash4 of the transaction data 4, finds that the transaction data 4 does not exist in an effective block, returns a second state identification corresponding to the transaction data 4 to the data verification unit, and after the data verification unit receives a second state identification corresponding to the transaction data 4, if the transaction data 4 is verified to be processed unsuccessfully, records of the transaction data are temporarily reserved, as shown in table 6.
TABLE 6
Figure BDA0001110432010000142
After the data verification unit verifies all the transaction data in the first text, records of the transaction data 3 and the transaction data 4 are also reserved in the text, and the data verification unit informs the flow control unit to resend the transaction data 3 and the transaction data 4.
In view of the above method flow, an embodiment of the present invention further provides a device for verifying transaction data written in a block chain, and specific contents of the software pre-deployment device may be implemented with reference to the above method.
Based on the same concept, fig. 5 is a schematic structural diagram of a data verification end for verifying transaction data written into a blockchain according to an embodiment of the present invention. As shown in fig. 5, the data verification end for verifying the transaction data written into the blockchain includes:
a sending module 501, configured to send a verification request of first transaction data to a first node in a blockchain network, where the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network.
A receiving module 502, configured to receive a verification result sent by the first node, where the verification result indicates that the first node includes the first transaction data when the verification result is first state information, and the verification result indicates that the first node does not include the first transaction data when the verification result is second state information.
A recording module 503, configured to record a first storage identifier corresponding to the first transaction data in a first text; after receiving the first address identification and the verification result corresponding to the first transaction data fed back by the blockchain network, recording the first address identification and the verification result corresponding to the first transaction data fed back by the blockchain network into an area corresponding to the first storage identification in a first text.
A storage module 504, configured to store the first transaction data after the receiving module receives the first transaction data.
The query module 505 is configured to query the first text, and if the verification result of the first transaction data is in the second state, notify the sending module to resend the first transaction data to the blockchain network.
Preferably, the sending module is further configured to resend the first transaction data to the blockchain network if the verification result of the first transaction data is the second state information; and sending the first transaction data to the blockchain network.
Preferably, the receiving module is further configured to receive the first transaction data sent by the application, and receive a first address identifier corresponding to the first transaction data fed back by the blockchain network.
Preferably, the query module is further configured to delete the record of the first transaction data in the first text when the verification result of the queried first transaction data is in the first state.
Based on the same concept, fig. 6 is a schematic diagram of a block chain network node structure for verifying transaction data written into a block chain according to an embodiment of the present invention. As shown in fig. 6, the blockchain network node for verification of transaction data written to the blockchain includes.
A receiving module 601, configured to receive a verification request of first transaction data, where the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the first transaction data is received by the blockchain network; the first node is any node in the block chain network;
a generating module 602, configured to generate the first address identifier corresponding to the first transaction data after the receiving module receives the first transaction data.
A query module 603, configured to query, according to the first address identifier, whether the blockchain of the blockchain network node stores the first transaction data; if the first transaction data is stored, sending a verification result of a first state; and if the first transaction data is not stored, sending a verification result of a second state.
A sending module 604, configured to send a verification result of the first transaction data.
Preferably, the receiving module is further configured to receive the first transaction data.
Preferably, the sending module is further configured to send the first address identifier.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (14)

1. A method for verifying transaction data written to a blockchain, comprising:
sending a verification request of first transaction data to a first node in a blockchain network, wherein the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
receiving a verification result sent by the first node, wherein the verification result indicates that the block chain of the first node contains the first transaction data when the verification result is first state information, and the verification result indicates that the block chain of the first node does not contain the first transaction data when the verification result is second state information;
and if the verification result of the first transaction data is second state information, retransmitting the first transaction data to the blockchain network.
2. The method of claim 1, wherein prior to sending the request for verification of the first transaction data to the first node in the blockchain network, further comprising:
receiving the first transaction data sent by an application and storing the first transaction data;
and sending the first transaction data to the blockchain network and receiving the first address identifier corresponding to the first transaction data fed back by the blockchain network.
3. The method of claim 2, wherein storing the first transaction data comprises:
storing the first transaction data, generating a first storage identifier of the first transaction data, and recording the first storage identifier to a first text;
after receiving the first address identifier corresponding to the first transaction data fed back by the blockchain network, the method further includes:
recording the first address in an area corresponding to the first storage identifier;
after receiving the verification result of the first transaction data sent by the first node, the method further includes:
and recording the verification result of the first transaction data in the area corresponding to the first storage identifier.
4. The method of claim 3, wherein resending the first transaction data to the blockchain network if the verification result of the first transaction data is the second status information comprises:
and inquiring the first text, if the verification result of the first transaction data is in a second state, acquiring the first transaction data from a storage area according to the first storage identifier, and resending the first transaction data to the blockchain network.
5. The method of claim 3, further comprising:
and inquiring the first text, and if the verification result of the first transaction data is in a first state, deleting the record of the first transaction data in the first text.
6. A method for verifying transaction data written to a blockchain, comprising:
a first node in a blockchain network receives a verification request of first transaction data, wherein the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
according to the first address identification, the first node inquires whether the first transaction data is stored in a block chain of the first node;
if the first transaction data is stored, sending a verification result of a first state; and if the first transaction data is not stored, sending a verification result of a second state.
7. The method of claim 6, wherein prior to the first node in the blockchain network receiving the request for verification of the first transaction data, further comprising:
a second node in the blockchain network receives the first transaction data; the second node is any node in the block chain network;
and the second node generates the first address identification corresponding to the first transaction data and sends the first address identification.
8. A data verification terminal for verifying transaction data written to a blockchain, comprising:
a sending module, configured to send a verification request for first transaction data to a first node in a blockchain network, where the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
a receiving module, configured to receive a verification result sent by the first node, where the verification result indicates that the first node includes the first transaction data when the verification result is first state information, and the verification result indicates that the first node does not include the first transaction data when the verification result is second state information;
the sending module is further configured to resend the first transaction data to the blockchain network if the verification result of the first transaction data is the second state information.
9. The data validation peer of claim 8, further comprising a storage module,
the receiving module is further configured to receive the first transaction data sent by the application, and receive a first address identifier corresponding to the first transaction data fed back by the blockchain network;
the storage module is used for storing the first transaction data after the receiving module receives the first transaction data;
the sending module is further configured to send the first transaction data to the blockchain network.
10. The data validation peer of claim 8, further comprising a logging module,
the recording module is used for recording a first storage identification corresponding to the first transaction data into a first text; after receiving the first address identification and the verification result corresponding to the first transaction data fed back by the blockchain network, recording the first address identification and the verification result corresponding to the first transaction data fed back by the blockchain network into an area corresponding to the first storage identification in a first text.
11. The data validation peer of claim 8, further comprising a query module,
the query module is configured to query a first text, and if the verification result of the first transaction data is in the second state, notify the sending module to resend the first transaction data to the blockchain network.
12. The data validation peer of claim 11, comprising:
the query module is further configured to delete the record of the first transaction data in the first text when the verification result of the queried first transaction data is in the first state.
13. A blockchain network node that verifies transaction data written to a blockchain, comprising:
a receiving module, configured to receive a verification request for first transaction data, where the verification request carries a first address identifier of the first transaction data, and the first address identifier is fed back when the blockchain network receives the first transaction data; the first node is any node in the block chain network;
the query module is used for querying whether the first transaction data is stored in the block chain of the block chain network node according to the first address identifier; if the first transaction data is stored, sending a verification result of a first state; if the first transaction data is not stored, sending a verification result of a second state;
and the sending module is used for sending the verification result of the first transaction data.
14. The blockchain network node of claim 13, further comprising a generation module,
the receiving module is further used for receiving the first transaction data;
the generating module is configured to generate the first address identifier corresponding to the first transaction data after the receiving module receives the first transaction data;
the sending module is further configured to send the first address identifier.
CN201610806550.1A 2016-09-06 2016-09-06 Verification method and device for transaction data written into block chain Active CN106372868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610806550.1A CN106372868B (en) 2016-09-06 2016-09-06 Verification method and device for transaction data written into block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610806550.1A CN106372868B (en) 2016-09-06 2016-09-06 Verification method and device for transaction data written into block chain

Publications (2)

Publication Number Publication Date
CN106372868A CN106372868A (en) 2017-02-01
CN106372868B true CN106372868B (en) 2020-02-18

Family

ID=57899317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610806550.1A Active CN106372868B (en) 2016-09-06 2016-09-06 Verification method and device for transaction data written into block chain

Country Status (1)

Country Link
CN (1) CN106372868B (en)

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878000B (en) * 2017-03-06 2020-02-21 中钞信用卡产业发展有限公司杭州区块链技术研究院 Alliance chain consensus method and system
CN106899680B (en) * 2017-03-09 2019-07-30 深圳壹账通智能科技有限公司 The fragment treating method and apparatus of multi-tiling chain
CN111612468B (en) * 2017-03-24 2024-03-19 创新先进技术有限公司 Method and device for transmitting transaction information and identifying consensus
CN106991607B (en) * 2017-03-29 2020-04-10 杭州溪塔科技有限公司 Disordered transaction control method based on block chain account model
US10742393B2 (en) * 2017-04-25 2020-08-11 Microsoft Technology Licensing, Llc Confidentiality in a consortium blockchain network
CN107395665B (en) 2017-05-22 2020-04-24 创新先进技术有限公司 Block chain service acceptance and service consensus method and device
CN110709872B (en) * 2017-05-22 2024-06-07 区块链控股有限公司 Constraint injection for unlocking transaction bytecodes
WO2018224955A1 (en) * 2017-06-07 2018-12-13 nChain Holdings Limited Computer-implemented system and method for managing large blocks over a blockchain network
CN107103537B (en) * 2017-06-20 2021-01-22 北京汇通金财信息科技有限公司 Block chain-based digital asset transaction method and system
CN107423124A (en) * 2017-07-27 2017-12-01 中链科技有限公司 A kind of method for being used to carry out transaction data parallel processing
CN107481011A (en) * 2017-08-11 2017-12-15 杭州秘猿科技有限公司 A kind of transaction rapid acknowledgment method based on license chain
WO2019106006A1 (en) * 2017-12-01 2019-06-06 Quant Network Ltd. Blockchain communications and ordering
CN108111528A (en) * 2017-12-29 2018-06-01 中链科技有限公司 A kind of anti-phishing method and system based on block chain
CN108647964B (en) * 2018-05-02 2023-07-28 郑杰骞 Block chain data processing method and device and computer readable storage medium
CN108769142B (en) * 2018-05-11 2021-08-10 中国联合网络通信集团有限公司 Transaction information processing method and block generation node
CN108765683A (en) * 2018-05-23 2018-11-06 栾友祥 A kind of ballot system based on block chain technology
CN110661610B (en) * 2018-06-29 2020-11-03 创新先进技术有限公司 Input acquisition method and device of secure multi-party computing protocol
CN108876377A (en) * 2018-07-06 2018-11-23 杭州复杂美科技有限公司 A kind of method and system for preventing from repeating to pay
CN110866260A (en) * 2018-08-28 2020-03-06 樊华 Project operation management system and method
CN109462631B (en) * 2018-08-31 2021-11-19 腾讯科技(深圳)有限公司 Data processing method, data processing device, storage medium and electronic device
CN109492049B (en) * 2018-09-21 2021-05-04 上海点融信息科技有限责任公司 Data processing, block generation and synchronization method for block chain network
CN111008222A (en) * 2018-10-08 2020-04-14 顺丰科技有限公司 Data state query method and device
CN110430197A (en) * 2019-08-08 2019-11-08 王小聪 A kind of transaction data synchronization method of block chain network
CN111199485A (en) * 2020-01-02 2020-05-26 支付宝(杭州)信息技术有限公司 Method and device for processing transaction data at block chain nodes
CN111447238A (en) * 2020-04-13 2020-07-24 夏彬彬 Data sharing system based on block chain
CN111526154A (en) * 2020-04-30 2020-08-11 余伟霞 Service data sharing system based on block chain network
CN111585767B (en) * 2020-04-30 2023-04-07 卓尔智联(武汉)研究院有限公司 Data exchange method and device for main chain and side chain
CN113627938B (en) * 2021-08-24 2024-05-28 上海点融信息科技有限责任公司 Data deleting method, device and equipment of block chain and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856511A (en) * 2012-11-30 2014-06-11 腾讯科技(深圳)有限公司 Data packet upload method, client terminal, nodes, information server and system
CN105656769A (en) * 2014-11-11 2016-06-08 阿里巴巴集团控股有限公司 Service data processing method, apparatus and system
CN105808325A (en) * 2016-03-03 2016-07-27 布比(北京)网络技术有限公司 Data processing method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856511A (en) * 2012-11-30 2014-06-11 腾讯科技(深圳)有限公司 Data packet upload method, client terminal, nodes, information server and system
CN105656769A (en) * 2014-11-11 2016-06-08 阿里巴巴集团控股有限公司 Service data processing method, apparatus and system
CN105808325A (en) * 2016-03-03 2016-07-27 布比(北京)网络技术有限公司 Data processing method and apparatus

Also Published As

Publication number Publication date
CN106372868A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
CN106372868B (en) Verification method and device for transaction data written into block chain
CN106453415B (en) Block chain-based equipment authentication method, authentication server and user equipment
CN109257427B (en) Service processing method and system based on block chain
US11025714B2 (en) System and method for announcing cryptographic keys on a blockchain
US20200127825A1 (en) Revocation of cryptographic keys in the absence of a trusted central authority
CN110177124B (en) Identity authentication method based on block chain and related equipment
CN102332127A (en) Network TV (television) online payment service based account binding method and payment method
CN108900561A (en) The method, apparatus and system of single-sign-on
CN110458673A (en) Bidding system, equipment and computer readable storage medium based on block chain
CN111541715B (en) Method and device for improving communication between traffic signal control machine and upper computer
CN111612456A (en) Expired digital certificate management and control method, system, device and storage medium
CN111211911A (en) Collaborative signature method, device, equipment and system
CN108985409B (en) Identity card information reading method and device and electronic equipment
CN111092729A (en) Electronic signature and seal verification method and device
CN105187399A (en) Resource processing method and device
CN107577700A (en) The processing method and processing device of database disaster tolerance
CN112751878B (en) Page request processing method and device
CN108632037A (en) The public-key process method and device of Public Key Infrastructure
TW201521844A (en) Method and system for requesting information and computer-readable storage medium
CN110958598A (en) Binding authentication method and device for mobile terminal and SIM card
CN111698204B (en) Bidirectional identity authentication method and device
CN112182009A (en) Data updating method and device of block chain and readable storage medium
CN110618989B (en) Information processing method, information processing device and related products
CN109327475B (en) Multi-layer identity authentication method, device, equipment and storage medium
CN114554251B (en) Multimedia data requesting method and device, storage medium and electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant