CN109308211B - Method, apparatus and storage medium for processing transaction data in a blockchain - Google Patents

Method, apparatus and storage medium for processing transaction data in a blockchain Download PDF

Info

Publication number
CN109308211B
CN109308211B CN201811054272.4A CN201811054272A CN109308211B CN 109308211 B CN109308211 B CN 109308211B CN 201811054272 A CN201811054272 A CN 201811054272A CN 109308211 B CN109308211 B CN 109308211B
Authority
CN
China
Prior art keywords
event
data
timestamp
transaction data
transaction
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
CN201811054272.4A
Other languages
Chinese (zh)
Other versions
CN109308211A (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.)
Shanghai Dianrong Information Technology Co ltd
Original Assignee
Shanghai Dianrong Information Technology 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 Shanghai Dianrong Information Technology Co ltd filed Critical Shanghai Dianrong Information Technology Co ltd
Priority to CN201811054272.4A priority Critical patent/CN109308211B/en
Publication of CN109308211A publication Critical patent/CN109308211A/en
Application granted granted Critical
Publication of CN109308211B publication Critical patent/CN109308211B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • 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/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An embodiment of the present invention provides a method for processing transaction data in a blockchain, comprising: receiving first transaction data from a first block link point, wherein the first transaction data is stored in an exclusive account book of a block link sub-chain to which the first block link point belongs; acquiring a first event number based on the first transaction data; acquiring a first event abstract associated with a first event number from a public ledger of a block chain according to the first event number; generating a second event summary according to the first event data; and verifying whether the first transaction data was modified by comparing the first event digest with the second event digest, wherein the first event digest and the second event digest are not equal to indicate that the first transaction data was modified.

Description

