With the rapid development of the Internet,multimedia images are the key means for us to transmit information.In the current image sharing environment,images are collected on various cloud platforms through network transmission,and visual watermarking is added to deal with the infringement in image sharing.But too centralized storage may lead to security holes in image access,and the easy tampering of images may wipe out watermarks and compromise the ownership of their authors.Aiming at the above problems,this paper proposes an image data sharing mechanism based on smart contract.Firstly,an image access control model based on smart contract is proposed to access image data safely.Model implementation depends on two technical points:On the one hand,an image fine-grained access control strategy based on attribute encryption is designed.While the image is stored in the decentralized file system,the attribute encryption algorithm based on the ciphertext strategy is used to penetrate into the shared user attributes and encrypt the image access index,so as to fine-grained control the access permission of the image and ensure the security and privacy of the image.On the other hand,the image access scheme based on smart contract is adopted.Different smart contracts are set up to maintain image resources and share transaction information,and provide the function of managing attributes to support the operation of access control strategy,so as to realize decentralized image access and track its shared circulation information.Secondly,in view of the unclear ownership of the image itself,this paper proposes a scheme to confirm the ownership of the image in the sharing environment,so as to protect the ownership of the image and optimize the link of the sharing mechanism.Through a strategy of tracking and confirming the rights of shared image data,digital watermarking technology hides the information of both parties in the image,which can trace the information of shared image effectively once verified.This paper also designs an image secondary upload detection module in the mechanism.Before uploading the image,the image’s perceptual hash is calculated and compared with other image hash on the chain,so as to determine whether the image matches the uploading conditions to protect the rights and interests of the image ownership.Through experimental verification and comparison,the proposed image data sharing mechanism based on smart contract can guarantee the security of image access with low cost and protect the ownership of image from damage,which is effective. |