Detailed Description
The following description of the embodiments of the present invention will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; the two components can be directly connected or indirectly connected through an intermediate medium, or can be communicated inside the two components, or can be connected wirelessly or in a wired way. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
In addition, the technical features of the different embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
The embodiment provides a digital asset transaction method based on blockchain, as shown in fig. 1, comprising the following steps:
s101, receiving a digital asset transaction request of a transaction initiator, wherein the digital asset transaction request comprises transaction initiator information and digital asset identification;
illustratively, when the transaction initiator is in the uplink, the alliance chain CA node can be an identity certificate issued by the transaction initiator, a corresponding digital signature and various keys required for encryption and decryption in the processes of digital asset uplink, transaction and the like; when the digital asset identification is a digital asset uplink, the federation chain generates a unique identification of the corresponding digital asset according to the intelligent contract. Specific processes for digital asset chaining may include a login process and a digital asset chaining process. The login process is as follows: the digital asset owner may encrypt the digital asset to be uplinked with the received key to obtain an encrypted ciphertext digital asset, where the encryption may be homomorphic. Meanwhile, descriptive information corresponding to the digital asset is generated, wherein the descriptive information comprises, but is not limited to, information such as digital asset type, digital asset size, complete data HASH value, transaction pricing and the like. After the above operation is completed, the digital asset owner initiates a alliance chain login request, wherein the login request comprises an identity certificate and a digital signature of the digital asset owner, after the alliance chain receives the digital asset owner, the intelligent contract verifies whether the identity certificate and the digital signature are correct, and when the digital asset owner passes the verification, information of successful login is returned to the digital asset owner.
After login is successful, the digital asset chaining process is as follows: the digital asset owner initiates a digital asset uplink request, the digital asset uplink request comprises a digital asset and description information corresponding to the digital asset, the intelligent contract generates a unique digital asset identification according to the received digital asset uplink request, the digital asset identification and the digital asset are stored in a alliance chain, and the digital asset identification and the uplink result are sent to the digital asset owner.
The transaction initiator may be any node on the federation chain that retrieves the digital asset(s) of the computing transaction by means of digital asset retrieval. When the digital asset which is wanted to be traded is retrieved, the trading initiator submits self identity certificate information and the digital asset identification which is going to be traded, and a digital asset trading request is initiated.
S102, determining a transaction receiver according to a digital asset transaction request; according to the digital asset transaction request, the determination mode of the transaction receiver can be obtained by matching digital asset identifiers in the digital asset transaction request, wherein the digital asset identifiers have uniqueness and correspond to unique digital asset identifier owners.
S103, when the information of the transaction initiator and the transaction receiver meets the verification condition, generating a digital watermark according to the digital asset transaction request, wherein the digital watermark is generated according to the information of the transaction initiator, the information of the transaction receiver and the digital asset information;
illustratively, the verification conditions may be: firstly, verifying whether identity information of a transaction initiator and a transaction receiver is legal, verifying whether corresponding executable intelligent contracts exist or not when the identity information is legal, and verifying whether information of the transaction initiator and the transaction receiver meets the transaction execution conditions or not according to the intelligent contracts when the executable intelligent contracts exist. The way to determine whether the identity information is legitimate may be to verify that the digital signatures of the transaction initiator and the transaction recipient are correct.
When the identity is legal, but there is no corresponding executable smart contract, the transaction initiator and the transaction recipient may initiate a smart contract establishment request. The process of establishing the intelligent contract can be that after verifying that the transaction initiator and the transaction receiver are legal, verifying whether the digital asset data required to be transacted are correct, when the digital asset data are correct, responding to the intelligent contract establishing request by the nodes in the alliance chain, establishing the corresponding intelligent contract, enabling the nodes in the alliance chain to agree and account, thus completing the establishment of the intelligent contract, and verifying whether the information of the transaction initiator and the transaction receiver meets the transaction executing condition according to the established intelligent contract.
And when the identity is legal and the corresponding executable intelligent contract exists, verifying whether the information of the transaction initiator and the transaction receiver meets the transaction execution condition according to the executable intelligent contract. The transaction execution condition may specifically be that the smart contract continues to be executed only when the digital asset price is less than the transaction initiator wallet balance to complete the digital asset transaction.
When the information of the transaction initiator and the transaction receiver meet the verification conditions, the transaction initiator and the transaction receiver can complete the digital asset transaction, and at this time, the intelligent contract generates a unique digital watermark according to the information of the transaction initiator, the information of the transaction receiver and the digital asset information, and it is noted that the information contained in the digital watermark is not limited to the information of the initiator, the information of the transaction receiver and the digital asset information, but also can include timestamp information.
S104, obtaining digital assets embedded with the digital watermark according to the digital watermark and the digital assets corresponding to the digital asset transaction request;
the digital watermark embedded digital asset may be obtained by, for example, a smart contract watermarking the digital asset by an embedding algorithm. It should be noted that, the digital asset may be an unencrypted digital asset, or may be a homomorphically encrypted digital asset obtained by homomorphically encrypting and linking the digital asset locally at the digital asset owner node, that is, the transaction receiver, before the digital asset is uplink, in order to ensure the security of the digital asset uplink.
In order to recover the digital asset embedded with the digital watermark completely, the digital asset is also required to be encrypted in the same state, specifically, after the digital watermark is generated, the alliance chain intelligent contract sends the digital watermark back to the corresponding digital asset possession node server, the digital asset node server encrypts the digital watermark in the same state, and returns the encrypted digital watermark to the alliance chain intelligent contract for the intelligent contract to embed the digital watermark, so as to obtain the digital asset embedded with the digital watermark after the homomorphic encryption.
S105, the digital asset embedded with the digital watermark is sent to a transaction initiator according to the intelligent contract corresponding to the digital asset transaction request.
For example, the digital watermark embedded digital asset may be sent to the transaction initiator in a specific manner by first sending the digital watermark embedded digital asset and transaction initiator information to the transaction recipient node server by the federation chain smart contract, and simultaneously sending the transaction recipient node information to the transaction initiator node, the transaction recipient node information including the transaction recipient node server address. When the digital asset embedded with the digital watermark is the digital asset embedded with the digital watermark which is encrypted in a homomorphic way, the transaction receiver node decrypts the digital asset embedded with the digital watermark, and the unencrypted digital asset embedded with the digital watermark is recovered. The transaction receiver node stores the digital asset embedded with the digital watermark in a local database for awaiting transaction. When a download request of a transaction initiator is received, encrypting the digital watermark-embedded digital asset by using a public key of the transaction initiator, and transmitting the encrypted digital watermark-embedded digital asset to a transaction initiator node.
According to the digital asset transaction method based on the blockchain, the digital watermark with the transaction initiator information, the transaction receiver information and the digital asset information is embedded into the digital asset on the alliance chain, so that illegal tampering of the uplink digital asset and illegal tampering of the digital watermark can be prevented on the one hand; on the other hand, because each digital asset is unique according to the difference of both parties of the transaction and the digital asset information, the digital watermark information in the same data asset revealed by different purchasing users is different, the infringement user revealing the digital asset can be accurately positioned, and the digital asset maintenance cost is reduced.
As an alternative implementation of this embodiment, before the step S110, the method includes:
when a uplink request of a transaction node is received, the identity identification information of the transaction node is sent to the CA node, so that the CA node authenticates the identity of the transaction node according to the received identity identification information; and sending the secret key distributed by the CA node to the transaction node, wherein the transaction node comprises a transaction receiver and a transaction initiator.
Illustratively, the transaction nodes may include a transaction initiator node and a transaction receiver node. The identity information of the transaction node includes a user name, a password, etc. of the transaction node, and the specific content of the identity information is not limited in this embodiment, and can be determined by a person skilled in the art according to needs. The CA node authenticates the identity of the transaction node according to the received identity identification information, and completes identity authentication of the transaction node access and issuing of the identity certificate. In addition, while the identity authentication and the issuance of the identity certificate are completed, the CA node distributes all keys required by the node in each process of completing the transaction according to the identity of the access node, and the federation chain distributes the distributed keys and the identity certificate to the transaction node.
According to the blockchain-based digital asset transaction method, the CA node is used for completing the identity authentication and key distribution of the uplink of the transaction node, so that the uplink of the transaction node is safer, and meanwhile, as each transaction node is issued with the identity certificate, an identity authentication means is provided for the execution of subsequent transactions, and the security of the transactions is improved. In addition, the CA node also completes the distribution of the key, distributes the key required by the transaction for each transaction node, provides safety guarantee for the uplink of the subsequent digital asset, the transaction of the digital asset, the generation of the digital watermark and the transmission of the digital asset, and solves the problem of data privacy protection.
As an optional implementation manner of this embodiment, the method further includes:
when a digital asset validation request is received, watermark extraction is carried out on digital assets which need to be validated and are embedded with digital watermarks according to the digital asset validation request, wherein the digital asset validation request comprises digital assets which need to be validated and are embedded with digital watermarks; comparing the extracted watermark with the stored watermark of the corresponding digital asset; and carrying out right confirmation on the corresponding digital asset according to the comparison result.
Illustratively, the digital asset validation request may be initiated by any node, including the digital asset that requires validation. According to the digital asset validation request, digital watermark extraction is carried out on the digital asset which needs to be validated, the extracted digital watermark is compared with the digital watermark stored during the digital asset transaction validation to obtain a comparison value, when the comparison value is larger than a set threshold, the set threshold can be 80%, the digital asset which needs to be validated is the digital asset of the node which initiates the validation request, the validation is successful, after the validation is successful, infringement user information is obtained according to the digital watermark on the digital asset, and the infringement user information is returned to the node which initiates the validation request, so that the node which initiates the validation request can position and trace the infringement user which leaks the digital asset. The size of the threshold is not limited in this embodiment, and can be determined by one skilled in the art as required.
According to the digital asset transaction method based on the blockchain, the digital watermark information is compared by receiving the digital watermark information request, the digital asset copyright is finished, sufficient evidence is provided for the leakage infringement of the digital asset, the infringement judgment is convenient, the credible traceability query of the illegal leakage of the digital asset is realized, and the illegal leakage maintenance cost is reduced.
As an optional implementation manner of this embodiment, step S150 includes:
and sending the digital asset abstract to a transaction initiator according to the intelligent contract corresponding to the digital asset transaction request, so that the transaction initiator performs integrity verification on the received asset information according to the digital asset abstract.
Illustratively, when the transaction process reaches a condition specified by the smart contract, for example, the smart contract specifies that the transaction recipient node sends a corresponding digital asset digest to the transaction initiator node, which may be transmitted in a P2P manner encrypted by the transaction recipient private key, while the transaction initiator pays the corresponding fee to the transaction recipient. The digital asset digest is the result of a hash calculation performed on a digital asset.
The data asset original file can be transferred through a server in a form of encryption of a transaction initiator public key and is sent to a transaction initiator node server; the encrypted digital asset abstract can also be directly transmitted to a server of a transaction initiator node in a P2P mode together with the encrypted digital asset abstract in a form of transaction initiator public key encryption.
The transaction initiator decrypts the received data asset original file by utilizing the private key of the transaction initiator, then carries out hash calculation on the data asset original file, carries out integrity comparison on the obtained hash calculation result and the digital asset abstract decrypted by utilizing the public key of the transaction receiver, and when the hash calculation result is completely consistent with the digital asset abstract, indicates that the data asset original file is complete.
According to the blockchain-based digital asset transaction method, the digital asset abstract is transmitted, the transaction initiator rapidly compares the integrity with the accuracy according to the digital asset abstract, the integrity and the accuracy of the digital asset are guaranteed, in the process, the digital asset abstract is decrypted by using the public key of the transaction receiver, the identity of the data asset provider can be verified, whether the provider is the transaction receiver or not is judged, and the transaction safety is improved.
As an optional implementation manner of this embodiment, step S150 includes: broadcasting digital asset transactions; when the transaction consensus condition is satisfied, the transaction is recorded.
Illustratively, the digital asset transaction is completed, the transaction initiator node and the transaction receiver node broadcast digital asset transaction information to other nodes, record the transaction in the coalition chain when the digital asset transaction information meets the consensus condition, and package the transaction information into blocks for storage in the coalition chain, wherein the transaction information comprises digital asset information embedded with digital watermarks, transaction party information and the like. The consensus condition may be that 51% of the consensus nodes acknowledge the transaction. The consensus mechanism adopted by the federation chain is not limited in this embodiment, and can be determined by those skilled in the art according to requirements.
According to the digital asset transaction method based on the blockchain, transaction data are broadcasted, and when the transaction data are recorded under the consensus condition, the behavior of maliciously tampering with the digital asset transaction record can be prevented, and the transaction safety is ensured.
An embodiment of the present invention provides a digital asset transaction device based on blockchain, as shown in fig. 2, including:
a transaction request receiving module 201, configured to receive a digital asset transaction request of a transaction initiator, where the digital asset transaction request includes transaction initiator information and a digital asset identifier; the specific embodiment refers to the corresponding part of the method part step S101, and will not be described herein.
A transaction receiver confirmation module 202, configured to determine a transaction receiver according to the digital asset transaction request; the specific embodiment refers to the corresponding part of the method part step S102, and will not be described herein.
A digital watermark generation module 203, configured to generate a digital watermark according to the digital asset transaction request when the information of the transaction initiator and the transaction receiver satisfy the verification condition, where the digital watermark is generated according to the transaction initiator information, the transaction receiver information, and the digital asset information; the specific embodiment refers to the corresponding part of the method part step S103, and will not be described herein.
A digital watermark embedding module 204, configured to obtain a digital asset embedded with a digital watermark according to the digital watermark and a digital asset corresponding to the digital asset transaction request; in the specific embodiment, reference is made to the corresponding portion of the method portion step S104, which is not described herein.
And the digital asset transmitting module 205 is configured to transmit the digital asset embedded with the digital watermark to the transaction initiator according to the intelligent contract corresponding to the digital asset transaction request. The specific embodiment refers to the corresponding part of the method part step S105, and will not be described herein.
As an optional implementation manner of this embodiment, the blockchain-based digital asset transaction device further includes:
the identity authentication module is used for sending the identity identification information of the transaction node to the CA node when receiving the uplink request of the transaction node, so that the CA node authenticates the identity of the transaction node according to the received identity identification information; the specific embodiments refer to the corresponding parts of the above methods, and are not described herein.
And the key distribution module is used for sending the key distributed by the CA node to the transaction node, and the transaction node comprises a transaction receiver and a transaction initiator. The specific embodiments refer to the corresponding parts of the above methods, and are not described herein.
As an optional implementation manner of this embodiment, the blockchain-based digital asset transaction device further includes:
the watermark extraction module is used for extracting the watermark of the digital watermark embedded digital asset which needs to be confirmed according to the digital asset confirmation request when the digital asset confirmation request is received, wherein the digital asset confirmation request comprises the digital asset which needs to be confirmed and is embedded with the digital watermark; the specific embodiments refer to the corresponding parts of the above methods, and are not described herein.
The watermark comparison module is used for comparing the extracted watermark with the stored watermark of the corresponding digital asset; the specific embodiments refer to the corresponding parts of the above methods, and are not described herein.
And the right confirming module is used for confirming the right of the corresponding digital asset according to the comparison result. The specific embodiments refer to the corresponding parts of the above methods, and are not described herein.
As an alternative implementation of this embodiment, the digital watermark embedding module 204 includes:
and the integrity verification module is used for sending the digital asset abstract to the transaction party according to the intelligent contract corresponding to the digital asset transaction request, so that the transaction initiator performs integrity verification on the received asset information according to the digital asset abstract. The specific embodiments refer to the corresponding parts of the above methods, and are not described herein.
As an alternative implementation of this embodiment, the digital asset transmission module 205 includes:
a broadcast module for broadcasting the digital asset transaction; the specific embodiments refer to the corresponding parts of the above methods, and are not described herein.
And the recording module is used for recording the transaction when the transaction consensus condition is met. The specific embodiments refer to the corresponding parts of the above methods, and are not described herein.
Embodiments of the present application also provide an electronic device, as shown in fig. 3, a processor 310 and a memory 320, where the processor 310 and the memory 320 may be connected by a bus or other means.
The processor 310 may be a central processing unit (Central Processing Unit, CPU). The processor 310 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), field programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above.
The memory 320 is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the blockchain-based digital asset transaction method in the embodiments of the present invention. The processor executes various functional applications of the processor and data processing by running non-transitory software programs, instructions, and modules stored in memory.
Memory 320 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 320 may optionally include memory located remotely from the processor, which may be connected to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 320, which when executed by the processor 310, perform a blockchain-based digital asset transaction method as in the embodiment of fig. 1.
The details of the above electronic device may be understood correspondingly with respect to the corresponding related descriptions and effects in the embodiment shown in fig. 1, which are not repeated herein.
The present embodiment also provides a computer storage medium storing computer-executable instructions that are operable to perform the blockchain-based digital asset trading method of any of the method embodiments described above. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. While still being apparent from variations or modifications that may be made by those skilled in the art are within the scope of the invention.