Method, apparatus and storage medium for processing transaction data in a blockchain
Technical Field
Embodiments of the present invention relate to a blockchain network technology, and more particularly, to a method for processing transaction data in a blockchain, an apparatus for performing the above method for processing transaction data in a blockchain, and a corresponding computer-readable storage medium.
Background
Blockchains (Blockchain) are intelligent peer-to-peer networks that use Blockchain databases to identify, spread, and document information, also known as value internet. The block chain technology comprises the steps of storing data in a block structure, guaranteeing transmission and access safety by using cryptography and the like, and can realize a technical system of data consistency storage, tamper resistance and decentration.
An intelligent contract is a computer protocol intended to propagate, verify, or execute contracts in an informational manner that can be represented as a computer program that runs exactly on a blockchain. The user terminal can transact by using the intelligent contract, share data, establish trust, ensure the storage and reading of the data by the characteristics of the blockchain technology, and perform the whole process to be transparently traceable and not to be tampered.
Disclosure of Invention
A first aspect of an embodiment of the invention provides a method for processing transactional data in a blockchain, the method comprising:
receiving first transaction data from a first block link point, wherein the first transaction data is stored in an exclusive book of a block link child chain to which the first block link point belongs;
acquiring a first event number based on the first transaction data;
acquiring a first event abstract associated with the first event number from a public ledger of the block chain according to the first event number;
generating a second event summary according to the first event data; and
verifying whether the first transaction data was modified by comparing the first event digest to the second event digest, wherein the first event digest and the second event digest are not equal to indicate that the first transaction data was modified.
Furthermore, a second aspect of embodiments of the present invention provides a method for processing transactional data in a blockchain, the method comprising:
receiving a first transaction request at a first block link point;
storing first transaction data associated with the first transaction request in an exclusive book of a blockchain child chain to which the first blockchain link point belongs, wherein the first transaction data comprises an event number and transaction details; and
and storing the event number and the event abstract in a public ledger of the block chain, wherein the event abstract is generated according to the transaction details.
Furthermore, a third aspect of embodiments of the present invention provides an apparatus for processing transactional data in a blockchain, the apparatus comprising:
a processor; and
a memory for storing instructions that, when executed, cause the processor to:
receiving first transaction data from a first block link point, wherein the first transaction data is stored in an exclusive book of a block link child chain to which the first block link point belongs;
acquiring a first event number based on the first transaction data;
acquiring a first event abstract associated with the first event number from a public ledger of the block chain according to the first event number;
generating a second event summary according to the first event data; and
verifying whether the first transaction data was modified by comparing the first event digest to the second event digest, wherein the first event digest and the second event digest are not equal to indicate that the first transaction data was modified.
Furthermore, a fourth aspect of embodiments of the present invention provides an apparatus for processing transactional data in a blockchain, the apparatus comprising:
a processor; and
a memory for storing instructions that, when executed, cause the processor to:
receiving a first transaction request at a first block link point;
storing first transaction data associated with the first transaction request in an exclusive book of a blockchain child chain to which the first blockchain link point belongs, wherein the first transaction data comprises an event number and transaction details; and
and storing the event number and the event abstract in a public ledger of the block chain, wherein the event abstract is generated according to the transaction details.
Furthermore, embodiments of the present invention also provide a computer-readable storage medium having stored thereon computer-readable program instructions for executing the method for processing transaction data in a blockchain according to the foregoing embodiments of the present invention.
By the method for processing the transaction data in the blockchain, the device for processing the transaction data in the blockchain and the corresponding computer-readable storage medium, which are provided by the embodiment of the invention, the block chain node which obtains the previously generated data in the subsequent transaction as the transaction without data access right when the transaction occurs and needs to perform authenticity verification on the previously generated data can perform authenticity verification on the transaction data which does not have the access right according to the event number and the event abstract stored on the common ledger, so that the transparency and the reliability of the data in the whole blockchain network are improved. Other advantages of the present invention will be further described below.
Drawings
The features, advantages and other aspects of various embodiments of the present invention will become more apparent by referring to the following detailed description in conjunction with the accompanying drawings, in which several embodiments of the invention are shown by way of illustration and not limitation, wherein:
fig. 1 shows a network architecture diagram 100 of a blockchain network in which the proposed method can be implemented according to an embodiment of the invention;
FIG. 2 illustrates a flow diagram of a proposed method 200 for processing transactional data in a blockchain in accordance with one embodiment of the invention;
FIG. 3 illustrates a flow diagram of a proposed method 300 for processing transactional data in a blockchain in accordance with another embodiment of the invention;
FIG. 4 is a diagram illustrating an apparatus 400 for processing transaction data in a blockchain according to an embodiment of the present invention; and
fig. 5 is a diagram illustrating an apparatus 500 for processing transaction data in a blockchain according to another embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present invention are described in detail below with reference to the accompanying drawings. Although the exemplary methods, apparatus, and devices described below include software and/or firmware executed on hardware among other components, it should be noted that these examples are merely illustrative and should not be considered as limiting. For example, it is contemplated that any or all of the hardware, software, and firmware components could be embodied exclusively in hardware, exclusively in software, or in any combination of hardware and software. Thus, while the following describes example methods and apparatus, persons of ordinary skill in the art will readily appreciate that the examples provided are not intended to limit the manner in which the methods and apparatus may be implemented.
Furthermore, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of the present invention. It should be noted that the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The terms "first," "second," and the like in this summary are used merely to describe a reference, an object, or something specific, and are not to be construed as indicating or implying relative importance, or implicitly indicating the number of technical features indicated.
The term "at least one" in the context of the present invention means one or more than one.
The term "digital voucher" in the context of the present invention refers to various financial value vouchers, such as accounts receivable vouchers, stock vouchers, equity vouchers, or rights of return vouchers, presented on a blockchain.
The term "digital voucher identification information" in the context of the present invention refers to information by which a digital voucher can be uniquely matched, such as the ID, serial number, etc. of the digital voucher.
The term "transaction data" in the context of the present invention refers to data generated when a transaction occurs, which is stored in an exclusive book of a block chain child in which a transaction initiator node and a transaction receiver node are located.
The term "dedicated account book" in the present disclosure refers to an account book that is maintained together by block link points included in a block link sub-chain in which a transaction initiator node and a transaction receiver node of a transaction occur. For the dedicated account, the block link points except the block link points included in the block link sub-chain have no access right.
The term "common ledger" in the context of the present invention refers to a ledger in which all block link points belonging to the block chain are maintained together. Of course, the block link point that previously had access to the private ledger has access to the public ledger, and the block link nodes other than the block link points included in the block link sub-chain also have access.
The term "event number" in the context of the present invention refers to the number of one or more events generated when a transaction occurs, and the number of each event is unique, so that an event number can be accurately associated with associated data, and thus an event digest corresponding to the event number can be found from a public ledger and the associated event digest can be calculated from the data corresponding to the event number.
The term "transaction initiator" in the context of the present invention refers to a client that can initiate a transaction over a blockchain network through blockchain nodes. The term "transaction recipient" in the context of the present invention refers to a client that can receive transactions over a blockchain network through blockchain nodes.
The term "transaction initiator node" in the context of the present invention refers to a blockchain link point that receives a transaction request from a client and initiates a transaction on a blockchain network; and the term "transaction receiver node" in the context of the present invention refers to a block link node that receives a transaction initiated by a "transaction initiator node".
As described above, in a multi-party participating blockchain application scenario, balancing between data distribution and privacy protection has always been a problem to be solved. Taking supply chain finance as an example, due to the limitations of the data access rights of the sponsor, the sponsor can only view other transaction information associated with the digital voucher when the credited voucher initiates a cash-out request. And the digital certificate representing the receivable can not be confirmed whether the digital certificate has access right when being issued or transferred. Therefore, in the case of unencrypted data, the sponsor can only obtain the flow record of the consolidated accounts receivable voucher but cannot obtain the flow record of each time because the time point of confirmation of the data access authority of the sponsor lags behind the time point of data generation.
To solve the above technical problem and potentially other technical problems, the inventors of the present invention have innovatively proposed a block-chain two-layer data distribution model to solve the existing problem between on-chain data privacy protection and data distribution. Specifically, when a transaction occurs on any chain on the chain, an abstract of the transaction is generated, and transaction content of the occurring transaction comprises a transaction number and transaction details, wherein the transaction details comprise details such as a transaction initiator, a transaction receiver and specific transaction amount; the transaction digest is generated by applying a cryptographic technique, such as a hash value, and the transaction digest can be used as a verification means for verifying whether the original data is modified. When a transaction occurs, the transaction number and the transaction abstract are sent to all nodes of the block chain, for example, in a point-to-point mode or a broadcast mode; at the same time, the transaction details are distributed only to the respective blockchain nodes that currently have access rights. When data needs to be verified, for example, after a transaction is completed, the transaction information is sent to the block chain link point which does not have access right before alone or in combination with other transaction information, and at this time, the transaction number and the transaction details corresponding to the transaction number need to be sent to the block chain link point. The block link point will inquire the transaction abstract corresponding to the corresponding transaction number in the public ledger according to the transaction number, compare the transaction abstract with the newly calculated transaction abstract, and judge whether the data is modified according to the comparison result, for example: if the two are not consistent, the authenticity of the transaction information is questionable.
Fig. 1 is a schematic diagram 100 of a network architecture of a blockchain network in which the proposed method can be implemented according to an embodiment of the present invention. As can be seen from fig. 1, the blockchain network 100 includes, but is not limited to, blockchain nodes (also referred to as terminals) 101, 102, 103, 104, 105, 106, 107, 108, and 109 connected by a network, wherein the blockchain nodes 101, 103, 104 are connected to other blockchain terminals by a wireless network, and the blockchain nodes 102, 105, 106, 107, 108 and the blockchain nodes 109 are connected to other blockchain terminals by a wired network.
In AN application scenario according to the present invention, a transaction initiator needs to initiate a discount request to a transaction receiver, specifically, for example, a client a needs to initiate a discount request to a client B, where the client a is associated with a block link point 102 and the client B is associated with a block link point 105, at this time, discount data associated with the discount request, for example, data related to a certain digital certificate with AN asset number of AN80580268, such as a previous circulation record, can be included in the discount request, and in the application scenario, the block link point 105 does not have access right to the data related to the digital certificate with the asset number of AN80580268 before. After receiving the transfer request, the blockchain node 102 sends the data related to the digital voucher with the asset number of AN80580268 to the blockchain node 105, and after receiving the data related to the digital voucher with the asset number of AN80580268, the blockchain node 105 analyzes that the data includes several specific circulation records, that is, several transactions occur, and assumes that the data includes two circulation records, for example, the digital voucher with the asset number of AN80580268 is firstly circulated from the client C to the client D, and then the second circulation record displays and is circulated from the client D to the client a. The first transaction number is TN00055285 and the second transaction number is TN 00055298. The information such as the flow records is only stored in the exclusive account of the block chain sub-chain consisting of the block chain link point 102, the block chain link point 108 and the block chain link point 109. At this time, the block link node 105 obtains the data related to the digital certificate with asset number AN80580268, then the block link node 105 obtains the transaction digest associated with the transaction number TN00055285 from the public ledger of the block link, and then calculates a transaction digest from the data related to the transaction number TN00055285 in the data related to the digital certificate with asset number AN80580268, and compares the two transaction digests to determine whether the data related to the transaction number TN00055285 in the data related to the digital certificate with asset number AN80580268 is modified, i.e., to determine the authenticity of the data.
Similarly, after block link point 105 obtains the data related to the digital certificate with asset number AN80580268, block link point 105 obtains the transaction digest associated with transaction number TN00055298 from the public ledger of the block chain, calculates a transaction digest from the data related to the digital certificate with asset number AN80580268 and the data related to transaction number TN00055298, compares the two transaction digests to determine whether the data related to transaction number TN00055298 in the data related to the digital certificate with asset number AN80580268 is modified, i.e., determines the authenticity of the data.
The application scenario is not limited to the supply chain financial field, but can also be applied to the asset securitization field, for example, so that a new block link point such as a fund side can acquire historical transaction information of a digital certificate associated with a certain asset and can make a judgment on whether the historical transaction information is modified or not.
For another example, the inventive concept of the above method can also be applied to the field of transaction of valuables such as antiques, so that a new buyer on an antique auction can obtain information of a previous buyer of the antique to be auctioned, and can make a judgment on the authenticity of the information of the previous buyer.
The specific method steps in the above two application scenarios, i.e. the authenticity determination method, are similar to the supply chain finance example, so the specific process is not described herein again.
The action process of the proposed method for processing transaction data in a blockchain according to the present invention will be described below with reference to fig. 2 and 3.
Fig. 2 shows a flow diagram of a proposed method 200 for processing transactional data in a blockchain in accordance with an embodiment of the present disclosure. As can be seen from the figure, the method 200 for processing transaction data in a blockchain can comprise the steps of:
first, in a method step 210, first transaction data is received from a first block link point, wherein the first transaction data is stored in an exclusive book of a block link child chain to which the first block link point belongs; for example, block link point 105 can receive first transaction data from block link point 102, which is stored in a dedicated book of the block link child chain in which block link point 102, block link point 108, and block link point 109 are located.
Next, in a method step 220, a first event number is obtained based on the first transaction data, and the blockchain node 105 can obtain the first event number included in the first transaction data, for example, for use in subsequent processing;
then, in method step 230, a first event digest associated with the first event number is obtained from the public ledger of the blockchain according to the first event number, that is, for example, the blockchain node 105 can obtain the first event digest associated with the first event number from the public ledger of the blockchain network for subsequent comparison;
next, in method step 240, a second event summary is generated according to the first transaction data, for example, the blockchain node 105 calculates a second event summary according to the received portion of the first transaction data associated with the first event number for subsequent comparison; and
finally, in method step 250, it is verified whether the first transaction data was modified by comparing the first event digest with the second event digest, wherein the first event digest and the second event digest are not equal to indicate that the first transaction data was modified. In this way, the block chain node point which is used as a subsequent transaction without data access right when the transaction occurs and needs to be authenticated can authenticate the transaction data which does not have access right previously according to the event number and the event abstract stored on the common ledger, so that the transparency and the reliability of the data in the whole block chain network are improved.
In the above method, optionally, the first event summary and the second event summary being equal to each other indicate that the first transaction data has not been modified. Such a determination method is suitable when only digest value determination is introduced, and other determination means such as time determination may be introduced to further improve the accuracy of authenticity determination.
In some embodiments according to the present invention, the method can further include a step of verifying the transaction data with the second event number, and specifically, in some embodiments according to the present invention, the method can further include the following steps:
judging whether the first transaction data comprises data associated with at least one second event number, wherein the at least one second event number is different from the first event number;
acquiring the at least one second event number based on the first transaction data in a case where data associated with the at least one second event number is included in the first transaction data;
acquiring at least one third event abstract associated with the at least one second event number from a public ledger of the block chain according to the at least one second event number;
generating at least one fourth event summary according to a second part of data associated with the at least one second event number in the first transaction data; and
verifying whether the second portion of data is modified by comparing the at least one third event digest with the at least one fourth event digest, wherein the third event digest and the fourth event digest are not equal to indicate that the second portion of data of the first transaction data is modified. Thereby, it is possible to verify whether or not the second part of data included in the first transaction data is modified to determine whether or not it is modified.
Optionally, in some embodiments according to the invention, the at least one third event summary and the at least one fourth event summary being equal indicate that the second part of the first transaction data has not been modified. Such a determination method is suitable when only digest value determination is introduced, and other determination means such as time determination may be introduced to further improve the accuracy of authenticity determination.
In addition to the above described way of verifying by means of an event digest, the method can also comprise the technical means of time verification, i.e. in some embodiments according to the invention, the first transaction data comprises a first timestamp corresponding to a first event number and a second timestamp corresponding to one of the at least one second event number, and the public ledger comprises a third timestamp associated with the first event digest and a fourth timestamp associated with the at least one third event digest,
and wherein a time with a first timestamp later than the third timestamp exceeding a first threshold value indicates that the first portion of data of the first transaction data was modified, and a time with a second timestamp later than the fourth timestamp exceeding a second threshold value indicates that the second portion of data of the first transaction data was modified; and/or
The fact that the sequence of the first timestamp and the second timestamp is inconsistent with the sequence of the third timestamp and the fourth timestamp indicates that the first transaction data is modified.
Typically, the first timestamp should be earlier than the third timestamp and at least not later than the third timestamp corresponding thereto, but there is also a certain threshold tolerance, for example the first threshold can be, for example, 1 hour, 10 hours or 24 hours, but if this first threshold is exceeded, it can be concluded that the first part of the first transaction data has been modified. Similarly, in general, the second timestamp should be earlier than the fourth timestamp and at least not later than the fourth timestamp corresponding thereto, but there is also a certain threshold tolerance, for example, the second threshold can be, for example, 1 hour, 10 hours or 24 hours, but if the second threshold is exceeded, it can be concluded that the second part of the first transaction data has been modified.
In one embodiment according to the invention, the first transaction data comprises a first timestamp corresponding to a first event number and a second timestamp corresponding to one of the at least one second event number, and the public ledger comprises a third timestamp associated with the first event summary and a fourth timestamp associated with the at least one third event summary,
and wherein the following three conditions are satisfied simultaneously indicating that the first portion of data of the first transaction data has not been modified:
the first timestamp is earlier than the third timestamp;
the sequence of the first time stamp and the second time stamp is consistent with the sequence of the third time stamp and the fourth time stamp; and is
The first event summary is equal to the second event summary, and/or
The following three conditions are satisfied simultaneously, which indicates that the second part of the first transaction data is not modified:
the second timestamp is earlier than the fourth timestamp;
the sequence of the first time stamp and the second time stamp is consistent with the sequence of the third time stamp and the fourth time stamp; and is
The third event summary is equal to the fourth event summary.
Therefore, the authenticity of the data can be judged according to the abstract, and whether the data is modified or not can be additionally judged through the time stamps of the single affairs recorded in the public account book and the exclusive account book and the time sequence of different affairs, so that the difficulty of data tampering and counterfeiting is greatly improved, and the safety of the data, namely the tamper resistance is further improved.
In one embodiment according to the present invention, the second event digest is a hash value of a first portion of the first transaction data associated with the first event number. It should be understood by those skilled in the art that the hash value is only an alternative implementation form of the digest, and other processing methods capable of implementing the comparison function are also included in the protection scope of the appended claims.
Optionally, the first part of data includes transaction details, wherein the transaction details include a transaction initiator node, a transaction recipient node, and transaction information. Further preferably, the first part of data further includes the first event number. It is thereby possible to further ensure that the event number is not tampered with, together with verifying its authenticity by an event digest such as a hash value.
Fig. 3 shows a flow diagram of a proposed method 300 for processing transaction data in a blockchain according to yet another embodiment of the present disclosure. As can be seen from the figure, the method 300 for processing transaction data in a blockchain can include the steps of:
first, in method step 310, a first transaction request is received at a first block endpoint;
next, in a method step 320, first transaction data associated with the first transaction request is stored in an exclusive ledger of a block chain sub-chain to which the first block link point belongs, wherein the first transaction data comprises an event number and transaction details; and
finally, in method step 330, the event number and an event digest, which is generated from the transaction details, are stored in a public ledger of the blockchain.
In this way, by storing the transaction data including the transaction details in the exclusive ledger commonly maintained by the blockchain node currently having the access right, the event abstract and the event number associated with the data in the exclusive ledger are stored in the common ledger of the whole blockchain network, thereby realizing different types of processing, namely distribution, of the data, and further realizing the balance between data privacy protection and data distribution.
Furthermore, the method 300 for processing transaction data in a blockchain shown in fig. 3 can further include the following steps (not shown in fig. 3), namely:
and sending a second transaction request, wherein the second transaction request comprises the first transaction data.
In this way, the first transaction data can be sent to the new block chain node that did not have access right when the transaction occurred, so that the block chain node that did not have access right at that time can obtain this portion of data and verify its authenticity.
In some embodiments according to the invention, the transaction details include a transaction initiator node, a transaction recipient node and transaction information.
Further, alternatively, the above-described method can be implemented by a computer program product, i.e., a computer-readable storage medium. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for carrying out various aspects of the present disclosure. The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
In general, the various exemplary embodiments of this invention may be implemented in hardware or special purpose circuits, software, firmware, logic or any combination thereof. Certain aspects may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device. While various aspects of the embodiments of the invention may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that the blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
Fig. 4 shows a block diagram of an apparatus 400 for searching blockchain data according to an embodiment of the present disclosure. As can be seen in fig. 4, an apparatus 400 for searching blockchain data includes a processor 410 and a memory 420 coupled to the processor 410.
The memory 420 stores instructions. The instructions, when executed by the processor 410, cause the processor 410 to perform the following acts:
receiving first transaction data from a first block link point, wherein the first transaction data is stored in an exclusive book of a block link child chain to which the first block link point belongs;
acquiring a first event number based on the first transaction data;
acquiring a first event abstract associated with the first event number from a public ledger of the block chain according to the first event number;
generating a second event summary according to the first event data; and
verifying whether the first transaction data was modified by comparing the first event digest to the second event digest, wherein the first event digest and the second event digest are not equal to indicate that the first transaction data was modified.
Wherein optionally, in an embodiment according to the invention, the first transaction digest and the second transaction digest being equal represent that the first transaction data has not been modified.
In one embodiment consistent with the present invention, the instructions, when executed, further cause the processor 410 to:
judging whether the first transaction data comprises data associated with at least one second event number, wherein the at least one second event number is different from the first event number;
acquiring the at least one second event number based on the first transaction data in a case where data associated with the at least one second event number is included in the first transaction data;
acquiring at least one third event abstract associated with the at least one second event number from a public ledger of the block chain according to the at least one second event number;
generating at least one fourth event summary according to a second part of data associated with the at least one second event number in the first transaction data; and
verifying whether the second portion of data is modified by comparing the at least one third event digest with the at least one fourth event digest, wherein the third event digest and the fourth event digest are not equal to indicate that the second portion of data of the first transaction data is modified.
Optionally, in an embodiment according to the present invention, that the at least one third event summary is equal to the at least one fourth event summary indicates that the second part of the first transaction data is not modified.
Wherein optionally in one embodiment according to the invention the first transaction data comprises a first timestamp corresponding to a first event number and a second timestamp corresponding to one of the at least one second event number, and the public ledger comprises a third timestamp associated with the first event summary and a fourth timestamp associated with the at least one third event summary,
and wherein a time with a first timestamp later than the third timestamp exceeding a first threshold value indicates that the first portion of data of the first transaction data was modified, and a time with a second timestamp later than the fourth timestamp exceeding a second threshold value indicates that the second portion of data of the first transaction data was modified; and/or
The fact that the sequence of the first timestamp and the second timestamp is inconsistent with the sequence of the third timestamp and the fourth timestamp indicates that the first transaction data is modified.
Wherein optionally in one embodiment according to the invention the first transaction data comprises a first timestamp corresponding to a first event number and a second timestamp corresponding to one of the at least one second event number, and the public ledger comprises a third timestamp associated with the first event summary and a fourth timestamp associated with the at least one third event summary,
and wherein the following three conditions are satisfied simultaneously indicating that the first portion of data of the first transaction data has not been modified:
the first timestamp is earlier than the third timestamp;
the sequence of the first time stamp and the second time stamp is consistent with the sequence of the third time stamp and the fourth time stamp; and is
The first event summary is equal to the second event summary, and/or
The following three conditions are satisfied simultaneously, which indicates that the second part of the first transaction data is not modified:
the second timestamp is earlier than the fourth timestamp;
the sequence of the first time stamp and the second time stamp is consistent with the sequence of the third time stamp and the fourth time stamp; and is
The third event summary is equal to the fourth event summary.
Optionally, in an embodiment according to the present invention, the second event digest is a hash value of a first part of the first transaction data associated with the first event number.
Optionally, in an embodiment according to the present invention, the first part of data includes transaction details, where the transaction details include a transaction initiator node, a transaction receiver node, and transaction information.
Optionally, in an embodiment according to the present invention, the first part of data further includes the first event number.
The memory 420 can also store other instructions. These instructions, when executed by the processor 410, cause the processor 410 to perform the following acts:
receiving a first transaction request at a first block link point;
storing first transaction data associated with the first transaction request in an exclusive book of a blockchain child chain to which the first blockchain link point belongs, wherein the first transaction data comprises an event number and transaction details; and
and storing the event number and the event abstract in a public ledger of the block chain, wherein the event abstract is generated according to the transaction details.
Optionally, in an embodiment according to the present invention, the instructions when executed further cause the processor to:
and sending a second transaction request, wherein the second transaction request comprises the first transaction data.
Optionally, in an embodiment according to the present invention, the transaction details include a transaction initiator node, a transaction receiver node, and transaction information.
Fig. 5 shows a schematic block diagram of a proposed apparatus 500 according to an embodiment of the present disclosure. It should be understood that the apparatus 500 may be implemented to implement the functions of the method 200 for processing transaction data in a blockchain proposed according to another embodiment of the present invention in fig. 2 or the method 300 for processing transaction data in a blockchain proposed according to one embodiment of the present invention in fig. 3. As can be seen in fig. 5, the apparatus 500 includes a Central Processing Unit (CPU)501 (e.g., a processor) that can perform various suitable actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM)502 or loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the apparatus 500 can also be stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the apparatus 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the apparatus 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
Various methods described above, such as the method 200 for processing transaction data in a blockchain proposed according to an embodiment of the present invention or the method 300 for processing transaction data in a blockchain proposed according to an embodiment of the present invention, can be executed by the processing unit 501. For example, in some embodiments, the method 200 for processing transactional data in a blockchain or the method 300 for processing transactional data in a blockchain may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the apparatus 500 via the ROM 502 and/or the communication unit 509. When loaded into RAM 503 and executed by processor CPU 501, may perform one or more of the actions or steps of method 200 for processing transaction data in a blockchain proposed according to one embodiment of the present invention or method 300 for processing transaction data in a blockchain proposed according to one embodiment of the present invention described above.
In general, the various exemplary embodiments of this invention may be implemented in hardware or special purpose circuits, software, firmware, logic or any combination thereof. Certain aspects may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device. While various aspects of the embodiments of the invention may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that the blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
Although the various exemplary embodiments of the present invention are described above as being implemented in hardware or in dedicated circuitry, the data processing apparatus for blockchains described above may be implemented in either hardware or software, because: in the 90's of the 20 th century, a technological improvement could easily be either a hardware improvement (e.g., an improvement in the structure of a circuit such as a diode, a transistor, a switch, etc.) or a software improvement (e.g., an improvement in the process flow). However, as the technology continues to develop, many of the current method flow improvements can be almost realized by programming the improved method flow into the hardware circuit, in other words, by programming different programs for the hardware circuit to obtain the corresponding hardware circuit structure, i.e. realizing the change of the hardware circuit structure, so that such method flow improvements can also be regarded as direct improvements of the hardware circuit structure. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by a user programming the Device. A digital system is "integrated" on a piece of programmable logic device by the designer's own programming without requiring the chip manufacturer to design and fabricate application specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler 1 er" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one kind, but many kinds, such as abel (advanced Boolean Expression Language), ahdl (advanced Hardware Description Language), communication, pl (core unity Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, HDL, pamm, hard Language (Hardware Description Language), and vhigh Language (Hardware Description Language), which are currently used in the most popular fields. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
Computer-readable program instructions or computer program products for performing aspects of the present disclosure may also be stored in the cloud, and when a call is needed, a user may access the computer-readable program instructions stored in the cloud for performing aspects of the present disclosure through a mobile internet, a fixed network, or other networks, so as to implement the technical solutions disclosed in the aspects of the present disclosure.
The above description is only an alternative embodiment of the present disclosure, and is not intended to limit the present disclosure, and various modifications and changes may be made to the present disclosure by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
While embodiments of the invention have been described with reference to several particular embodiments, it is to be understood that embodiments of the invention are not limited to the specific embodiments disclosed. The embodiments of the invention are intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims (19)

