CN112541775A - Transaction tracing method based on block chain, electronic device and computer storage medium - Google Patents

Transaction tracing method based on block chain, electronic device and computer storage medium Download PDF

Info

Publication number
CN112541775A
CN112541775A CN202011488675.7A CN202011488675A CN112541775A CN 112541775 A CN112541775 A CN 112541775A CN 202011488675 A CN202011488675 A CN 202011488675A CN 112541775 A CN112541775 A CN 112541775A
Authority
CN
China
Prior art keywords
target
block
transaction
digital asset
asset
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.)
Withdrawn
Application number
CN202011488675.7A
Other languages
Chinese (zh)
Inventor
赵书鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Golden Lion Technology Co Ltd
Original Assignee
Ningbo Golden Lion 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 Ningbo Golden Lion Technology Co Ltd filed Critical Ningbo Golden Lion Technology Co Ltd
Priority to CN202011488675.7A priority Critical patent/CN112541775A/en
Publication of CN112541775A publication Critical patent/CN112541775A/en
Withdrawn legal-status Critical Current

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
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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

Abstract

Embodiments of the present disclosure disclose a blockchain-based transaction tracing method, an electronic device, and a computer storage medium. One embodiment of the method comprises: acquiring a transaction data information set sent by a user; determining a previous transaction identification and a target digital asset based on the target asset number; determining a target previous block based on the previous transaction identifier; generating a target hash value based on a target previous block; and generating a target block in response to the target hash value verification passing and the previous transaction identification being not null, and issuing the target block into the block chain. The method realizes reliable storage of transaction data by means of block chain technology. The digital assets of the transaction data are independently defined, multi-layer association between the blocks and the transaction data and between the transaction data and the digital assets is realized, the act of maliciously tampering transaction or asset information can be effectively prevented, the uplink data are documented, and the authenticity and reliability of the uplink data are guaranteed.

Description

