CN104202412A - Image storage method and system based on multiple cloud terminals - Google Patents

Image storage method and system based on multiple cloud terminals Download PDF

Info

Publication number
CN104202412A
CN104202412A CN201410470192.2A CN201410470192A CN104202412A CN 104202412 A CN104202412 A CN 104202412A CN 201410470192 A CN201410470192 A CN 201410470192A CN 104202412 A CN104202412 A CN 104202412A
Authority
CN
China
Prior art keywords
flag
pixel matrix
matrix
pixel
image
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.)
Granted
Application number
CN201410470192.2A
Other languages
Chinese (zh)
Other versions
CN104202412B (en
Inventor
张明武
陈泌文
王春枝
沈华
夏勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hubei University of Technology
Original Assignee
Hubei University of Technology
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 Hubei University of Technology filed Critical Hubei University of Technology
Priority to CN201410470192.2A priority Critical patent/CN104202412B/en
Publication of CN104202412A publication Critical patent/CN104202412A/en
Application granted granted Critical
Publication of CN104202412B publication Critical patent/CN104202412B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention discloses an image storage method and system based on multiple cloud terminals. The method includes: interference transformation is performed on a to-be-stored original image to obtain a preliminarily-encrypted image, Godel coding is used to separate the encrypted image into a certain number of sub-images, and the sub-images are stored at the cloud terminals. The method has the advantages that method storing the original image at the cloud terminal is replaced, and potential safety hazard of cloud terminal storage is solved while user image privacy protection and safety storage are achieved.

Description

一种基于多云端的图片存储方法和系统A method and system for image storage based on multi-cloud

技术领域technical field

本发明涉及云端图片处理领域和云端隐私保护领域,特别涉及一种基于多云端的图片存储方法和系统。The present invention relates to the field of cloud image processing and cloud privacy protection, in particular to a multi-cloud-based image storage method and system.

背景技术Background technique

随着存储系统由本地直连向着网络化和分布式的方向发展,并被网络上的众多计算机共享,使存储系统变得更易受到攻击,相对静态的存储系统往往成为攻击者的首选目标,达到窃取、篡改或破坏数据的目的。As the storage system develops from local direct connection to networked and distributed, and is shared by many computers on the network, the storage system becomes more vulnerable to attacks. Relatively static storage systems often become the preferred target of attackers. The purpose of stealing, falsifying or destroying data.

云端存储是一种网络线上存储的模式,即把资料存放在通常由第三方代管的多台虚拟服务器中,用户可以随时随地在线管理自己的文件,对终端没有固定的限制,方便快捷。但对于用户个人的隐私文件的保存,云端能否做到安全还是存在争议的。Cloud storage is a mode of network online storage, that is, data is stored in multiple virtual servers that are usually managed by a third party. Users can manage their files online anytime and anywhere. There is no fixed limit on the terminal, which is convenient and fast. However, for the storage of users' personal privacy files, whether the cloud can be secure is still controversial.

经过对云端的研究发现,表明云端是存在安全隐患的。首先是个人隐私泄露隐患,从技术和成本两方面考虑,云端用户的图片大多是明文保存在云端上的,云端的管理者能够轻易的查看云端的图片,这是用户不期望的。其次的数据安全隐患,云端存储的大量数据,让它成为了黑客入侵的目标,黑客可能会盗取或修改数据,造成不可挽回的损失。After research on the cloud, it is found that there are security risks in the cloud. The first is the hidden danger of personal privacy leakage. From the perspective of technology and cost, most of the pictures of cloud users are stored on the cloud in plain text. Cloud managers can easily view the pictures in the cloud, which is not expected by users. The second hidden danger of data security, the large amount of data stored in the cloud, makes it a target of hackers. Hackers may steal or modify data, causing irreparable losses.

安全存储要解决的问题有两个问题,如何保证文件数据完整可靠不泄密?如何保证只有合法的用户,才能够访问相关的文件?解决上面两个问题用到的核心方法是数据加密和认证授权管理。然而,当前的图片安全保存方案中,大多基于文件加密的方式,对文件进行加密,然后解密密钥进行解密。但图片加密是相对复杂的,同时加密单一文件可能导致密钥丢失或者文件损毁,最终导致文件丢失。当前云端安全存储的方案大多基于对云端自身的保护,强调云端自身的安全性,以此保证云端的数据安全。数据自身加密又存在这复杂性和易丢失性,因此,一种安全多云端的图片存储方案是有必要的。There are two problems to be solved in secure storage. How to ensure that the file data is complete, reliable and not leaked? How to ensure that only legitimate users can access relevant files? The core methods used to solve the above two problems are data encryption and authentication and authorization management. However, most of the current image security storage schemes are based on file encryption, encrypting files, and then decrypting them with a decryption key. However, image encryption is relatively complicated, and encrypting a single file at the same time may result in the loss of the key or damage to the file, eventually resulting in the loss of the file. Most of the current cloud security storage solutions are based on the protection of the cloud itself, emphasizing the security of the cloud itself, so as to ensure the data security in the cloud. The encryption of the data itself is complex and easy to lose. Therefore, a secure multi-cloud image storage solution is necessary.

发明内容Contents of the invention

本发明要解决的技术问题是:一种基于多云端的图片存储方法和系统解决了图片在云端的安全问题,单点失效问题和隐私泄露问题。The technical problem to be solved by the present invention is: a multi-cloud-based picture storage method and system solves the security problems of pictures in the cloud, the problem of single point failure and the problem of privacy leakage.

本发明为了解决上述的技术问题,提出了一种基于多云端的图片存储方法和系统。In order to solve the above-mentioned technical problems, the present invention proposes a multi-cloud based image storage method and system.

本发明的技术方案是:一种基于多云端的图片存储方法,包括如下步骤:The technical solution of the present invention is: a method for storing images based on multi-cloud, comprising the following steps:

步骤1:图片存储步骤;Step 1: image storage step;

步骤1.1:提取原图的像素矩阵A,为像素矩阵添加唯一标识flag,并保存图片的flag值;计算干扰后的像素矩阵B,B=C×A×C,系统保存C-1,其中,矩阵C为像素矩阵A相同大小的初等变换矩阵,C-1为矩阵C的逆矩阵;Step 1.1: Extract the pixel matrix A of the original image, add a unique flag to the pixel matrix, and save the flag value of the picture; calculate the pixel matrix B after interference, B=C×A×C, and the system saves C -1 , where, Matrix C is an elementary transformation matrix of the same size as pixel matrix A, and C -1 is the inverse matrix of matrix C;

步骤1.2:将原图像转换成N个子图,并构造参数T,其中,T代表能够恢复原图的最少子图个数,N和T均为正数且T≤N;Step 1.2: Convert the original image into N subimages, and construct a parameter T, where T represents the minimum number of subimages that can restore the original image, and both N and T are positive numbers and T≤N;

步骤1.3:对干扰后的像素矩阵B的第i行进行哥德尔编码,转换出的哥德尔编码数为Gi,遍历像素矩阵的每一行;其中:若图片像素矩阵大小为r×c,i的取值为(1,2,3,……,c),i、r和c为正整数;Step 1.3: Perform Gödel coding on the i-th row of the disturbed pixel matrix B, the converted Gödel code number is Gi, and traverse each row of the pixel matrix; where: if the size of the image pixel matrix is r×c, i’s The value is (1,2,3,...,c), i, r and c are positive integers;

步骤1.4:根据Gi和flag构造多项式,Gi构造的多项式得到N张子图的像素矩阵(P1,P2,……,PN),根据产生的像素矩阵(P1,P2,……,PN)构成子图;同时,flag构造的多项式得到附加验证标识,为子图添加附加验证标识信息;Step 1.4: Construct a polynomial according to Gi and flag. The polynomial constructed by Gi can obtain the pixel matrix (P 1 , P 2 , ..., P N ) of N subimages. According to the generated pixel matrix (P 1 , P 2 , ..., P N ) constitutes a subgraph; meanwhile, the polynomial constructed by flag obtains an additional verification mark, and adds additional verification mark information for the subgraph;

步骤1.5:为每张子图添加二次标记,,然后将标记好的子图随机均匀的分配到多个云端之中;Step 1.5: Add secondary marks to each subgraph, and then distribute the marked subgraphs randomly and evenly to multiple clouds;

步骤2:图片恢复步骤:Step 2: Picture Recovery Steps:

步骤2.1:从多个云端中选择子图;Step 2.1: Select subgraphs from multiple clouds;

步骤2.2:对选择的子图进行二次标记验证,如果子图标记验证通过,则保留当前子图进入步骤2.3,否则,舍弃该子图后返回步骤2.1;Step 2.2: Perform secondary label verification on the selected subgraph, if the subgraph label verification is passed, keep the current subgraph and enter step 2.3, otherwise, discard the subgraph and return to step 2.1;

步骤2.3:判断子图数量是否达到T个;是则进入步骤2.4,否则返回步骤2.1;Step 2.3: Determine whether the number of subgraphs reaches T; if yes, enter step 2.4, otherwise return to step 2.1;

步骤2.4:提取T张子图的像素矩阵(P1,P2,……,PT),将T张像素矩阵的第i行转换成哥德尔编码数Si t,其中i表示像素矩阵的第i行,t表示第t张子图,t在1到T之间,Si t表示为第t张子图的像素矩阵的第i行像素转化成的哥德尔编码数;Step 2.4: Extract pixel matrices (P 1 , P 2 , ..., P T ) of T subimages, and convert the i-th row of T pixel matrices into Gödel code numbers S i t , where i represents the i-th pixel matrix row, t represents the t-th sub-image, t is between 1 and T, and S i t represents the number of Gödel codes converted from the pixels in the i-th row of the pixel matrix of the t-th sub-image;

步骤2.5:根据步骤2.4得到的Si t同时利用拉格朗日插值其中:t为整数,表示第t张图片,j为整数,表示获取子图中第j张图片,mod p是取模p,p为一个大素数;到恢复干扰像素矩阵B‵的哥德尔编码数Gi‵,将求出的Gi‵进行哥德尔编码转换得到像素矩阵第i行的像素,通过对T张子图的每一行进行上述运算,得到完整的恢复干扰像素矩阵B‵;Step 2.5: According to S i t obtained in Step 2.4, use Lagrangian interpolation at the same time Among them: t is an integer, indicating the t-th picture, j is an integer, indicating that the j-th picture in the sub-image is obtained, mod p is the modulo p, and p is a large prime number; to restore the Gödel code of the interference pixel matrix B‵ Count Gi‵, convert the calculated Gi‵ to Gödel encoding to obtain the pixel in the i-th row of the pixel matrix, and perform the above operation on each row of the T subimages to obtain a complete restored interference pixel matrix B‵;

步骤2.6:根据第t张子图的附加验证标识H(t),得到T个(t,H(t))坐标点,求出多项式的常数项,利用拉格朗日插值得到待匹配flag‵;Step 2.6: Obtain T (t, H(t)) coordinate points according to the additional verification mark H(t) of the t-th sub-image, find out the constant term of the polynomial, and use Lagrangian interpolation Get the flag‵ to be matched;

步骤2.7:将待匹配flag‵值与原图flag值进行比较,若flag‵与flag不等时,则返回步骤2.1;若flag‵=flag则确定B‵=B,进入步骤2.8;Step 2.7: Compare the flag‵ value to be matched with the flag value of the original image, if flag‵ and flag are not equal, return to step 2.1; if flag‵=flag, determine B‵=B, and enter step 2.8;

步骤2.8:将B‵进行干扰还原;利用C-1恢复原图像素矩阵A,其中,C-1为像素矩阵A的初等变换矩阵C的逆矩阵,最后计算A=C-1B‵ C-1=C-1B C-1=C-1CAC C-1,得到原图像。Step 2.8: Restore B‵ from interference; use C -1 to restore the original image pixel matrix A, where C -1 is the inverse matrix of the elementary transformation matrix C of the pixel matrix A, and finally calculate A=C -1 B‵ C - 1 = C -1 B C -1 = C -1 CAC C -1 , to obtain the original image.

所述的步骤1.4包括如下步骤:Described step 1.4 comprises the following steps:

步骤1.4.1:根据Gi构造转换多项式,其中:mod p是对多项式取模,p为大素数,j为一个值从1到T-1的变量,aj表示(a1,a2,……,aT-1),xj表示x的j次幂,计算得到c组(Fi(1),……,Fi(N))的值,将这些哥德尔编码数再转换成第i行的像素值,得到第i行的像素,并得到N个r×c行的像素矩阵(P1,P2,……,PN);其中,系统在(0,P)范围内随机产生T-1个数(a1,a2,……,aT-1),为创建多项式提供系数,P为大素数的模数;Step 1.4.1: Construct the conversion polynomial according to Gi, Among them: mod p is the polynomial modulus, p is a large prime number, j is a variable with a value from 1 to T-1, a j means (a 1 , a 2 ,..., a T-1 ), x j means The j-th power of x is calculated to obtain the value of group c (Fi(1),...,Fi(N)), and then convert these Gödel code numbers into the pixel value of the i-th row to obtain the pixel of the i-th row, And get N r×c row pixel matrix (P 1 , P 2 ,..., P N ); wherein, the system randomly generates T-1 numbers (a 1 , a 2 , ..., a T-1 ), provide coefficients for creating polynomials, and P is the modulus of a large prime number;

步骤1.4.2:根据flag构造标记多项式j为一个值从1到T-1的变量,aj表示(a1,a2,……,aT-1),xj表示x的j次幂,将计算得到的H(t)分配给第t张子图作为附加验证标识,t的取值为(1,2,……,N);计算的结果为每个子图的附加验证标识。Step 1.4.2: Construct a flag polynomial according to flag j is a variable whose value ranges from 1 to T-1, a j represents (a 1 , a 2 ,..., a T-1 ), x j represents the jth power of x, and the calculated H(t) is distributed Give the tth subgraph as an additional verification mark, and the value of t is (1, 2, ..., N); the calculated result is the additional verification mark of each subgraph.

所述的步骤1.2中的N和T的取值分别为N=5,T=3。The values of N and T in the step 1.2 are respectively N=5 and T=3.

一种基于多云端的图片存储系统,其特征在于,包括图片存储模块和图片恢复模块;A picture storage system based on multi-cloud, characterized in that it includes a picture storage module and a picture recovery module;

图片存储模块包括:The picture storage module includes:

第一提取模块:用于提取原图的像素矩阵A,为像素矩阵添加唯一标识flag,并保存图片的flag值;计算干扰后的像素矩阵B,B=C×A×C,系统保存C-1,其中,矩阵C为像素矩阵A相同大小的初等变换矩阵,C-1为矩阵C的逆矩阵;The first extraction module: used to extract the pixel matrix A of the original image, add a unique identification flag to the pixel matrix, and save the flag value of the picture; calculate the pixel matrix B after interference, B=C×A×C, and the system saves C - 1 , where matrix C is an elementary transformation matrix of the same size as pixel matrix A, and C -1 is the inverse matrix of matrix C;

参数构造模块:用于将原图像转换成N个子图,并构造参数T,其中,T代表能够恢复原图的最少子图个数,N和T均为正数且T≤N;Parameter construction module: used to convert the original image into N subimages, and construct a parameter T, where T represents the minimum number of subimages that can restore the original image, N and T are both positive numbers and T≤N;

编码模块:用于对干扰后的像素矩阵B的第i行进行哥德尔编码,转换出的哥德尔编码数为Gi,遍历像素矩阵的每一行;其中:若图片像素矩阵大小为r×c,i的取值为(1,2,3,……,c),i、r和c为正整数;Coding module: used to perform Gödel encoding on the i-th row of the disturbed pixel matrix B, the converted Gödel encoding number is Gi, and traverse each row of the pixel matrix; where: if the size of the image pixel matrix is r×c, The value of i is (1,2,3,...,c), i, r and c are positive integers;

多项式构造模块:用于根据Gi和flag构造多项式,Gi构造的多项式得到N张子图的像素矩阵(P1,P2,……,PN),根据产生的像素矩阵(P1,P2,……,PN)构成子图;同时,flag构造的多项式得到附加验证标识,为子图添加附加验证标识信息;Polynomial construction module: used to construct a polynomial according to Gi and flag, the polynomial constructed by Gi obtains pixel matrices (P 1 , P 2 , ..., P N ) of N subimages, and generates pixel matrices (P 1 , P 2 , ... ..., P N ) constitute a subgraph; meanwhile, the polynomial constructed by flag gets an additional verification mark, and adds additional verification mark information for the subgraph;

分配模块:用于为每张子图添加二次标记,,然后将标记好的子图随机均匀的分配到多个云端之中;Allocation module: used to add secondary marks to each sub-image, and then distribute the marked sub-images randomly and evenly to multiple clouds;

图片恢复模块包括:Image recovery modules include:

选择模块:用于从多个云端中选择子图,selection module: used to select subgraphs from multiple clouds,

验证模块:对选择的子图进行二次标记验证,如果子图标记验证通过,则保留当前子图进入判断模块,否则,舍弃该子图后返回选择模块;Verification module: perform secondary mark verification on the selected sub-graph, if the sub-graph mark verification is passed, keep the current sub-graph and enter the judgment module, otherwise, discard the sub-graph and return to the selection module;

判断模块:判断子图数量是否达到T个;是则进入第二提取模块,否则返回选择模块;Judgment module: judge whether the number of subgraphs reaches T; if yes, enter the second extraction module, otherwise return to the selection module;

第二提取模块:用于提取T张子图的像素矩阵(P1,P2,……,PT),将T张像素矩阵的第i行转换成哥德尔编码数Si t,其中i表示像素矩阵的第i行,t表示第t张子图,t在1到T之间,所以Si t表示为第t张子图的像素矩阵的第i行像素转化成的哥德尔编码数。The second extraction module: used to extract the pixel matrix (P 1 , P 2 , ..., P T ) of T subimages, and convert the i-th row of the T pixel matrix into a Gödel coded number S i t , where i represents a pixel In the i-th row of the matrix, t represents the t-th sub-image, and t is between 1 and T, so S i t represents the number of Gödel codes converted from the pixels in the i-th row of the pixel matrix of the t-th sub-image.

恢复模块:用于根据提取模块得到的Sit同时利用拉格朗日插值 其中:t为整数,表示第t张图片,j为整数,表示获取子图中第j张图片,mod p是取模p,p为一个大素数;到恢复干扰像素矩阵B‵的哥德尔编码数Gi‵,将求出的Gi‵进行哥德尔编码转换得到像素矩阵第i行的像素,通过对T张子图的每一行进行上述运算,得到完整的恢复干扰像素矩阵B‵;Restoration module: used to use Lagrangian interpolation at the same time according to the Sit obtained by the extraction module Among them: t is an integer, indicating the t-th picture, j is an integer, indicating that the j-th picture in the sub-image is obtained, mod p is the modulo p, and p is a large prime number; to restore the Gödel code of the interference pixel matrix B‵ Count Gi‵, convert the calculated Gi‵ to Gödel encoding to obtain the pixel in the i-th row of the pixel matrix, and perform the above operation on each row of the T subimages to obtain a complete restored interference pixel matrix B‵;

匹配模块:根据第t张子图的附加验证标识H(t),得到T个(t,H(t))坐标点,求出多项式的常数项,利用拉格朗日插值得到待匹配flag‵;Matching module: According to the additional verification mark H(t) of the t-th sub-image, T (t, H(t)) coordinate points are obtained, the constant term of the polynomial is obtained, and Lagrangian interpolation is used Get the flag‵ to be matched;

比较模块:用于将待匹配flag‵值与原图flag值进行比较,若flag‵与flag不等时,则返回选择模块;若flag‵=flag则确定B‵=B,进入计算模块;Comparison module: used to compare the flag‵ value to be matched with the flag value of the original image, if flag‵ and flag are not equal, return to the selection module; if flag‵=flag, determine B‵=B, and enter the calculation module;

计算模块:用于将B‵进行干扰还原;利用C-1恢复原图像素矩阵A,其中,C-1为像素矩阵A的初等变换矩阵C的逆矩阵,最后计算A=C-1B‵ C-1=C-1B C-1=C-1CAC C-1,得到原图像。Calculation module: used to restore B‵ to interference; use C -1 to restore the original image pixel matrix A, where C -1 is the inverse matrix of the elementary transformation matrix C of the pixel matrix A, and finally calculate A=C -1 B‵ C -1 =C -1 B C -1 =C -1 CAC C -1 , to obtain the original image.

本发明的有益效果是:The beneficial effects of the present invention are:

首先,一种基于多云端的图片存储方法是基于多云端的图片安全存储方案,主要通过利用图片的分存思想解决了图片在云端存储的安全问题,防止了云端图片隐私被泄露和对图片不慎操作删除图片造成单点失效的情况,通过把一张原图分存到多个云端,成功的保护了图片的安全。First of all, a multi-cloud-based image storage method is a multi-cloud-based image security storage solution, which mainly solves the security problem of image storage in the cloud by using the idea of image sharing, and prevents the privacy of cloud images from being leaked and inappropriate for images. Deleting images with caution caused a single point of failure, and successfully protected the security of the images by splitting an original image into multiple clouds.

其次,本方法是基于多云端的图片安全存储方案,利用了初等变换和哥德尔编码解决了图片处理中的低效问题,充分利用了云端的计算能力,通过简单的变换解决复杂问题。从而使方案的效率大大提高。Secondly, this method is based on a multi-cloud image security storage solution, which uses elementary transformations and Gödel coding to solve the inefficiency problem in image processing, makes full use of the computing power of the cloud, and solves complex problems through simple transformations. So that the efficiency of the program is greatly improved.

附图说明Description of drawings

图1是图片存储步骤的流程示意图;Fig. 1 is the schematic flow chart of image storage step;

图2是图片恢复步骤的流程示意图;Fig. 2 is a schematic flow chart of the picture recovery step;

图3是本发明的流程示意图。Fig. 3 is a schematic flow chart of the present invention.

具体实施方式Detailed ways

下面将结合本方案的附图,对本方案实施过程进行清楚完整的描述,显然,所描述的实施方案是方案核心过程。基于本方案中的实施例,本领域人员在没有做出创新性劳动的前提下,所有实施步骤均为本方案的保护范围。The implementation process of this solution will be clearly and completely described below in conjunction with the accompanying drawings of this solution. Apparently, the described implementation is the core process of the solution. Based on the embodiments in this scheme, all implementation steps are within the scope of protection of this scheme on the premise that those skilled in the art do not make innovative efforts.

一种基于多云端的图片存储方法,其特征在于,包括如下步骤:A method for storing images based on multiple clouds, comprising the steps of:

步骤1:图片存储步骤;Step 1: image storage step;

步骤1.1.提取原图的像素矩阵A,为像素矩阵添加唯一标识flag,并保存图片的flag值;计算干扰后的像素矩阵B,B=C×A×C,系统保存C-1,其中,矩阵C为像素矩阵A相同大小的初等变换矩阵,C-1为矩阵C的逆矩阵。Step 1.1. Extract the pixel matrix A of the original image, add a unique flag to the pixel matrix, and save the flag value of the picture; calculate the pixel matrix B after interference, B=C×A×C, and the system saves C -1 , where, Matrix C is an elementary transformation matrix of the same size as pixel matrix A, and C -1 is the inverse matrix of matrix C.

用户通过移动设备或者pc端等联网设备登陆云端,并选择要保存的图片P1,提取图片的像素矩阵A,系统产生唯一标示flag,将flag作为附加信息添加到矩阵A中,flag值可为一个随机整数,则得到(A,flag),系统生成一个初等变换矩阵C和逆矩阵C-1,初等矩阵的规模和像素矩阵大小相等。对原始像素矩阵A进行初等变换得到B,即将A左乘C进行行变换,然后右乘C进行列变换得到干扰后矩阵(B,flag)。在本实施例中,模型演示为设矩阵A为3×3矩阵 7 8 9 4 5 6 1 2 3 , 系统产生随机数1作为flag的值即flag=1,初等变换矩阵C为3×3矩阵 0 1 0 0 0 1 1 0 0 , 逆矩阵C-1为 0 0 1 1 0 0 0 1 0 开始数据为( 7 8 9 4 5 6 1 2 3 , 1),经过变换后B=C×A×C。 B = 0 1 0 0 0 1 1 0 0 × 7 8 9 4 5 6 1 2 3 × 0 1 0 0 0 1 1 0 0 , 经过计算的到 B = 6 4 1 3 1 2 9 7 8 可以看出干扰效果明显,经过这一步骤后得到数据为(B,1)。The user logs in to the cloud through a mobile device or a connected device such as a PC, and selects the picture P 1 to be saved, extracts the pixel matrix A of the picture, and the system generates a unique flag, which is added to the matrix A as additional information. The flag value can be A random integer is obtained (A, flag), and the system generates an elementary transformation matrix C and an inverse matrix C -1 , and the scale of the elementary matrix is equal to the size of the pixel matrix. The original pixel matrix A is subjected to elementary transformation to obtain B, that is, A is multiplied by C to the left for row transformation, and then C is right-multiplied for column transformation to obtain the post-disturbance matrix (B, flag). In this embodiment, the model demonstration is assuming that matrix A is a 3×3 matrix 7 8 9 4 5 6 1 2 3 , The system generates a random number 1 as the value of flag, that is, flag=1, and the elementary transformation matrix C is a 3×3 matrix 0 1 0 0 0 1 1 0 0 , The inverse matrix C-1 is 0 0 1 1 0 0 0 1 0 The starting data is ( 7 8 9 4 5 6 1 2 3 , 1), B=C×A×C after transformation. B = 0 1 0 0 0 1 1 0 0 × 7 8 9 4 5 6 1 2 3 × 0 1 0 0 0 1 1 0 0 , calculated to B = 6 4 1 3 1 2 9 7 8 It can be seen that the interference effect is obvious, and the data obtained after this step is (B, 1).

步骤1.2.将原图像转换成N个子图,并构造参数T,其中,T代表能够恢复原图的最少子图个数,N和T均为正数且T≤N。步骤1.1结束后,方案提供两个数据N,T。N,T均为正数且T<=N,N代表原始图像要转换成子图的个数,T代表能够恢复原图的最少子图个数。分别为N=5,T=3,为后续步骤提供系统参数;Step 1.2. Convert the original image into N subimages, and construct a parameter T, where T represents the minimum number of subimages that can restore the original image, and both N and T are positive numbers and T≤N. After step 1.1, the scheme provides two data N, T. Both N and T are positive numbers and T<=N, N represents the number of sub-images to be converted from the original image, and T represents the minimum number of sub-images that can restore the original image. Respectively N=5, T=3, system parameters are provided for subsequent steps;

步骤1.3.对干扰后的像素矩阵B的第i行进行哥德尔编码,转换出的哥德尔编码数为Gi,遍历像素矩阵的每一行;其中:若图片像素矩阵大小为r×c,i的取值为(1,2,3,……,c),i、r和c为正整数。在本实施例中,对干扰后像素矩阵 B = 6 4 1 3 1 2 9 7 8 进行哥德尔变换,B由1产生。则第一行G1=26×34×51=64×81×5=25920.G2=23×31×52=600,G3=29×37×58=512×27×390625=5400000000,Step 1.3. Perform Gödel encoding on the i-th row of the disturbed pixel matrix B, the converted Gödel encoding number is Gi, and traverse each row of the pixel matrix; where: if the size of the picture pixel matrix is r×c, the value of i The value is (1,2,3,...,c), i, r and c are positive integers. In this embodiment, for the disturbed pixel matrix B = 6 4 1 3 1 2 9 7 8 Performing the Gödel transformation, B is generated from 1. Then the first row G 1 =2 6 ×3 4 ×5 1 =64×81×5=25920.G 2 =2 3 ×3 1 ×5 2 =600, G 3 =2 9 ×3 7 ×5 8 = 512×27×390625=5400000000,

步骤1.4.根据Gi和flag构造多项式,Gi构造的多项式得到N张子图的像素矩阵(P1,P2,……,PN),根据产生的像素矩阵(P1,P2,……,PN)构成子图;同时,flag构造的多项式得到附加验证标识,为子图添加附加验证标识信息;Step 1.4. Construct a polynomial according to Gi and flag. The polynomial constructed by Gi obtains the pixel matrix (P 1 , P 2 , ..., P N ) of N subimages. According to the generated pixel matrix (P 1 , P 2 , ..., P N ) constitutes a subgraph; meanwhile, the polynomial constructed by flag obtains an additional verification mark, and adds additional verification mark information for the subgraph;

步骤1.4.1:根据Gi构造转换多项式,其中:mod P是对多项式取模,P为大素数,j为一个值从1到T-1的变量,aj表示(a1,a2,……,aT-1),xj表示x的j次幂,计算得到c组(Fi(1),……,Fi(N))的值,将这些哥德尔编码数再转换成第i行的像素值,得到第i行的像素,并得到N个r×c行的像素矩阵(P1,P2,……,PN);其中,系统在(0,P)范围内随机产生T-1个数(a1,a2,……,aT-1),为创建多项式提供系数,P为大素数的模数;Step 1.4.1: Construct the conversion polynomial according to Gi, Among them: mod P is the polynomial modulus, P is a large prime number, j is a variable with a value from 1 to T-1, a j means (a 1 , a 2 ,..., a T-1 ), x j means The j-th power of x is calculated to obtain the value of group c (Fi(1),...,Fi(N)), and then convert these Gödel code numbers into the pixel value of the i-th row to obtain the pixel of the i-th row, And get N r×c row pixel matrix (P 1 , P 2 ,..., P N ); wherein, the system randomly generates T-1 numbers (a 1 , a 2 , ..., a T-1 ), provide coefficients for creating polynomials, and P is the modulus of a large prime number;

在本实施例中,系统产生T-1=3-1=2个随机数(a1,a2),分为a1=1,a2=2.则可以构造三个多项式为F1(x)=G1+x+2x2,F2(x)=G2+x+2x2,F3(x)=G3+x+2x2,x表示为方程变量,计算(Fi(1)Fi(2),……,Fi(5))得到三组数据(F1(1)=25923,F1(2)=25930,F1(3)=25941,F1(4)=25956,F1(5)=25975),(F1(1)=603,F2(2)=610,F2(3)=618,F2(4)=636,F2(5)=655),(F3(1)=5400000003,F3(2)=5400000010,F3(3)=5400000018,F3(4)=5400000036,F3(5)=5400000055),根据算术基本定理,又称为正整数的唯一分解定理,每个大于1的自然数均可写为质数的积,而且这些素因子按大小排列之后,写法仅有一种方式,因此计算得到的每个哥德尔编码数可以转换成新的一组数,将转换的这组数作为子图像素矩阵的一行,因此实现将这些转换成像素矩阵形式得到五个像素矩阵,分别为P1,P2,P3,P4,P5。如P1,它由 F 1 ( 1 ) F 2 ( 1 ) F 3 ( 1 ) 25923 603 5400000003 , 对其进行质数分解,转换成像素矩阵为 3 8641 0 3 3 67 2 2 &times; 3 17 257 . 其他依次类推,对每个数分解。In this embodiment, the system generates T-1=3-1=2 random numbers (a 1 , a 2 ), divided into a 1 =1, a 2 =2. Then three polynomials can be constructed as F 1 ( x)=G 1 +x+2x 2 , F 2 (x)=G 2 +x+2x 2 , F 3 (x)=G 3 +x+2x 2 , x is expressed as an equation variable, calculation (Fi(1 )Fi(2),...,Fi(5)) to get three sets of data (F 1 (1)=25923, F 1 (2)=25930, F 1 (3)=25941, F 1 (4)=25956 , F 1 (5)=25975), (F 1 (1)=603, F 2 (2)=610, F 2 (3)=618, F 2 (4)=636, F 2 (5)=655 ), (F 3 (1)=5400000003, F 3 (2)=5400000010, F 3 (3)=5400000018, F 3 (4)=5400000036, F 3 (5)=5400000055), according to the Fundamental Theorem of Arithmetic, and Known as the unique decomposition theorem of positive integers, every natural number greater than 1 can be written as a product of prime numbers, and after these prime factors are arranged in size, there is only one way to write them, so each Gödel coded number obtained by calculation can be converted into a new set of numbers, and the converted set of numbers is used as a row of the pixel matrix of the sub-image, so the implementation converts these into a pixel matrix form to obtain five pixel matrices, which are P 1 , P 2 , P 3 , P 4 , P5 . As P 1 , it consists of f 1 ( 1 ) f 2 ( 1 ) f 3 ( 1 ) Right now 25923 603 5400000003 , It is decomposed by prime number and converted into a pixel matrix as 3 8641 0 3 3 67 2 2 &times; 3 17 257 . Others and so on, decompose each number.

步骤1.4.2:根据flag构造标记多项式j为一个值从1到T-1的变量,aj表示(a1,a2,……,aT-1),xj表示x的j次幂,将计算得到的H(t)分配给第t张子图作为附加验证标识,t的取值为(1,2,……,N);计算的结果为每个子图的附加验证标识。Step 1.4.2: Construct a flag polynomial according to flag j is a variable whose value ranges from 1 to T-1, a j represents (a 1 , a 2 ,..., a T-1 ), x j represents the jth power of x, and the calculated H(t) is distributed Give the tth subgraph as an additional verification mark, and the value of t is (1, 2, ..., N); the calculated result is the additional verification mark of each subgraph.

在本实施例中,flag=1,随机数(a1,a2)构造H(x)=1+x+2x2。计算(H(1)=4,H(2)=11,H(3)=19,H(4)=37,H(5)=56),经过上面不过程可得到五个与原图类似的结构(P1,4)(P2,11)(P3,19)(P4,37)(P5,56)。In this embodiment, flag=1, random number (a 1 , a 2 ) structure H(x)=1+x+2x 2 . Calculation (H(1)=4, H(2)=11, H(3)=19, H(4)=37, H(5)=56), after the above process, you can get five similar to the original picture The structure of (P 1 ,4)(P 2 ,11)(P 3 ,19)(P 4 ,37)(P 5 ,56).

步骤1.5.为每张子图添加标记,如数字签名等,后将标记好的子图随机均匀的分配到多个云端之中。为每张子图添加标记,然后将标记好的子图随机均匀的分配到多个云端之中,避免单个云端存储过多子图。标记后子图1,子图2,子图3,子图4,子图5。存储在三个云端,云端1保存子图1和子图2,云端2保存子图3,子图4,云端3保存子图5.Step 1.5. Add a mark to each subgraph, such as a digital signature, and then distribute the marked subgraphs randomly and evenly to multiple clouds. Add a mark to each sub-graph, and then distribute the marked sub-graphs randomly and evenly to multiple clouds to avoid storing too many sub-graphs in a single cloud. Subgraph 1, Subgraph 2, Subgraph 3, Subgraph 4, Subgraph 5 after marking. Stored in three clouds, cloud 1 saves sub-picture 1 and sub-picture 2, cloud 2 saves sub-picture 3 and sub-picture 4, cloud 3 saves sub-picture 5.

下面为图片恢复步骤:The following are the steps for image recovery:

步骤2.1.从多个云端中选择子图。由于在本实施例中,T=3,所以只需找到3张子图将可以进行恢复。Step 2.1. Select subgraphs from multiple clouds. Since T=3 in this embodiment, it only needs to find 3 subgraphs to restore.

步骤2.2.对选择的子图进行二次标记验证,如果子图标记验证通过,则保留当前子图进入步骤2.3,否则,舍弃该子图后返回步骤2.1;Step 2.2. Carry out secondary label verification on the selected subgraph, if the subgraph label verification is passed, then keep the current subgraph and enter step 2.3, otherwise, return to step 2.1 after discarding the subgraph;

标记验证过程,在云端2中选择子图3,验证子图3的标记,通过验证则保留子图3,当前保留子图数为1,由于小于T,继续验证子图。从云端2中选择被破坏的子图1’,验证子图,验证失败,舍弃。In the mark verification process, select sub-graph 3 in cloud 2, verify the mark of sub-graph 3, and keep sub-graph 3 after passing the verification. The number of reserved sub-graphs is currently 1. Since it is less than T, continue to verify the sub-graph. Select the destroyed subgraph 1' from cloud 2, verify the subgraph, and discard it if the verification fails.

步骤2.3.判断子图数量是否达到T个;是则进入步骤2.4,否则返回步骤2.1;Step 2.3. Determine whether the number of subgraphs reaches T; if yes, enter step 2.4, otherwise return to step 2.1;

在本实施例中,从云端2中选择子图4,验证标记,通过验证保留子图4,从云端3中选择子图5,验证标记,通过验证保留子图5,当前保留子图数为3等于T。In this embodiment, select sub-image 4 from cloud 2, verify the mark, and retain sub-image 4 through verification, select sub-image 5 from cloud 3, verify the mark, and retain sub-image 5 through verification. The number of currently reserved sub-images is 3 is equal to T.

步骤2.4.提取T张子图的像素矩阵,将T张像素矩阵的第i行转换成哥德尔编码数Si t,其中i表示像素矩阵的第i行,t表示第t张子图,t在1到T之间,所以Si t表示为第t张子图的像素矩阵的第i行像素转化成的哥德尔编码数。Step 2.4. Extract the pixel matrix of T subimages, and convert the i-th row of the T pixel matrix into a Gödel coded number S i t , where i represents the i-th row of the pixel matrix, and t represents the t-th subimage, and t is between 1 and T Between, so S i t is expressed as the number of Gödel codes converted from the pixels in the i-th row of the pixel matrix of the t-th sub-image.

在本实施例中,经过步骤2.3得到子图3的像素矩阵P3,子图4的像素矩阵P4,得到子图5像素矩阵P5,以及,三张子图的附加信息H(3),H(4),H(5),即为(P3,19),(P4,37),(P5,56)。将子图像素矩阵P3,P4和P5的每一行转换成哥德尔编码数,由于三个矩阵均为3*3方阵,所以得到三组组数据,数据一为((3,25941),(3,618),(3,5400000018)),数据二为((4,25956),(4,636),(4,5400000036)),数据三为((5,25975),(5,655),(5,5400000055))。In this embodiment, the pixel matrix P 3 of the sub-image 3 and the pixel matrix P 4 of the sub-image 4 are obtained through step 2.3, the pixel matrix P 5 of the sub-image 5 is obtained, and the additional information H(3), H of the three sub-images (4), H(5), namely (P 3 ,19), (P 4 ,37), (P 5 ,56). Convert each row of the sub-picture pixel matrix P 3 , P 4 and P 5 into a Gödel code number. Since the three matrices are all 3*3 square matrices, three groups of data are obtained, and the data one is ((3, 25941 ), (3, 618), (3, 5400000018)), data two is ((4, 25956), (4, 636), (4, 5400000036)), data three is ((5, 25975), (5 , 655), (5, 5400000055)).

步骤2.5.根据步骤2.4得到的Si t同时利用拉格朗日插值其中:t为整数,表示第t张图片,j为整数,表示获取子图中第j张图片,mod p是取模p,p为一个大素数;到恢复干扰像素矩阵B‵的哥德尔编码数Gi‵,将求出的Gi‵进行哥德尔编码转换得到像素矩阵第i行的像素,通过对T张子图的每一行进行上述运算,得到完整的恢复干扰像素矩阵B‵;Step 2.5. According to the S i t obtained in step 2.4, use Lagrangian interpolation at the same time Among them: t is an integer, indicating the t-th picture, j is an integer, indicating that the j-th picture in the sub-image is obtained, mod p is the modulo p, and p is a large prime number; to restore the Gödel code of the interference pixel matrix B‵ Count Gi‵, convert the calculated Gi‵ to Gödel encoding to obtain the pixel in the i-th row of the pixel matrix, and perform the above operation on each row of the T subimages to obtain a complete restored interference pixel matrix B‵;

在本实施例中,由步骤2.4得到的数据,根据拉格朗日插值可知已知二次多项式上的三个点,可求出二次多项式,因为根据三组数据求出步骤3中的三个函数F1(x),F2(x),F3(x),然后令x等于0,求出常数项。求三个函数时,应用的拉格朗日插值公式为计算F1(0)=25920,F2(0)=600,F3(0)=5400000000,然后将得到的哥德尔编码数转换成矩阵第一行为(6,4,1)第二行为(3,1,2),第三行为(9,8,7)则可以得到像素矩阵 B = 6 4 1 3 1 2 9 7 8 . In this embodiment, from the data obtained in step 2.4, according to Lagrangian interpolation, it can be known that three points on the quadratic polynomial are known, and the quadratic polynomial can be obtained, because the three points in step 3 are obtained according to the three sets of data. function F1(x), F2(x), F3(x), and then set x equal to 0 to find the constant term. When calculating three functions, the applied Lagrangian interpolation formula is Calculate F1 (0) = 25920, F2 (0) = 600, F3 (0) = 5400000000, and then convert the obtained Gödel code number into a matrix with the first row (6,4,1) and the second row (3,1 ,2), the third row (9,8,7) can get the pixel matrix B = 6 4 1 3 1 2 9 7 8 .

步骤2.6.根据第t张子图的附加验证标识H(t),得到T个(t,H(t))坐标点,求出多项式的常数项,利用拉格朗日插值得到待匹配flag‵。Step 2.6. According to the additional verification mark H(t) of the t-th sub-graph, T (t, H(t)) coordinate points are obtained, and the constant term of the polynomial is obtained, and Lagrangian interpolation is used Get the flag‵ to be matched.

在本实施例中,提取三张子图的附加标识(P3,19),(P4,37),(P5,56),利用这三个数据,根据拉格朗日差值,计算待匹配flag‵=1。In this embodiment, the additional marks (P 3 , 19), (P 4 , 37), (P 5 , 56) of the three sub-pictures are extracted, and using these three data, according to the Lagrangian difference, calculate the flag‵=1.

步骤2.7.将待匹配flag‵值与原图flag值进行比较,若flag‵与flag不等时,则返回步骤2.1;若flag‵=flag则确定B‵=B,进入步骤2.8;Step 2.7. Compare the flag‵ value to be matched with the flag value of the original image, if flag‵ is not equal to flag, return to step 2.1; if flag‵=flag, determine B‵=B, and enter step 2.8;

在本实施例中,待匹配flag‵=1与保存的flag相等,则证明恢复正确,如果待匹配flag‵不等于flag,则从新恢复。In this embodiment, if the to-be-matched flag‵=1 is equal to the saved flag, it proves that the restoration is correct, and if the to-be-matched flag‵ is not equal to the flag, it is restored again.

步骤2.8.将B‵进行干扰还原;利用C-1恢复原图像素矩阵A,其中,C-1为像素矩阵A的初等变换矩阵C的逆矩阵,最后计算A=C-1B‵ C-1=C-1B C-1=C-1CAC C-1,得到原图像。将计算的flag,与在步骤1中保留的flag进行比较,如果flag,=flag则表示恢复正确,将恢复的像素矩阵 B = 6 4 1 3 1 2 9 7 8 进行逆变换得到原图片的像素矩阵A,系统提供保留的初等变换的逆矩阵 C - 1 0 0 1 1 0 0 0 1 0 , 则A=C-1B‵ C-1=C-1B C-1=C-1CAC C - 1 = 7 8 9 4 5 6 1 2 3 . 至此得到原图的像素矩阵,原图恢复完成。Step 2.8. Restore B‵ from interference; use C -1 to restore the original image pixel matrix A, where C -1 is the inverse matrix of the elementary transformation matrix C of the pixel matrix A, and finally calculate A=C -1 B‵ C - 1 = C -1 B C -1 = C -1 CAC C -1 , to obtain the original image. Compare the calculated flag with the flag reserved in step 1, if flag,=flag, it means that the restoration is correct, and the restored pixel matrix B = 6 4 1 3 1 2 9 7 8 Perform inverse transformation to obtain the pixel matrix A of the original image, and the system provides the inverse matrix of the retained elementary transformation C - 1 0 0 1 1 0 0 0 1 0 , Then A=C -1 B‵ C -1 =C -1 B C -1 =C -1 CAC C - 1 = 7 8 9 4 5 6 1 2 3 . So far, the pixel matrix of the original image is obtained, and the restoration of the original image is completed.

一种基于多云端的图片存储系统,其特征在于,包括图片存储模块和图片恢复模块;A picture storage system based on multi-cloud, characterized in that it includes a picture storage module and a picture recovery module;

图片存储模块包括:The picture storage module includes:

第一提取模块:用于提取原图的像素矩阵A,为像素矩阵添加唯一标识flag,并保存图片的flag值;计算干扰后的像素矩阵B,B=C×A×C,系统保存C-1,其中,矩阵C为像素矩阵A相同大小的初等变换矩阵,C-1为矩阵C的逆矩阵;The first extraction module: used to extract the pixel matrix A of the original image, add a unique identification flag to the pixel matrix, and save the flag value of the picture; calculate the pixel matrix B after interference, B=C×A×C, and the system saves C - 1 , where matrix C is an elementary transformation matrix of the same size as pixel matrix A, and C -1 is the inverse matrix of matrix C;

参数构造模块:用于将原图像转换成N个子图,并构造参数T,其中,T代表能够恢复原图的最少子图个数,N和T均为正数且T≤N;Parameter construction module: used to convert the original image into N subimages, and construct a parameter T, where T represents the minimum number of subimages that can restore the original image, N and T are both positive numbers and T≤N;

编码模块:用于对干扰后的像素矩阵B的第i行进行哥德尔编码,转换出的哥德尔编码数为Gi,遍历像素矩阵的每一行;其中:若图片像素矩阵大小为r×c,i的取值为(1,2,3,……,c),i、r和c为正整数;Coding module: used to perform Gödel encoding on the i-th row of the disturbed pixel matrix B, the converted Gödel encoding number is Gi, and traverse each row of the pixel matrix; where: if the size of the image pixel matrix is r×c, The value of i is (1,2,3,...,c), i, r and c are positive integers;

多项式构造模块:用于根据Gi和flag构造多项式,Gi构造的多项式得到N张子图的像素矩阵(P1,P2,……,PN),根据产生的像素矩阵(P1,P2,……,PN)构成子图;同时,flag构造的多项式得到附加验证标识,为子图添加附加验证标识信息;Polynomial construction module: used to construct a polynomial according to Gi and flag, the polynomial constructed by Gi obtains pixel matrices (P 1 , P 2 , ..., P N ) of N subimages, and generates pixel matrices (P 1 , P 2 , ... ..., P N ) constitute a subgraph; meanwhile, the polynomial constructed by flag gets an additional verification mark, and adds additional verification mark information for the subgraph;

分配模块:用于为每张子图添加二次标记,,然后将标记好的子图随机均匀的分配到多个云端之中;Allocation module: used to add secondary marks to each sub-image, and then distribute the marked sub-images randomly and evenly to multiple clouds;

图片恢复模块包括:Image recovery modules include:

选择模块:用于从多个云端中选择子图,selection module: used to select subgraphs from multiple clouds,

验证模块:对选择的子图进行二次标记验证,如果子图标记验证通过,则保留当前子图进入判断模块,否则,舍弃该子图后返回选择模块;Verification module: perform secondary mark verification on the selected sub-graph, if the sub-graph mark verification is passed, keep the current sub-graph and enter the judgment module, otherwise, discard the sub-graph and return to the selection module;

判断模块:判断子图数量是否达到T个;是则进入第二提取模块,否则返回选择模块;Judgment module: judge whether the number of subgraphs reaches T; if yes, enter the second extraction module, otherwise return to the selection module;

第二提取模块:用于提取T张子图的像素矩阵(P1,P2,……,PT),将T张像素矩阵的第i行转换成哥德尔编码数Si t,其中i表示像素矩阵的第i行,t表示第t张子图,t在1到T之间,所以Si t表示为第t张子图的像素矩阵的第i行像素转化成的哥德尔编码数。The second extraction module: used to extract the pixel matrix (P 1 , P 2 , ..., P T ) of T subimages, and convert the i-th row of the T pixel matrix into a Gödel coded number S i t , where i represents a pixel In the i-th row of the matrix, t represents the t-th sub-image, and t is between 1 and T, so S i t represents the number of Gödel codes converted from the pixels in the i-th row of the pixel matrix of the t-th sub-image.

恢复模块:用于根据提取模块得到的Sit同时利用拉格朗日插值 其中:t为整数,表示第t张图片,j为整数,表示获取子图中第j张图片,mod p是取模p,p为一个大素数;到恢复干扰像素矩阵B‵的哥德尔编码数Gi‵,将求出的Gi‵进行哥德尔编码转换得到像素矩阵第i行的像素,通过对T张子图的每一行进行上述运算,得到完整的恢复干扰像素矩阵B‵;Restoration module: used to use Lagrangian interpolation at the same time according to the Sit obtained by the extraction module Among them: t is an integer, indicating the t-th picture, j is an integer, indicating that the j-th picture in the sub-image is obtained, mod p is the modulo p, and p is a large prime number; to restore the Gödel code of the interference pixel matrix B‵ Count Gi‵, convert the calculated Gi‵ to Gödel encoding to obtain the pixel in the i-th row of the pixel matrix, and perform the above operation on each row of the T subimages to obtain a complete restored interference pixel matrix B‵;

匹配模块:根据第t张子图的附加验证标识H(t),得到T个(t,H(t))坐标点,求出多项式的常数项,利用拉格朗日插值得到待匹配flag‵;Matching module: According to the additional verification mark H(t) of the t-th sub-image, T (t, H(t)) coordinate points are obtained, the constant term of the polynomial is obtained, and Lagrangian interpolation is used Get the flag‵ to be matched;

比较模块:用于将待匹配flag‵值与原图flag值进行比较,若flag‵与flag不等时,则返回选择模块;若flag‵=flag则确定B‵=B,进入计算模块;Comparison module: used to compare the flag‵ value to be matched with the flag value of the original image, if flag‵ and flag are not equal, return to the selection module; if flag‵=flag, determine B‵=B, and enter the calculation module;

计算模块:用于将B‵进行干扰还原;利用C-1恢复原图像素矩阵A,其中,C-1为像素矩阵A的初等变换矩阵C的逆矩阵,最后计算A=C-1B‵ C-1=C-1B C-1=C-1CAC C-1,得到原图像。Calculation module: used to restore B‵ to interference; use C -1 to restore the original image pixel matrix A, where C -1 is the inverse matrix of the elementary transformation matrix C of the pixel matrix A, and finally calculate A=C -1 B‵ C -1 =C -1 B C -1 =C -1 CAC C -1 , to obtain the original image.

Claims (4)

1.一种基于多云端的图片存储方法,其特征在于,包括如下步骤:1. A picture storage method based on multi-cloud, is characterized in that, comprises the steps: 步骤1:图片存储步骤;Step 1: image storage step; 步骤1.1:提取原图的像素矩阵A,为像素矩阵添加唯一标识flag,并保存图片的flag值;计算干扰后的像素矩阵B,B=C×A×C,系统保存C-1,其中,矩阵C为像素矩阵A相同大小的初等变换矩阵,C-1为矩阵C的逆矩阵;Step 1.1: Extract the pixel matrix A of the original image, add a unique flag to the pixel matrix, and save the flag value of the picture; calculate the pixel matrix B after interference, B=C×A×C, and the system saves C -1 , where, Matrix C is an elementary transformation matrix of the same size as pixel matrix A, and C -1 is the inverse matrix of matrix C; 步骤1.2:将原图像转换成N个子图,并构造参数T,其中,T代表能够恢复原图的最少子图个数,N和T均为正数且T≤N;Step 1.2: Convert the original image into N subimages, and construct a parameter T, where T represents the minimum number of subimages that can restore the original image, and both N and T are positive numbers and T≤N; 步骤1.3:对干扰后的像素矩阵B的第i行进行哥德尔编码,转换出的哥德尔编码数为Gi,遍历像素矩阵的每一行;其中:若图片像素矩阵大小为r×c,i的取值为(1,2,3,……,c),i、r和c为正整数;Step 1.3: Perform Gödel coding on the i-th row of the disturbed pixel matrix B, the converted Gödel code number is Gi, and traverse each row of the pixel matrix; where: if the size of the image pixel matrix is r×c, i’s The value is (1,2,3,...,c), i, r and c are positive integers; 步骤1.4:根据Gi和flag构造多项式,Gi构造的多项式得到N张子图的像素矩阵(P1,P2,……,PN),根据产生的像素矩阵(P1,P2,……,PN)构成子图;同时,flag构造的多项式得到附加验证标识,为子图添加附加验证标识信息;Step 1.4: Construct a polynomial according to Gi and flag. The polynomial constructed by Gi can obtain the pixel matrix (P 1 , P 2 , ..., P N ) of N subimages. According to the generated pixel matrix (P 1 , P 2 , ..., P N ) constitutes a subgraph; meanwhile, the polynomial constructed by flag obtains an additional verification mark, and adds additional verification mark information for the subgraph; 步骤1.5:为每张子图添加二次标记,,然后将标记好的子图随机均匀的分配到多个云端之中;Step 1.5: Add secondary marks to each subgraph, and then distribute the marked subgraphs randomly and evenly to multiple clouds; 步骤2:图片恢复步骤:Step 2: Picture Recovery Steps: 步骤2.1:从多个云端中选择子图;Step 2.1: Select subgraphs from multiple clouds; 步骤2.2:对选择的子图进行二次标记验证,如果子图标记验证通过,则保留当前子图进入步骤2.3,否则,舍弃该子图后返回步骤2.1;Step 2.2: Perform secondary label verification on the selected subgraph, if the subgraph label verification is passed, keep the current subgraph and enter step 2.3, otherwise, discard the subgraph and return to step 2.1; 步骤2.3:判断子图数量是否达到T个;是则进入步骤2.4,否则返回步骤2.1;Step 2.3: Determine whether the number of subgraphs reaches T; if yes, enter step 2.4, otherwise return to step 2.1; 步骤2.4:提取T张子图的像素矩阵(P1,P2,……,PT),将T张像素矩阵的第i行转换成哥德尔编码数Si t,其中i表示像素矩阵的第i行,t表示第t张子图,t在1到T之间,Si t表示为第t张子图的像素矩阵的第i行像素转化成的哥德尔编码数;Step 2.4: Extract pixel matrices (P 1 , P 2 , ..., P T ) of T subimages, and convert the i-th row of T pixel matrices into Gödel code numbers S i t , where i represents the i-th pixel matrix row, t represents the t-th sub-image, t is between 1 and T, and S i t represents the number of Gödel codes converted from the pixels in the i-th row of the pixel matrix of the t-th sub-image; 步骤2.5:根据步骤2.4得到的Si t同时利用拉格朗日插值其中:t为整数,表示第t张图片,j为整数,表示获取子图中第j张图片,mod p是取模p,p为一个大素数;到恢复干扰像素矩阵B‵的哥德尔编码数Gi‵,将求出的Gi‵进行哥德尔编码转换得到像素矩阵第i行的像素,通过对T张子图的每一行进行上述运算,得到完整的恢复干扰像素矩阵B‵;Step 2.5: According to S i t obtained in Step 2.4, use Lagrangian interpolation at the same time Among them: t is an integer, indicating the t-th picture, j is an integer, indicating that the j-th picture in the sub-image is obtained, mod p is the modulo p, and p is a large prime number; to restore the Gödel code of the interference pixel matrix B‵ Count Gi‵, convert the calculated Gi‵ to Gödel encoding to obtain the pixel in the i-th row of the pixel matrix, and perform the above operation on each row of the T subimages to obtain a complete restored interference pixel matrix B‵; 步骤2.6:根据第t张子图的附加验证标识H(t),得到T个(t,H(t))坐标点,求出多项式的常数项,利用拉格朗日插值得到待匹配flag‵;Step 2.6: Obtain T (t, H(t)) coordinate points according to the additional verification mark H(t) of the t-th sub-image, find out the constant term of the polynomial, and use Lagrangian interpolation Get the flag‵ to be matched; 步骤2.7:将待匹配flag‵值与原图flag值进行比较,若flag‵与flag不等时,则返回步骤2.1;若flag‵=flag则确定B‵=B,进入步骤2.8;Step 2.7: Compare the flag‵ value to be matched with the flag value of the original image, if flag‵ and flag are not equal, return to step 2.1; if flag‵=flag, determine B‵=B, and enter step 2.8; 步骤2.8:将B‵进行干扰还原;利用C-1恢复原图像素矩阵A,其中,C-1为像素矩阵A的初等变换矩阵C的逆矩阵,最后计算A=C-1B‵ C-1=C-1B C-1=C-1CAC C-1,得到原图像。Step 2.8: Restore B‵ from interference; use C -1 to restore the original image pixel matrix A, where C -1 is the inverse matrix of the elementary transformation matrix C of the pixel matrix A, and finally calculate A=C -1 B‵ C - 1 = C -1 B C -1 = C -1 CAC C -1 , to obtain the original image. 2.根据权利要求1所述的一种基于多云端的图片存储方法,其特征在于,所述的步骤1.4包括如下步骤:2. A kind of picture storage method based on multi-cloud according to claim 1, is characterized in that, described step 1.4 comprises the following steps: 步骤1.4.1:根据Gi构造转换多项式,其中:mod p是对多项式取模,p为大素数,j为一个值从1到T-1的变量,aj表示(a1,a2,……,aT-1),xj表示x的j次幂,计算得到c组(Fi(1),……,Fi(N))的值,将这些哥德尔编码数再转换成第i行的像素值,得到第i行的像素,并得到N个r×c行的像素矩阵(P1,P2,……,PN);其中,系统在(0,P)范围内随机产生T-1个数(a1,a2,……,aT-1),为创建多项式提供系数,P为大素数的模数;Step 1.4.1: Construct the conversion polynomial according to Gi, Among them: mod p is the polynomial modulus, p is a large prime number, j is a variable with a value from 1 to T-1, a j means (a 1 , a 2 ,..., a T-1 ), x j means The j-th power of x is calculated to obtain the value of group c (Fi(1),...,Fi(N)), and then convert these Gödel code numbers into the pixel value of the i-th row to obtain the pixel of the i-th row, And get N r×c row pixel matrix (P 1 , P 2 ,..., P N ); wherein, the system randomly generates T-1 numbers (a 1 , a 2 , ..., a T-1 ), provide coefficients for creating polynomials, and P is the modulus of a large prime number; 步骤1.4.2:根据flag构造标记多项式j为一个值从1到T-1的变量,aj表示(a1,a2,……,aT-1),xj表示x的j次幂,将计算得到的H(t)分配给第t张子图作为附加验证标识,t的取值为(1,2,……,N);计算的结果为每个子图的附加验证标识。Step 1.4.2: Construct a flag polynomial according to flag j is a variable whose value ranges from 1 to T-1, a j represents (a 1 , a 2 ,..., a T-1 ), x j represents the jth power of x, and the calculated H(t) is distributed Give the tth subgraph as an additional verification mark, and the value of t is (1, 2, ..., N); the calculated result is the additional verification mark of each subgraph. 3.根据权利要求1或2所述的一种基于多云端的图片存储方法,其特征在于:所述的步骤1.2中的N和T的取值分别为N=5,T=3。3. A multi-cloud based image storage method according to claim 1 or 2, characterized in that: the values of N and T in the step 1.2 are respectively N=5 and T=3. 4.一种基于多云端的图片存储系统,其特征在于,包括图片存储模块和图片恢复模块;4. A picture storage system based on multiple clouds, comprising a picture storage module and a picture recovery module; 图片存储模块包括:The picture storage module includes: 第一提取模块:用于提取原图的像素矩阵A,为像素矩阵添加唯一标识flag,并保存图片的flag值;计算干扰后的像素矩阵B,B=C×A×C,系统保存C-1,其中,矩阵C为像素矩阵A相同大小的初等变换矩阵,C-1为矩阵C的逆矩阵;The first extraction module: used to extract the pixel matrix A of the original image, add a unique identification flag to the pixel matrix, and save the flag value of the picture; calculate the pixel matrix B after interference, B=C×A×C, and the system saves C - 1 , where matrix C is an elementary transformation matrix of the same size as pixel matrix A, and C -1 is the inverse matrix of matrix C; 参数构造模块:用于将原图像转换成N个子图,并构造参数T,其中,T代表能够恢复原图的最少子图个数,N和T均为正数且T≤N;Parameter construction module: used to convert the original image into N subimages, and construct a parameter T, where T represents the minimum number of subimages that can restore the original image, N and T are both positive numbers and T≤N; 编码模块:用于对干扰后的像素矩阵B的第i行进行哥德尔编码,转换出的哥德尔编码数为Gi,遍历像素矩阵的每一行;其中:若图片像素矩阵大小为r×c,i的取值为(1,2,3,……,c),i、r和c为正整数;Coding module: used to perform Gödel encoding on the i-th row of the disturbed pixel matrix B, the converted Gödel encoding number is Gi, and traverse each row of the pixel matrix; where: if the size of the image pixel matrix is r×c, The value of i is (1,2,3,...,c), i, r and c are positive integers; 多项式构造模块:用于根据Gi和flag构造多项式,Gi构造的多项式得到N张子图的像素矩阵(P1,P2,……,PN),根据产生的像素矩阵(P1,P2,……,PN)构成子图;同时,flag构造的多项式得到附加验证标识,为子图添加附加验证标识信息;Polynomial construction module: used to construct a polynomial according to Gi and flag, the polynomial constructed by Gi obtains pixel matrices (P 1 , P 2 , ..., P N ) of N subimages, and generates pixel matrices (P 1 , P 2 , ... ..., P N ) constitute a subgraph; meanwhile, the polynomial constructed by flag gets an additional verification mark, and adds additional verification mark information for the subgraph; 分配模块:用于为每张子图添加二次标记,,然后将标记好的子图随机均匀的分配到多个云端之中;Allocation module: used to add secondary marks to each sub-image, and then distribute the marked sub-images randomly and evenly to multiple clouds; 图片恢复模块包括:Image recovery modules include: 选择模块:用于从多个云端中选择子图,selection module: used to select subgraphs from multiple clouds, 验证模块:对选择的子图进行二次标记验证,如果子图标记验证通过,则保留当前子图进入判断模块,否则,舍弃该子图后返回选择模块;Verification module: perform secondary mark verification on the selected sub-graph, if the sub-graph mark verification is passed, keep the current sub-graph and enter the judgment module, otherwise, discard the sub-graph and return to the selection module; 判断模块:判断子图数量是否达到T个;是则进入第二提取模块,否则返回选择模块;Judgment module: judge whether the number of subgraphs reaches T; if yes, enter the second extraction module, otherwise return to the selection module; 第二提取模块:用于提取T张子图的像素矩阵(P1,P2,……,PT),将T张像素矩阵的第i行转换成哥德尔编码数Si t,其中i表示像素矩阵的第i行,t表示第t张子图,t在1到T之间,所以Si t表示为第t张子图的像素矩阵的第i行像素转化成的哥德尔编码数;The second extraction module: used to extract the pixel matrix (P 1 , P 2 , ..., P T ) of T subimages, and convert the i-th row of the T pixel matrix into a Gödel coded number S i t , where i represents a pixel In the i-th row of the matrix, t represents the t-th sub-image, and t is between 1 and T, so S i t represents the number of Gödel codes converted from the pixels in the i-th row of the pixel matrix of the t-th sub-image; 恢复模块:用于根据提取模块得到的Si t同时利用拉格朗日插值其中:t为整数,表示第t张图片,j为整数,表示获取子图中第j张图片,mod p是取模p,p为一个大素数;到恢复干扰像素矩阵B‵的哥德尔编码数Gi‵,将求出的Gi‵进行哥德尔编码转换得到像素矩阵第i行的像素,通过对T张子图的每一行进行上述运算,得到完整的恢复干扰像素矩阵B‵;Restoration module: used to use Lagrangian interpolation at the same time according to the Si t obtained by the extraction module Among them: t is an integer, indicating the t-th picture, j is an integer, indicating that the j-th picture in the sub-image is obtained, mod p is the modulo p, and p is a large prime number; to restore the Gödel code of the interference pixel matrix B‵ Count Gi‵, convert the calculated Gi‵ to Gödel encoding to obtain the pixel in the i-th row of the pixel matrix, and perform the above operation on each row of the T subimages to obtain a complete restored interference pixel matrix B‵; 匹配模块:根据第t张子图的附加验证标识H(t),得到T个(t,H(t))坐标点,求出多项式的常数项,利用拉格朗日插值得到待匹配flag‵;Matching module: According to the additional verification mark H(t) of the t-th sub-image, T (t, H(t)) coordinate points are obtained, the constant term of the polynomial is obtained, and Lagrangian interpolation is used Get the flag‵ to be matched; 比较模块:用于将待匹配flag‵值与原图flag值进行比较,若flag‵与flag不等时,则返回选择模块;若flag‵=flag则确定B‵=B,进入计算模块;Comparison module: used to compare the flag‵ value to be matched with the flag value of the original image, if flag‵ and flag are not equal, return to the selection module; if flag‵=flag, determine B‵=B, and enter the calculation module; 计算模块:用于将B‵进行干扰还原;利用C-1恢复原图像素矩阵A,其中,C-1为像素矩阵A的初等变换矩阵C的逆矩阵,最后计算A=C-1B‵ C-1=C-1BC-1=C-1CAC C-1,得到原图像。Calculation module: used to restore B‵ to interference; use C -1 to restore the original image pixel matrix A, where C -1 is the inverse matrix of the elementary transformation matrix C of the pixel matrix A, and finally calculate A=C -1 B‵ C -1 =C -1 BC -1 =C -1 CAC C -1 , to obtain the original image.
CN201410470192.2A 2014-09-15 2014-09-15 A kind of picture storage method and system based on more high in the clouds Active CN104202412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410470192.2A CN104202412B (en) 2014-09-15 2014-09-15 A kind of picture storage method and system based on more high in the clouds

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410470192.2A CN104202412B (en) 2014-09-15 2014-09-15 A kind of picture storage method and system based on more high in the clouds

Publications (2)

Publication Number Publication Date
CN104202412A true CN104202412A (en) 2014-12-10
CN104202412B CN104202412B (en) 2018-01-23

Family

ID=52087637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410470192.2A Active CN104202412B (en) 2014-09-15 2014-09-15 A kind of picture storage method and system based on more high in the clouds

Country Status (1)

Country Link
CN (1) CN104202412B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719263A (en) * 2009-12-08 2010-06-02 清华大学 Image visual dividing storing method with least dividing storage and optimal comparison
CN101751416A (en) * 2008-11-28 2010-06-23 中国科学院计算技术研究所 Method for ordering and seeking character strings
CN103118135A (en) * 2013-02-28 2013-05-22 中国地质大学(武汉) Method and system for protecting user data privacy in cloud computing
US20130283061A1 (en) * 2012-04-23 2013-10-24 Electronics & Telecommunications Research Institute Image processing method and apparatus for privacy protection of captured image
CN103840946A (en) * 2014-03-25 2014-06-04 山东大学 Image classifying authentication method based on (t, n) threshold secret key sharing and phase retrieval algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751416A (en) * 2008-11-28 2010-06-23 中国科学院计算技术研究所 Method for ordering and seeking character strings
CN101719263A (en) * 2009-12-08 2010-06-02 清华大学 Image visual dividing storing method with least dividing storage and optimal comparison
US20130283061A1 (en) * 2012-04-23 2013-10-24 Electronics & Telecommunications Research Institute Image processing method and apparatus for privacy protection of captured image
CN103118135A (en) * 2013-02-28 2013-05-22 中国地质大学(武汉) Method and system for protecting user data privacy in cloud computing
CN103840946A (en) * 2014-03-25 2014-06-04 山东大学 Image classifying authentication method based on (t, n) threshold secret key sharing and phase retrieval algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张选评 等: ""应用细粒度分块重构的多信道图像信息分存算法"", 《西安交通大学学报》 *

Also Published As

Publication number Publication date
CN104202412B (en) 2018-01-23

Similar Documents

Publication Publication Date Title
CN102982499B (en) Based on color image encryption and the decryption method of multi-fractional order chaos system
Mirzaei et al. A new image encryption method: parallel sub-image encryption with hyper chaos
CN104468090B (en) Character cipher coding method based on image pixel coordinates
CN110008745B (en) Encryption method, computer equipment and computer storage medium
CN104851070B (en) A kind of image encryption and decryption method based on foreground and background separation
CN105450899B (en) Multiple image encryption method based on PWLCM chaos
CN104917617A (en) Confounding method of encrypted group signatures
Gao et al. An authenticatable (2, 3) secret sharing scheme using meaningful share images based on hybrid fractal matrix
Lee et al. Selective scalable secret image sharing with verification
CN107292805A (en) A kind of image encryption method based on the discrete Tchebichef conversion of multi-parameter fractional order
Jana et al. A novel SPN-based video steganographic scheme using Sudoku puzzle for secured data hiding
CN117714613A (en) Image encryption method and device, electronic equipment and storage medium
CN106530197A (en) Image encryption method based on Kent mapping and generalized Gray codes
Ganesan et al. Image encryption using eight dimensional chaotic cat map
CN105554344A (en) Multi-image encryption method based on mixed graphics primitives
Karthikeyan et al. A combination of RSA algorithm with image steganography to ensure enhanced encryption
WO2017133154A1 (en) Anti-counterfeit image generation method and device
Fan et al. User‐friendly XOR‐based visual secret sharing by random grid
CN111131657B (en) Tamper-proof encryption method for chaotic medical images based on self-verification matrix
Bidgar et al. Key based visual cryptography scheme using novel secret sharing technique with steganography
Chen et al. Efficient and secure image authentication with robustness and versatility
US20200058096A1 (en) Image data encryption and rendering system
CN104202412B (en) A kind of picture storage method and system based on more high in the clouds
Yassir et al. Hybrid Image Encryption Technique for Securing Color Images Transmitted Over Cloud Networks.
Sarkar et al. Blockchain-based authenticable (k, n) multi-secret image sharing scheme

Legal Events

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