1. A method for processing transactional data in a block link point of a block chain, the method comprising:
receiving first transaction data from a first block link point, wherein the first transaction data is stored in an exclusive ledger of a block link sub-chain to which the first block link point belongs, the block link node having no access right to the exclusive ledger;
acquiring a first event number based on the first transaction data;
acquiring a first event abstract associated with the first event number from a public ledger of the block chain according to the first event number;
generating a second event summary according to the first event data; and
verifying whether the first transaction data was modified by comparing the first event digest to the second event digest, wherein the first event digest and the second event digest are not equal to indicate that the first transaction data was modified.
2. The method of claim 1, wherein the first event digest being equal to the second event digest indicates that the first transaction data has not been modified.
3. The method of claim 1, further comprising:
judging whether the first transaction data comprises data associated with at least one second event number, wherein the at least one second event number is different from the first event number;
acquiring the at least one second event number based on the first transaction data in a case where data associated with the at least one second event number is included in the first transaction data;
acquiring at least one third event abstract associated with the at least one second event number from a public ledger of the block chain according to the at least one second event number;
generating at least one fourth event summary according to a second part of data associated with the at least one second event number in the first transaction data; and
verifying whether the second portion of data is modified by comparing the at least one third event digest with the at least one fourth event digest, wherein the third event digest and the fourth event digest are not equal to indicate that the second portion of data of the first transaction data is modified.
4. The method of claim 3, wherein the at least one third event digest and the at least one fourth event digest being equal represent that the second portion of data of the first transaction data has not been modified.
5. The method of claim 3, wherein the first transaction data includes a first timestamp corresponding to a first event number and a second timestamp corresponding to one of the at least one second event number, and wherein the public ledger includes a third timestamp associated with the first event digest and a fourth timestamp associated with the at least one third event digest,
and wherein a first timestamp having a time later than the third timestamp exceeding a first threshold indicates that a first portion of the first transaction data was modified, and a second timestamp having a time later than the fourth timestamp exceeding a second threshold indicates that the second portion of the first transaction data was modified; and/or
The fact that the sequence of the first timestamp and the second timestamp is inconsistent with the sequence of the third timestamp and the fourth timestamp indicates that the first transaction data is modified.
6. The method of claim 3, wherein the first transaction data includes a first timestamp corresponding to a first event number and a second timestamp corresponding to one of the at least one second event number, and wherein the public ledger includes a third timestamp associated with the first event digest and a fourth timestamp associated with the at least one third event digest,
and wherein the following three conditions are satisfied simultaneously to indicate that the first part of the first transaction data has not been modified:
the first timestamp is earlier than the third timestamp;
the sequence of the first time stamp and the second time stamp is consistent with the sequence of the third time stamp and the fourth time stamp; and is
The first event summary is equal to the second event summary, and/or
The following three conditions are satisfied simultaneously, which indicates that the second part of the first transaction data is not modified:
the second timestamp is earlier than the fourth timestamp;
the sequence of the first time stamp and the second time stamp is consistent with the sequence of the third time stamp and the fourth time stamp; and is
The third event summary is equal to the fourth event summary.
7. The method of claim 1, wherein the second event digest is a hash value of a first portion of the first transaction data associated with the first event number.
8. The method of claim 7, wherein the first portion of data comprises transaction details, wherein the transaction details comprise a transaction initiator node, a transaction recipient node, and transaction information.
9. The method of claim 8, wherein the first portion of data further comprises the first event number.
10. An apparatus for processing transactional data in a block link point of a block chain, the apparatus comprising:
a processor; and
a memory for storing instructions that, when executed, cause the processor to:
receiving first transaction data from a first block link point, wherein the first transaction data is stored in an exclusive ledger of a block link sub-chain to which the first block link point belongs, the block link node having no access right to the exclusive ledger;
acquiring a first event number based on the first transaction data;
acquiring a first event abstract associated with the first event number from a public ledger of the block chain according to the first event number;
generating a second event summary according to the first event data; and
verifying whether the first transaction data was modified by comparing the first event digest to the second event digest, wherein the first event digest and the second event digest are not equal to indicate that the first transaction data was modified.
11. The apparatus of claim 10, wherein the first event digest being equal to the second event digest indicates that the first transaction data has not been modified.
12. The apparatus of claim 10, the instructions when executed further causing the processor to:
judging whether the first transaction data comprises data associated with at least one second event number, wherein the at least one second event number is different from the first event number;
acquiring the at least one second event number based on the first transaction data in a case where data associated with the at least one second event number is included in the first transaction data;
acquiring at least one third event abstract associated with the at least one second event number from a public ledger of the block chain according to the at least one second event number;
generating at least one fourth event summary according to a second part of data associated with the at least one second event number in the first transaction data; and
verifying whether the second portion of data is modified by comparing the at least one third event digest with the at least one fourth event digest, wherein the third event digest and the fourth event digest are not equal to indicate that the second portion of data of the first transaction data is modified.
13. The apparatus of claim 12, wherein the at least one third event digest and the at least one fourth event digest being equal represent that the second portion of data of the first transaction data has not been modified.
14. The apparatus of claim 12, wherein the first transaction data includes a first timestamp corresponding to a first event number and a second timestamp corresponding to one of the at least one second event number, and the public ledger includes a third timestamp associated with the first event digest and a fourth timestamp associated with the at least one third event digest,
and wherein a first timestamp having a time later than the third timestamp exceeding a first threshold indicates that a first portion of the first transaction data was modified, and a second timestamp having a time later than the fourth timestamp exceeding a second threshold indicates that the second portion of the first transaction data was modified; and/or
The fact that the sequence of the first timestamp and the second timestamp is inconsistent with the sequence of the third timestamp and the fourth timestamp indicates that the first transaction data is modified.
15. The apparatus of claim 12, wherein the first transaction data includes a first timestamp corresponding to a first event number and a second timestamp corresponding to one of the at least one second event number, and the public ledger includes a third timestamp associated with the first event digest and a fourth timestamp associated with the at least one third event digest,
and wherein the following three conditions are satisfied simultaneously to indicate that the first part of the first transaction data has not been modified:
the first timestamp is earlier than the third timestamp;
the sequence of the first time stamp and the second time stamp is consistent with the sequence of the third time stamp and the fourth time stamp; and is
The first event summary is equal to the second event summary, and/or
The following three conditions are satisfied simultaneously, which indicates that the second part of the first transaction data is not modified:
the second timestamp is earlier than the fourth timestamp;
the sequence of the first time stamp and the second time stamp is consistent with the sequence of the third time stamp and the fourth time stamp; and is
The third event summary is equal to the fourth event summary.
16. The apparatus of claim 10, wherein the second event digest is a hash value of a first portion of the first transaction data associated with the first event number.
17. The apparatus of claim 16, wherein the first portion of data comprises transaction details, wherein the transaction details comprise a transaction initiator node, a transaction recipient node, and transaction information.
18. The apparatus of claim 17, wherein the first portion of data further comprises the first event number.
19. A computer readable storage medium having stored thereon computer readable program instructions for performing the method for processing transactional data in a blockchain node of a blockchain according to any one of claims 1 to 9.
CN201811054272.4A 2018-09-11 2018-09-11 Method, apparatus and storage medium for processing transaction data in a blockchain Active CN109308211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811054272.4A CN109308211B (en) 2018-09-11 2018-09-11 Method, apparatus and storage medium for processing transaction data in a blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811054272.4A CN109308211B (en) 2018-09-11 2018-09-11 Method, apparatus and storage medium for processing transaction data in a blockchain