Transaction tracing method based on block chain, electronic device and computer storage medium
Technical Field
The embodiment of the disclosure relates to the field of blockchain and traceability, in particular to a transaction traceability method, electronic equipment and a computer storage medium based on blockchain.
Background
In recent years, people gradually pay attention to the digital economic fields of supply chain management, e-government affairs, e-commerce online shopping, logistics management and the like, and the traceability demands of users are changed from simply checking asset information to ensuring the safety, reliability and high efficiency of asset information tracing. The diverse traceability requirements of users present new challenges to existing traceability methods. The block chain technology is used as a new product in the internet era, and solves the problems of multi-party trust, information asymmetry, information tampering and the like to a certain extent, so that the block chain technology is applied to various fields, and a traceability method based on the block chain technology is produced.
However, when tracing the transaction data assets in the blockchain by the above method, the following technical problems still face:
first, the current tracing method only uses a blockchain as a data storage tool, asset description information in digital economy is cooperatively recorded in the blockchain by multiple parties in a transaction form, and asset information tracing is realized mainly by traversing and accessing all blocks, which is inefficient.
Secondly, the current method is mainly to store the transaction data assets in the blockchain directly, and an effective protection means is lacked, so that the security requirement of the transaction data cannot be met, and the risk of malicious attack exists.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose blockchain-based transaction tracing methods, electronic devices, and computer storage media to address one or more of the technical problems noted in the background section above.
In a first aspect, some embodiments of the present disclosure provide a blockchain-based transaction tracing method, including: acquiring a transaction data information set sent by a user; determining a previous transaction identification and a target digital asset based on the target asset number; determining a target previous block based on the previous transaction identifier; generating a target hash value based on a target previous block; and generating a target block in response to the target hash value verification passing and the previous transaction identification being not null, and issuing the target block into the block chain.
In a second aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any one of the first aspects.
In a third aspect, some embodiments of the disclosure provide a computer readable storage medium having a computer program stored thereon, wherein the program when executed by a processor implements a method as in any one of the first aspect.
The above embodiments of the present disclosure have the following advantages: the transaction tracing method based on the blockchain can realize the whole-course reliable tracking of the digital assets and transaction information for transaction. Specifically, the reason for the low efficiency of tracing the source of the transaction data assets is that: only transaction information is recorded in the block chain, and the tracing of the digital asset information is realized by a method of traversing and accessing all blocks. Based on this, the transaction traceability method based on the blockchain of some embodiments of the present disclosure realizes multi-layer association between the blocks and the transaction data, and between the transaction data and the digital asset, and realizes the whole-process traceability of the transaction data and the digital asset. First, the digital assets in each block in the block chain are constructed into a digital asset sub-block set, and a block hash value is generated. Secondly, constructing the digital asset information set and the transaction data information set of the uplink into a chain structure to obtain a transaction data information set chain and an asset data information set chain, and realizing traceability of the data asset information and the transaction data information. And finding the transaction identifier for processing the target asset number last time in the transaction data information aggregation chain according to the target asset number, and determining the transaction identifier as the previous transaction identifier. And then, searching the target digital asset corresponding to the target asset from the digital asset information aggregation chain. Finally, a target previous block is determined in the blockchain to obtain a target hash value. And generating a target block, and updating the target block into the block chain. And the characteristics of decentralization and traceability of the block chain are utilized to realize transaction data storage and traceability based on the block chain. The method realizes reliable storage of transaction data by means of block chain technology. The digital assets of the transaction data are individually defined, and the digital assets in each block in the block chain are constructed into a digital asset sub-block set. Each digital asset sub-block in the digital asset sub-block set is the result after encryption processing, and the safety of transaction information can be effectively ensured. Through the transaction data information aggregation chain and the asset data information aggregation chain, multi-layer association between blocks and transaction data and between the transaction data and the digital assets is achieved, the act of maliciously tampering transaction or asset information can be effectively prevented, the uplink data can be well documented, and the authenticity and reliability of the uplink data are guaranteed.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is an architectural diagram of an exemplary system in which some embodiments of the present disclosure may be applied;
fig. 2 is a flow diagram of some embodiments of a blockchain-based transaction provenance method according to some embodiments of the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a blockchain-based transaction tracing method according to some embodiments of the present disclosure;
FIG. 4 is a schematic block diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of blockchain-based transaction tracing methods of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a data storage application, a data analysis application, a natural language processing application, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various terminal devices having a display screen, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the above-listed terminal apparatuses. Which may be implemented as multiple software or software modules (e.g., to provide transactional data information set input, etc.), or may be implemented as a single software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as a server that stores target data input by the terminal apparatuses 101, 102, 103, and the like. The server can process the received transaction data information set and feed back the processing result to the terminal equipment.
It should be noted that the transaction tracing method based on the blockchain provided by the embodiment of the present disclosure may be executed by the server 105, or may be executed by the terminal device.
It should be noted that the local to the server 105 may also directly store the transaction data information set, in which case the exemplary system architecture 100 may not include the terminal devices 101, 102, 103 and the network 104.
It should be noted that the terminal devices 101, 102, and 103 may also have storage-type applications installed therein, and in this case, the processing method may also be executed by the terminal devices 101, 102, and 103. At this point, the exemplary system architecture 100 may also not include the server 105 and the network 104.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide storage or traceability services), or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a blockchain-based transaction tracing method in accordance with the present disclosure is illustrated. The transaction tracing method based on the blockchain comprises the following steps:
step 201, acquiring a transaction data information set sent by a user.
In some embodiments, an executing entity (e.g., the electronic device shown in fig. 1) of the blockchain-based transaction tracing method may directly obtain the transaction data information set sent by the user. The block chain includes at least one block. At least one of the tiles includes a first transaction identification, a second transaction identification, a tile hash value, a digital asset, and a set of tile information. Specifically, a block chain is a chain structure, and includes a head node (first block) and a tail node (last block) of the chain. A block is the primary data storage structure for a chain of blocks.
Optionally, a set of sub-blocks of digital assets is generated based on the digital assets in the block. A digital asset size s and a digital asset sub-block size d in a block are determined. Specifically, the values of s and d may be any integer.
Determining a number of digital asset sub-blocks in the set of digital asset sub-blocks using the following equation:
n=ceil(s/d),
where n represents the number of digital asset sub-blocks and n is the third number. ceil denotes the function used to obtain the smallest integer greater than the quotient s/d of s and d.
The digital assets in the block are partitioned into a third number of initial digital asset sub-blocks to obtain an initial set of data asset sub-blocks. For each initial data asset subblock in the initial data asset subblock set, encrypting the initial data asset subblock by using the following formula to generate data asset subblocks so as to obtain a digital asset subblock set:
y=x*rh mod N,
where x represents the initial sub-block of data assets, N represents the modulus, N ═ p × q, p and q are randomly generated prime numbers, and p and q are not equal. r represents a generator, and r represents a generator,rhrepresents the h-th power of r, r satisfies gcd (r, N) ═ 1, gcd () represents coprime, gcd (r, N) ═ 1 represents coprime of r and N. mod denotes the modulo process, h denotes the key,
Figure BDA0002840096990000061
the opad represents the first character string, the ipad represents the second character string, the length of the opad and the ipad are the fourth number, and the opad and the ipad are randomly generated character strings.
Figure BDA0002840096990000062
Representing an exclusive or process, H () representing a hash function, "|" representing a string splicing operation, and y representing a sub-block of data assets.
Optional contents in the step 201 are as follows: the 'formula for generating the digital asset subblock set' is taken as an invention point of the embodiment of the disclosure, and the technical problem mentioned in the background technology is solved. ". Factors that lead to poor security of transaction data tend to be as follows: storing data assets directly in a block risks malicious attack or tampering. If the above factors are solved, the effect of improving the safety of the transaction data can be achieved. To achieve this effect, the present disclosure encrypts the digital assets related to the transaction data to form a chain structure for storage. First, the size of the digital assets and the size of the digital asset sub-blocks in the block are determined, and the number of the digital asset sub-blocks in the digital asset sub-block set is determined. The digital assets in the block are then partitioned into a third number of initial digital asset sub-blocks to obtain an initial set of data asset sub-blocks. And finally, for each initial data asset subblock in the initial data asset subblock set, encrypting the initial data asset subblock to generate data asset subblocks so as to obtain a digital asset subblock set. The method can cut and encrypt the digital assets related to the transaction data, and can ensure the safety of the digital assets. Meanwhile, digital assets are not directly placed into the block chain, but a separate chain structure is formed, so that the risk that malicious attacks are stored in the block chain can be reduced, and the technical problem II is solved.
Optionally, for each digital asset sub-block in the set of digital asset sub-blocks, a hash value of the digital asset sub-block is generated by using a hash function, so as to obtain a set of digital asset sub-block hash values. Wherein the set of digital asset sub-block hash values comprises a third number of digital asset sub-block hash values.
The set of digital asset subchunk hash values is constructed as a tree data structure. The tree data structure comprises leaf nodes, middle nodes and root nodes. The leaf node stores the digital asset subchunk hash values in the set of digital asset subchunk hash values. The intermediate node stores concatenation results of the digital asset sub-block hash values in the set of digital asset sub-block hash values for the leaf nodes of the intermediate node. The root node stores concatenation results of the digital asset sub-block hash values in the third number of digital asset sub-block hash value sets stored in the third number of leaf nodes. And determining the serial connection result of the digital asset subblock hash values of the third number of digital asset subblock hash value sets stored by the root node of the tree-type data structure as the block hash value.
Optionally, a chain of digital asset information collections is generated. Wherein the chain of digital asset information collections includes a first number of digital asset information collections. The digital asset information set comprises an asset number, a digital asset file and a transaction information set. In particular, the chain of digital asset information collections may be a chain-structured collection of digital asset information.
And generating a transaction data information aggregation chain. Wherein the chain of transaction data information sets comprises a second number of transaction data information sets. The transaction data information set comprises a transaction identifier, the asset number and a processing information set. In particular, the transaction data information set chain may be a chain structured transaction data information set. The digital asset information and the transaction data information are all constructed into a chain structure, so that the tracing of the digital asset and the transaction data can be realized.
Specifically, the transaction data information set includes a target transaction identifier and a target asset number.
Optional contents in the step 201 are as follows: the technical content of generating a transaction data information aggregation chain and a digital asset information aggregation chain is taken as an invention point of the embodiment of the disclosure, and the technical problems mentioned in the background technology are solved. ". Factors that lead to poor asset information traceability efficiency tend to be as follows: querying asset information by traversing the tiles is inefficient. If the factors are solved, the effect of improving the asset information tracing efficiency can be achieved. To achieve this effect, the present disclosure implements a multi-tiered interconnection of blockchains, transaction data information aggregation chains, and digital asset information aggregation chains. First, a chain of digital asset information collections is generated. Then, a chain of transaction data information sets is generated. Digital asset information and transaction data information related in the traceability system are respectively constructed into a chain structure, and respective traceability is realized. And thirdly, the transaction data information set sent by the user comprises a target transaction identification and a target asset number. The target transaction identification corresponds to transaction-related information in the chain of transaction data information sets and the target asset number corresponds to asset-related information in the chain of digital asset information sets. Through the processing steps, the multilayer interconnection relationship among the block chain, the transaction data information aggregation chain and the digital asset information aggregation chain can be realized. The processing can meet the storage requirements of decentralized and whole-course retrospection of the block chain, and meanwhile, the behavior of malicious tampering of transaction or asset information can be effectively prevented, so that the chain data can be documented and circulated, the authenticity and reliability of the chain data are guaranteed, and the technical problem I is solved.
Based on the target asset number, a previous transaction identification and a target digital asset are determined, step 202.
In some embodiments, the executing agent searches in the transaction data information set chain according to the target asset number to determine a target transaction data information set corresponding to the target asset number. And determining the transaction identifier which is extracted from a target processing information set in the target transaction data information set and used for processing the target asset number last time as a previous transaction identifier. And searching in the digital asset information collection chain according to the target asset number to determine a target digital asset information collection corresponding to the target asset number. And determining the digital asset file extracted from the target digital asset information set as the target digital asset.
Step 203, determine the target previous block based on the previous transaction id.
In some embodiments, for each block in the block chain, the execution subject matches the second transaction identifier of the block with the previous transaction identifier to generate a matching identifier, so as to obtain a matching identifier set.
And determining the block corresponding to the matching identifier with the value of 1 in the matching identifier set as the target previous block.
At step 204, a target hash value is generated based on the target previous block.
In some embodiments, the execution body generates the target hash value based on the target previous chunk. Specifically, the target hash value may be a hash value of a previous chunk of the target and a set of hash values of corresponding chunks of the target data asset in the digital asset information aggregation chain.
In response to the target hash value verification passing, the following processing steps are performed, step 205.
In some embodiments, the execution body performs the following processing steps in response to the target hash value verification being passed.
In response to the previous transaction identification being non-null, a target tile is generated based on the set of transaction data information. The target transaction identifier is a target first transaction identifier, and the previous transaction identifier is a target second transaction identifier. Issuing a target block into the block chain.
In response to the previous transaction identification being null, a target tile is generated based on the set of transaction data information. Specifically, the previous transaction identifier is empty indicating that the current transaction is the first transaction. The target transaction identification is a target first transaction identification, and the target second transaction identification is an empty set. The target block is published into a blockchain. Specifically, an intelligent contract is called to add the target block to the block chain. The intelligent contract includes intelligent contract code, an instance, and execution data. In particular, an intelligent contract is a set of commitments defined in a digital form. The intelligent contract can control data in the block chain and appoint the rights and obligations of each participating terminal in the block chain. The smart contracts may be automatically executed by the computer system. In particular, the intelligent contract includes intelligent contract code, instances, and execution data. The intelligent contract code may be the source code of the intelligent contract. The intelligent contract code may be a piece of code that the computer system is capable of executing. An instance may be an actual service in a blockchain running an intelligent contract. The execution data may be data that remains in the blockchain after execution of an instance. Invoking the intelligent contract, running the intelligent contract code, generating an instance and executing data. The instance and the execution data are recorded in a blockchain.
One embodiment presented in fig. 2 has the following beneficial effects: first, the digital assets in each block in the block chain are constructed into a digital asset sub-block set, and a block hash value is generated. Secondly, constructing the digital asset information set and the transaction data information set of the uplink into a chain structure to obtain a transaction data information set chain and an asset data information set chain, and realizing traceability of the data asset information and the transaction data information. And finding the transaction identifier for processing the target asset number last time in the transaction data information aggregation chain according to the target asset number, and determining the transaction identifier as the previous transaction identifier. And then, searching the target digital asset corresponding to the target asset from the digital asset information aggregation chain. Finally, a target previous block is determined in the blockchain to obtain a target hash value. And generating a target block, and updating the target block into the block chain. And the characteristics of decentralization and traceability of the block chain are utilized to realize transaction data storage and traceability based on the block chain. The method realizes reliable storage of transaction data by means of block chain technology. The digital assets of the transaction data are individually defined, and the digital assets in each block in the block chain are constructed into a digital asset sub-block set. Each digital asset sub-block in the digital asset sub-block set is the result after encryption processing, and the safety of transaction information can be effectively ensured. Through the transaction data information aggregation chain and the asset data information aggregation chain, multi-layer association between blocks and transaction data and between the transaction data and the digital assets is achieved, the act of maliciously tampering transaction or asset information can be effectively prevented, the uplink data can be well documented, and the authenticity and reliability of the uplink data are guaranteed.
With continued reference to fig. 3, a schematic diagram of one application scenario of a blockchain-based transaction tracing method according to the present disclosure is shown.
In the application scenario of fig. 3, a user sends a transaction data information set 301 to a server. After the server receives the transaction data information set, the previous transaction identification and the target digital asset are determined 302. The server generates a target hash value 303 from the target previous chunk. The server generates the target tiles and publishes them into the blockchain 304.
The transaction tracing method based on the block chain comprises the steps of firstly associating a transaction data information set with a transaction data information set chain and an asset data information set chain, and determining a previous transaction identifier and a target digital asset according to the transaction data information set. And determining a target previous block in the block chain according to the searched target asset number. A target hash value and a target chunk are generated and the chunk is published into a blockchain. The method realizes the multi-layer association between the block and the transaction data and between the transaction data and the digital assets, can effectively prevent the act of maliciously tampering the transaction or the asset information, realizes the creditability of the uplink data, and ensures the truthfulness and the reliability of the uplink data.
Referring now to FIG. 4, a block diagram of a computer system 400 suitable for use in implementing a server of an embodiment of the present disclosure is shown. The server shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU)401 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the system 400 are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An Input/Output (I/O) interface 405 is also connected to the bus 404.
The following components are connected to the I/O interface 405: a storage section 406 including a hard disk and the like; and a communication section 407 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 407 performs communication processing via a network such as the internet. A drive 408 is also connected to the I/O interface 405 as needed. A removable medium 409 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted as necessary on the drive 408, so that a computer program read out therefrom is mounted as necessary in the storage section 406.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 407 and/or installed from the removable medium 409. The above-described functions defined in the method of the present disclosure are performed when the computer program is executed by a Central Processing Unit (CPU) 401. It should be noted that the computer readable medium in the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, 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), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the C language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, 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 block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, 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 foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A blockchain-based transaction provenance method, wherein the blockchain includes at least one block, the at least one block including a first transaction identification, a second transaction identification, a block hash value, a digital asset, and a set of block information, the method comprising:
acquiring a transaction data information set sent by a user, wherein the transaction data information set comprises a target transaction identifier and a target asset number;
determining a previous transaction identification and a target digital asset based on the target asset number;
determining a target previous block based on the previous transaction identification;
generating a target hash value based on the target previous block;
in response to the target hash value verification passing, performing the following processing steps:
generating a target block based on the transaction data information set in response to the previous transaction identifier being non-null, wherein the target transaction identifier is a target first transaction identifier and the previous transaction identifier is a target second transaction identifier;
issuing the target block into the block chain.
2. The method of claim 1, wherein the method further comprises:
generating a target block based on the transaction data information set in response to the previous transaction identifier being empty, wherein the target transaction identifier is the target first transaction identifier and the target second transaction identifier is an empty set;
issuing the target block into the block chain.
3. The method of claim 2, wherein prior to said obtaining a set of transaction data information sent by a user, the method further comprises:
generating a digital asset information aggregation chain, wherein the digital asset information aggregation chain comprises a first number of digital asset information aggregation, and the digital asset information aggregation comprises an asset number, a digital asset file and a transaction information aggregation;
and generating a transaction data information aggregation chain, wherein the transaction data information aggregation chain comprises a second number of transaction data information aggregation, and the transaction data information aggregation comprises a transaction identification, the asset number and a processing information aggregation.
4. The method of claim 3, wherein said determining a previous transaction identification and a target digital asset based on said target asset number comprises:
searching in the transaction data information collection chain according to the target asset number to determine a target transaction data information collection corresponding to the target asset number;
determining the transaction identifier which is extracted from a target processing information set in the target transaction data information set and used for processing the target asset number last time as the previous transaction identifier;
searching in the digital asset information collection chain according to the target asset number to determine a target digital asset information collection corresponding to the target asset number;
determining the digital asset file extracted from the target digital asset information set as the target digital asset.
5. The method according to any one of claims 1-4, wherein prior to said obtaining a set of transaction data information from a user, the method further comprises:
generating a set of sub-blocks of digital assets based on the digital assets in the block;
for each digital asset sub-block in the set of digital asset sub-blocks, generating a hash value of the digital asset sub-block using a hash function to obtain a set of digital asset sub-block hash values, wherein the set of digital asset sub-block hash values includes a third number of digital asset sub-block hash values;
constructing the digital asset subblock hash value set into a tree-type data structure, wherein the tree-type data structure comprises leaf nodes, intermediate nodes and root nodes, the leaf nodes store digital asset subblock hash values in the digital asset subblock hash value set, the intermediate nodes store serial results of the digital asset subblock hash values in the digital asset subblock hash value set of the leaf nodes of the intermediate nodes, and the root nodes store serial results of the digital asset subblock hash values in a third number of the digital asset subblock hash value sets stored in a third number of leaf nodes;
determining a concatenation result of the digital asset sub-block hash values of the third number of digital asset sub-block hash value sets stored by the root node of the tree data structure as the block hash value.
6. The method of claim 5, wherein the generating a set of digital asset sub-blocks based on the digital assets in the block comprises:
determining a digital asset size s and a digital asset sub-block size d in the block;
determining a number of digital asset sub-blocks in the set of digital asset sub-blocks using the following equation:
n=ceil(s/d),
wherein n represents the number of said digital asset sub-blocks, n is a third number, ceil represents a function for obtaining a minimum integer greater than the quotient s/d of s and d;
segmenting the digital assets in the block into a third number of initial digital asset sub-blocks to obtain an initial data asset sub-block set;
for each initial data asset subblock in the initial data asset subblock set, encrypting the initial data asset subblock by using the following formula to generate a data asset subblock so as to obtain the digital asset subblock set:
y=x*rhmod N,
wherein x represents the initial sub-block of data assets, N represents the modulus, N-p-q, p and q are randomly generated prime numbers, p and q are not equal, r represents a generator, andhrepresents the h-th power of r, r satisfies the condition that gcd (r, N) is 1, gcd () represents coprime, gcd (r, N) is 1 represents coprime of r and N, mod represents modulo processing, h represents a secret key,
Figure FDA0002840096980000031
opad represents the first string, ipad represents the second string, opad and ipad are a fourth number in length, opad and ipad are randomly generated strings,
Figure FDA0002840096980000032
representing an exclusive or process, H () representing a hash function, "|" representing a string splicing operation, and y representing the sub-block of data assets.
7. The method of claim 6, wherein said determining a target previous tile based on said previous transaction identification comprises:
for each block in the block chain, matching the second transaction identifier of the block with the previous transaction identifier to generate a matching identifier so as to obtain a matching identifier set;
and determining a block corresponding to the matching identifier with the value of '1' in the matching identifier set as the target previous block.
8. The method of claim 7, wherein said publishing the target tile into the tile chain comprises:
invoking an intelligent contract, wherein the intelligent contract comprises intelligent contract code, an instance, and execution data;
and running the intelligent contract code to issue the target blocks in a block chain.
9. A first terminal device comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
10. A computer-readable storage medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-8.
CN202011488675.7A 2020-12-16 2020-12-16 Transaction tracing method based on block chain, electronic device and computer storage medium Withdrawn CN112541775A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011488675.7A CN112541775A (en) 2020-12-16 2020-12-16 Transaction tracing method based on block chain, electronic device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011488675.7A CN112541775A (en) 2020-12-16 2020-12-16 Transaction tracing method based on block chain, electronic device and computer storage medium

