Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular 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 otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment provides a block chain-based digital asset transaction method, as shown in fig. 1, including 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 a digital asset identifier;
exemplarily, the transaction initiator information may be an identity certificate issued by the federation chain CA node for the transaction initiator when the transaction initiator performs uplink, a corresponding digital signature, and various keys required for encryption and decryption in the processes of performing uplink of digital assets, transactions, and the like; and when the digital asset identifier is the digital asset uplink, the alliance chain generates the unique identifier of the corresponding digital asset according to the intelligent contract. The specific procedures for digital asset uplink may include a login procedure and a digital asset uplink procedure. The login process comprises the following steps: the digital asset owner can encrypt the to-be-linked digital asset by the received key to obtain an encrypted ciphertext digital asset, wherein the encryption mode can be homomorphic encryption. Meanwhile, generating description information corresponding to the digital asset, wherein the description information comprises but is not limited to information such as digital asset type, digital asset size, complete data HASH value and transaction pricing. After the operations are completed, the digital asset owner initiates a alliance chain login request, the login request comprises an identity certificate and a digital signature of the digital asset owner, after the alliance chain is received, the intelligent contract verifies whether the identity certificate and the digital signature are correct, and if the identity certificate and the digital signature are correct, successful login information is returned to the digital asset owner.
When the login is successful, the digital asset uplink process is as follows: the digital asset owner initiates a digital asset uplink request, the digital asset uplink request comprises the digital asset and description information corresponding to the digital asset, the intelligent contract generates a unique digital asset identifier according to the received digital asset uplink request, the digital asset identifier and the digital asset are stored in a alliance chain, and the digital asset identifier and an uplink result are sent to the digital asset owner.
The transaction initiator can be any node on the alliance chain, and digital assets for transaction calculation are searched on the alliance chain in a digital asset searching mode. When the digital assets which are to be traded are retrieved, the trading initiator submits the 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 the digital asset transaction request; according to the digital asset transaction request, the determination mode of the transaction receiving party can be obtained by matching the digital asset identification in the digital asset transaction request, and the digital asset identification has uniqueness and corresponds to a unique digital asset identification owner.
S103, when the information of the transaction initiator and the transaction receiver meets the verification condition, generating a digital watermark according to the transaction request of the digital asset, wherein the digital watermark is generated according to the information of the transaction initiator, the information of the transaction receiver and the information of the digital asset;
illustratively, the verification condition may be: firstly, whether the identity information of a transaction initiator and a transaction receiver is legal is verified, if the identity information is legal, whether a corresponding executable intelligent contract exists is verified, and if the executable intelligent contract exists, whether the information of the transaction initiator and the transaction receiver meets transaction execution conditions is verified according to the intelligent contract. The method for judging whether the identity information is legal may be to verify whether the digital signatures of the transaction initiator and the transaction receiver 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 intelligent contract establishing process can be that after the transaction initiator and the transaction receiver are verified to be legal, whether the digital asset data needing to be transacted is correct is verified, when the digital asset data is correct, the nodes in the alliance chain respond to the intelligent contract establishing request to establish a corresponding intelligent contract, the alliance chain nodes achieve consensus and account keeping, so that the intelligent contract establishing is completed, and whether the information of the transaction initiator and the transaction receiver meets the transaction executing condition is verified according to the established intelligent contract.
And when the identity is legal and a corresponding executable intelligent contract exists, verifying whether the information of the transaction initiator and the transaction receiver meets the transaction execution condition or not according to the executable intelligent contract. The transaction execution condition may specifically be that the smart contract is continued to be executed only when the price of the digital asset 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 meets the verification condition, 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 transaction initiator information, the transaction receiver information and the digital asset information.
S104, according to the digital watermark and the digital asset corresponding to the digital asset transaction request, obtaining the digital asset embedded with the digital watermark;
for example, the digital asset embedded with the digital watermark may be obtained by embedding the digital watermark into the digital asset by an embedding algorithm by an intelligent contract. It should be noted that the digital asset here may be an unencrypted digital asset, or may be a homomorphic encrypted digital asset obtained by homomorphic encrypting and chaining the digital asset locally, that is, locally by the digital asset owner node, that is, locally by the transaction receiving party, before the digital asset is chained, in order to ensure the security of the digital asset.
When the digital assets are encrypted in a homomorphic manner in advance, the generated digital watermarks also need to be encrypted in the same homomorphic manner in order to completely recover the digital assets embedded with the digital watermarks.
And S105, sending the digital assets embedded with the digital watermarks to a transaction initiator according to the intelligent contract corresponding to the digital asset transaction request.
For example, the specific way of sending the digital asset embedded with the digital watermark to the transaction initiator may be that, first, the alliance-link intelligent contract sends the digital asset embedded with the digital watermark and the transaction initiator information to the transaction receiver node server, and at the same time, sends the transaction receiver node information to the transaction initiator node, where the transaction receiver node information includes the transaction receiver node server address. And when the digital asset embedded with the digital watermark is homomorphic encrypted digital asset embedded with the digital watermark, the transaction receiver node decrypts the digital asset embedded with the digital watermark and recovers the unencrypted digital asset embedded with the digital watermark. The transaction receiver node stores the digital asset embedded with the digital watermark and the transaction initiator information in a local database for waiting for a transaction. And when a downloading request of the transaction initiator is received, encrypting the digital asset embedded with the digital watermark by using the public key of the transaction initiator, and sending the encrypted digital asset embedded with the digital watermark to a transaction initiator node.
In the block chain-based digital asset transaction method provided by this embodiment, the digital watermark with the transaction initiator information, the transaction receiver information, and the digital asset information is embedded in the digital asset in the alliance chain, so that on one hand, illegal tampering of the uplink digital asset and illegal tampering of the digital watermark can be prevented; on the other hand, because each digital asset generates a unique digital watermark according to the difference between the two transaction parties and the digital asset information, the digital watermark information in the same data asset revealed by different purchasing users is different, so that the infringing user revealing the digital asset can be accurately positioned, and the digital asset right maintaining cost is reduced.
As an optional implementation manner of this embodiment, before the step S110, the method includes:
when an uplink request of a transaction node is received, the identity identification information of the transaction node is sent to a CA node, so that the CA node authenticates the identity of the transaction node according to the received identity identification information; and sending the 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 recipient node. The identification information of the transaction node includes a user name, a password, and the like of the transaction node, and the specific content of the identification information is not limited in this embodiment, and can be determined by a person skilled in the art as needed. The CA node authenticates the identity of the transaction node according to the received identity identification information, and completes the identity authentication of the transaction node access and the issuance of the identity certificate. In addition, when the identity authentication and the issuing of the identity certificate are completed, the CA node distributes all keys required by the nodes in each process of completing the transaction according to the identity of the access node, and the alliance chain distributes the distributed keys and the identity certificate to the transaction nodes.
In the digital asset transaction method based on the block chain provided by the embodiment, the CA node completes 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, because the identity certificate is issued to each transaction node, an identity verification 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 subsequent uplink of the digital assets, the transaction of the digital assets, the generation of the digital watermarks and the transmission of the digital assets, and solves the problem of data privacy protection.
As an optional implementation manner of this embodiment, the method further includes:
when a digital asset right confirmation request is received, watermark extraction is carried out on digital assets which need to be confirmed and are embedded with digital watermarks according to the digital asset right confirmation request, and the digital asset right confirmation request comprises the digital assets which need to be confirmed and are embedded with the digital watermarks; comparing the extracted watermark with the stored watermark of the corresponding digital asset; and determining the right of the corresponding digital assets according to the comparison result.
Illustratively, the digital asset right confirmation request may be initiated by any node, and the digital asset right confirmation request includes the digital asset needing right confirmation. According to the digital asset authorization request, digital watermarks of digital assets needing authorization are extracted, the extracted digital watermarks are compared with digital watermarks stored during digital asset transaction authorization to obtain a comparison value, when the comparison value is larger than a set threshold value, the size of the set threshold value can be 80%, the digital assets needing authorization are digital assets of nodes initiating the authorization request, authorization is successful, after authorization is successful, infringing user information is obtained according to the digital watermarks on the digital assets, and the infringing user information is returned to the nodes initiating the authorization request, so that the nodes initiating the authorization request locate and trace infringing users who leak the digital assets. The size of the set threshold is not limited in this embodiment, and can be determined by those skilled in the art as needed.
According to the block chain-based digital asset transaction method provided by the embodiment, the comparison between the digital watermark information is completed by receiving the digital right confirmation request, so that the digital asset right confirmation is completed, sufficient evidence is provided for the digital asset disclosure infringement, infringement judgment is facilitated, the credible traceability query of illegal digital asset disclosure is realized, and the cost of illegal disclosure of the right to maintain is reduced.
As an optional implementation manner of this embodiment, step S150 includes:
and according to the intelligent contract corresponding to the digital asset transaction request, sending the digital asset abstract to a transaction initiator, 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 the conditions specified by the smart contract, for example, the smart contract specifies that the transaction initiator pays the corresponding fee to the transaction receiver, the transaction receiver node sends a corresponding digital asset digest to the transaction initiator node, and the digital asset digest can be transmitted in a manner of P2P by being encrypted by the transaction receiver private key. The digital asset digest is the result of a hash calculation performed on the digital asset.
The data asset original file can be transferred through a server in a form of transaction initiator public key encryption and is sent to a transaction initiator node server; or directly transmitted to the server of the transaction initiator node together with the encrypted digital asset digest by means of P2P in the form of public key encryption of the transaction initiator.
The transaction initiator decrypts the received data asset original file by using the private key of the transaction initiator, performs hash calculation on the data asset original file, performs integrity comparison on the obtained hash calculation result and the digital asset abstract decrypted by using the public key of the transaction receiver, and indicates that the data asset original file is complete when the hash calculation result is completely consistent with the digital asset abstract.
In the block chain-based digital asset transaction method provided by the embodiment, by transmitting the digital asset abstract, the transaction initiator performs integrity and accuracy comparison quickly according to the digital asset abstract, so that the integrity and accuracy of the digital asset are ensured, and in the process, the digital asset abstract is decrypted by using the public key of the transaction receiver, so that the identity of the data asset provider can be verified, whether the provider is the transaction receiver is judged, and the transaction safety is improved.
As an optional implementation manner of this embodiment, step S150 includes: broadcasting a digital asset transaction; and when the transaction consensus condition is met, recording the transaction.
Illustratively, when the digital asset transaction is completed, the transaction initiator node and the transaction receiver node broadcast digital asset transaction information to other nodes, and when the digital asset transaction information meets a consensus condition, the transaction is recorded in a alliance chain, and the transaction information is packaged into blocks and stored in the alliance chain, wherein the transaction information comprises digital asset information embedded with a digital watermark, transaction party information and the like. The consensus condition may be that 51% of the consensus nodes acknowledge the transaction. The embodiment does not limit the consensus mechanism adopted by the federation chain, and those skilled in the art can determine the consensus mechanism according to needs.
According to the digital asset transaction method based on the blockchain, the transaction data is broadcasted, and when the consensus condition is met, the transaction data is recorded, so that the behavior of maliciously tampering the digital asset transaction record can be prevented, and the security of the transaction is ensured.
An embodiment of the present invention provides a block chain-based digital asset transaction apparatus, 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; for a specific embodiment, refer to a corresponding part of step S101 of the above method part, which is not described herein again.
A transaction receiver confirmation module 202, configured to determine a transaction receiver according to the digital asset transaction request; for a specific embodiment, refer to a corresponding part of step S102 of the above method part, which is not described herein again.
A digital watermark generating 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 meets the verification condition, where the digital watermark is generated according to the transaction initiator information, the transaction receiver information, and the digital asset information; for a specific embodiment, refer to a corresponding part of step S103 of the above method part, which is not described herein again.
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; for a specific embodiment, refer to a corresponding part of step S104 of the above method part, which is not described herein again.
And the digital asset sending module 205 is configured to send the digital asset embedded with the digital watermark to the transaction initiator according to the intelligent contract corresponding to the digital asset transaction request. For a specific embodiment, refer to the corresponding part of step S105 of the above method part, which is not described herein again.
As an optional implementation manner of this embodiment, the above block chain-based digital asset transaction apparatus further includes:
the identity authentication module is used for sending the identity identification information of the transaction node to a CA node when an uplink request of the transaction node is received, so that the CA node authenticates the identity of the transaction node according to the received identity identification information; for the specific implementation, reference is made to the corresponding parts of the above method, which are not described herein again.
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 receiving party and a transaction initiating party. For the specific implementation, reference is made to the corresponding parts of the above method, which are not described herein again.
As an optional implementation manner of this embodiment, the above block chain-based digital asset transaction apparatus further includes:
the watermark extraction module is used for extracting watermarks of digital assets which need to be authenticated and are embedded with digital watermarks according to the digital asset authentication request when the digital asset authentication request is received, wherein the digital asset authentication request comprises the digital assets which need to be authenticated and are embedded with the digital watermarks; for the specific implementation, reference is made to the corresponding parts of the above method, which are not described herein again.
The watermark comparison module is used for comparing the extracted watermark with the stored watermark of the corresponding digital asset; for the specific implementation, reference is made to the corresponding parts of the above method, which are not described herein again.
And the right confirming module is used for confirming the right of the corresponding digital assets according to the comparison result. For the specific implementation, reference is made to the corresponding parts of the above method, which are not described herein again.
As an optional implementation manner 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. For the specific implementation, reference is made to the corresponding parts of the above method, which are not described herein again.
As an optional implementation manner of this embodiment, the digital asset transmission module 205 includes:
a broadcast module to broadcast the digital asset transactions; for the specific implementation, reference is made to the corresponding parts of the above method, which are not described herein again.
And the recording module is used for recording the transaction when the transaction consensus condition is met. For the specific implementation, reference is made to the corresponding parts of the above method, which are not described herein again.
The embodiment of the present application also provides an electronic device, as shown in fig. 3, including a processor 310 and a memory 320, where the processor 310 and the memory 320 may be connected by a bus or in other manners.
Processor 310 may be a Central Processing Unit (CPU). The Processor 310 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof.
Memory 320, which is a non-transitory computer readable storage medium, may be used to store 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 embodiments of the present invention. The processor executes various functional applications and data processing of the processor by executing non-transitory software programs, instructions, and modules stored in the memory.
The memory 320 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one 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 and, 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 electronic device may be understood with reference to the corresponding related description and effects in the embodiment shown in fig. 1, and are not described herein again.
This embodiment also provides a computer storage medium storing computer-executable instructions that can execute the method for block chain based digital asset transaction in any of the above method embodiments. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard disk (Hard disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.