Publications (2)

Publication Number Publication Date
CN109308211A CN109308211A (en) 2019-02-05
CN109308211B true CN109308211B (en) 2021-04-23

Family

ID=65224672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811054272.4A Active CN109308211B (en) 2018-09-11 2018-09-11 Method, apparatus and storage medium for processing transaction data in a blockchain

Country Status (1)

Country Link
CN (1) CN109308211B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10917231B2 (en) 2019-04-04 2021-02-09 Advanced New Technologies Co., Ltd. Data storage method, apparatus, system and device
CN110163602A (en) * 2019-04-04 2019-08-23 阿里巴巴集团控股有限公司 A kind of verification method of account book, device and equipment
US10790968B2 (en) 2019-04-04 2020-09-29 Alibaba Group Holding Limited Ledger verification method and apparatus, and device
CN110705935B (en) * 2019-09-27 2022-04-12 北京京东振世信息技术有限公司 Logistics document processing method and device
CN111199371B (en) * 2019-12-27 2024-02-20 航天信息股份有限公司 Grain circulation tracing release verification method and system based on blockchain
CN111884808B (en) * 2020-07-20 2023-06-23 杭州溪塔科技有限公司 Method and device for preventing transaction cross-chain replay and electronic equipment
CN112822195B (en) * 2021-01-08 2022-11-04 深圳汉硕计算机科技有限公司 Electronic intelligent signing method based on block chain technology

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790431A (en) * 2016-12-05 2017-05-31 同济大学 Cloud manufacturing service Transaction Information record system and method based on block chain
CN106815530A (en) * 2016-12-26 2017-06-09 北京爱接力科技发展有限公司 Data deposit card method, data verification method and device
CN107316239A (en) * 2017-07-14 2017-11-03 众安信息技术服务有限公司 A kind of authentification of message and source tracing method and system based on block chain

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11488147B2 (en) * 2015-07-14 2022-11-01 Fmr Llc Computationally efficient transfer processing and auditing apparatuses, methods and systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790431A (en) * 2016-12-05 2017-05-31 同济大学 Cloud manufacturing service Transaction Information record system and method based on block chain
CN106815530A (en) * 2016-12-26 2017-06-09 北京爱接力科技发展有限公司 Data deposit card method, data verification method and device
CN107316239A (en) * 2017-07-14 2017-11-03 众安信息技术服务有限公司 A kind of authentification of message and source tracing method and system based on block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
区块链技术的核心概念;ZeroOne01;《https://blog.51cto.com/zero01/2115489?cid=719848》;20180512;第1-8页 *
区块链节点间的数据验证:哈希值与非对称加密;牛k8nb72h1x6w1;《http://www.360doc.com/content/18/0510/00/47919125_752597380.shtml》;20180510;第1-4页 *