Publications (1)

Publication Number Publication Date
CN112541775A true CN112541775A (en) 2021-03-23

Family

ID=75018235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011488675.7A Withdrawn CN112541775A (en) 2020-12-16 2020-12-16 Transaction tracing method based on block chain, electronic device and computer storage medium

Country Status (1)

Country Link
CN (1) CN112541775A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113159952A (en) * 2021-04-25 2021-07-23 平安科技(深圳)有限公司 Method, system, device and storage medium for storing digital assets based on block chain
CN114140123A (en) * 2021-12-07 2022-03-04 北京众信星空网络技术有限公司 Method and system for tracing two-layer network transaction of Ethernet workshop
CN116071164A (en) * 2023-04-06 2023-05-05 江苏金寓信息科技有限公司 Digital asset tracing method based on blockchain management

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113159952A (en) * 2021-04-25 2021-07-23 平安科技(深圳)有限公司 Method, system, device and storage medium for storing digital assets based on block chain
CN113159952B (en) * 2021-04-25 2024-03-29 平安科技(深圳)有限公司 Method, system, device and storage medium for storing digital assets based on blockchain
CN114140123A (en) * 2021-12-07 2022-03-04 北京众信星空网络技术有限公司 Method and system for tracing two-layer network transaction of Ethernet workshop
CN116071164A (en) * 2023-04-06 2023-05-05 江苏金寓信息科技有限公司 Digital asset tracing method based on blockchain management