Also Published As

Publication number Publication date
CN109308211A (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN109308211B (en) Method, apparatus and storage medium for processing transaction data in a blockchain
US11290287B2 (en) Digital certificate management method, apparatus, and system
CN111095326B (en) Methods, systems, and apparatus for performing multiple transactions in a blockchain network
CN112215608B (en) Data processing method and device
US20190172026A1 (en) Cross blockchain secure transactions
CN111373431B (en) Credible insurance letter based on block chain
CN107730258A (en) Method for processing resource, device and computer-readable recording medium based on block chain
CN111066047A (en) Implementing a blockchain based workflow
CN111357026B (en) Credible insurance letter based on block chain
CN118041602A (en) System and method for ensuring correct execution of a computer program using a mediator computer system
US20190114707A1 (en) Distribution of Blockchain Tokens
TW201822033A (en) Resource processing method and apparatus
CN112613877B (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN110197433B (en) Numerical value transferring method, device and system
CN114788222A (en) Method and system for secure and verifiable offline blockchain transactions
CN111199398B (en) Methods, apparatus, computer readable storage media, and computer program products for cross-blockchain asset management
US20220156725A1 (en) Cross-chain settlement mechanism
CN110046990B (en) Data processing method, device and server based on block chain
CN109388957B (en) Block chain-based information transfer method, device, medium and electronic equipment
CN111309745A (en) Virtual resource processing method and device, electronic equipment and storage medium
CN113826134B (en) Trusted guaranty function based on blockchain
CN110263580B (en) Data processing method and device based on block chain and block chain link points
CN111433798B (en) Credible insurance letter based on block chain
CN111985007A (en) Contract signing and executing method and device based on block chain
CN108564363B (en) Transaction processing method, server, client and system

Legal Events

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