Similar Documents

Publication Publication Date Title
JP7221954B2 (en) A system for protecting verification keys from modification and validating proofs of correctness
Xie et al. zkbridge: Trustless cross-chain bridges made practical
KR101974075B1 (en) Method and system for verifying ownership of a digital asset using a distributed hash table and a peer-to-peer distributed ledger
TW202031013A (en) Computer implemented system and method for enabling access to data stored on a blockchain
CN112541775A (en) Transaction tracing method based on block chain, electronic device and computer storage medium
KR101687122B1 (en) Input consistency verification for two-party secure function evaluation
CN111950030A (en) Data sharing storage method based on block chain, terminal equipment and storage medium
CN113711202A (en) Method and apparatus for implementing state attestation and ledger identifiers in a distributed database
CN111295650A (en) Performing mapping iterations in a blockchain based system
CN110689349A (en) Transaction hash value storage and search method and device in block chain
CN114124502B (en) Message transmission method, device, equipment and medium
CN115840787B (en) Block chain-based supply chain data sharing method, device, equipment and medium
CN111611621A (en) Block chain based distributed data encryption storage method and electronic equipment
CN112182109A (en) Distributed data coding storage method based on block chain and electronic equipment
CN110910143A (en) Identity identification generation method, device, related node and medium
CN115203749A (en) Data transaction method and system based on block chain
CN112182112A (en) Block chain based distributed data dynamic storage method and electronic equipment
US20200043016A1 (en) Network node for processing measurement data
CN111447072B (en) Method, apparatus and storage medium for generating data equivalent zero knowledge proof
CN111949738A (en) Block chain-based data storage deduplication method, terminal device and storage medium
CN112732835A (en) Block chain-based heterogeneous data storage method and electronic equipment
CN115085934A (en) Contract management method based on block chain and combined key and related equipment
CN112732789A (en) Searchable encryption method based on block chain and electronic equipment
Balashov et al. Optimal shattering of complex networks
CN112712428A (en) Block chain-based electronic certificate storage method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20210323

WW01 Invention patent application withdrawn after publication