Data sharing method and device
By performing compression perception processing, segmented linear chaotic mapping processing and adding noise processing on data sharing, the problems of data leakage and privacy leakage in the prior art are solved, and high security sharing of data is achieved.
Patent Information
- Application Number
- CN202411929434.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-01
AI Technical Summary
The existing data sharing methods have problems with data leakage and personal privacy leakage, and lack an effective protection mechanism.
Through compression perception processing, segmented linear chaotic mapping processing and noise processing, the shared data is encrypted in multiple layers to form the final encrypted data for sharing.
Improve the security of shared data, make the final encrypted data difficult to crack, and effectively protects data and personal privacy.
Smart Images

Figure CN119743311A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security, and in particular to a data sharing method and device. Background Art
[0002] With the development of global informatization, data sharing has gradually gained attention. Data sharing can promote the circulation and utilization of information and reduce duplication of work and costs.
[0003] There are currently many ways to achieve data sharing, such as centralized database sharing, distributed database sharing, application program interface sharing, data sharing platforms, cloud computing and cloud storage services, and data federation technology.
[0004] In the current way of realizing data sharing, there are cases of data leakage and personal privacy leakage, so establishing an effective protection mechanism for shared data is an issue that urgently needs to be solved in this field. Summary of the invention
[0005] The embodiments of the present application provide a data sharing method and device to provide an effective protection mechanism for shared data to improve the security of shared data.
[0006] In a first aspect, an embodiment of the present application provides a data sharing method, which is applied to a computing device, comprising:
[0007] Get the data to be shared;
[0008] Performing compressed sensing processing on the data to be shared to obtain first encrypted data;
[0009] Performing piecewise linear chaotic mapping processing on the first encrypted data to obtain second encrypted data;
[0010] adding noise to the second encrypted data to obtain final encrypted data;
[0011] The final encrypted data is shared.
[0012] In a possible implementation, the data to be shared includes a first page image, a last page image, and at least one middle page image;
[0013] Accordingly, performing compressed sensing processing on the data to be shared to obtain first encrypted data includes:
[0014] Performing two-dimensional wavelet transform on the first page image, the last page image and each middle page image respectively, so as to obtain sparse coefficients corresponding to the first page image, the last page image and each middle page image respectively;
[0015] Get the preset measurement matrix;
[0016] Based on the measurement matrix, the sparse coefficients corresponding to the first page image, the last page image and each middle page image are sampled respectively to obtain compressed sensing measurement values corresponding to the first page image, the last page image and each middle page image respectively;
[0017] Fusing the compressed sensing measurement values corresponding to the first page image and the last page image to obtain a first fusion result;
[0018] Fusing the compressed sensing measurement values corresponding to all the intermediate page images to obtain a second fusion result;
[0019] The first fusion result is encrypted using a first symmetric key to obtain a first key value, and the second fusion result is encrypted using the first symmetric key to obtain a second key value;
[0020] The first key value and the second key value are quantized and mapped to obtain first encrypted data.
[0021] In a possible implementation manner, before performing two-dimensional wavelet transform on the first page image, the last page image and each intermediate page image respectively, the method further includes:
[0022] Normalizing the first page image and the last page image;
[0023] Grayscale processing and normalization processing are performed on each intermediate page image.
[0024] In a possible implementation manner, performing piecewise linear chaotic mapping processing on the first encrypted data to obtain second encrypted data includes:
[0025] Obtaining a preset first chaotic mapping parameter;
[0026] Obtaining a piecewise linear chaotic mapping formula based on the first chaotic mapping parameter;
[0027] Iteratively processing the first encrypted data based on the piecewise linear chaotic mapping formula to obtain corresponding iterative result data;
[0028] The iteration result data is superimposed on the first encrypted data to obtain the second encrypted data.
[0029] In a possible implementation manner, superimposing the iteration result data onto the first encrypted data to obtain the second encrypted data includes:
[0030] Obtaining a corresponding relationship between each first element in the iteration result data and each second element in the first encrypted data;
[0031] Convert each first element in the iteration result data and each second element in the first encrypted data into binary respectively;
[0032] According to the corresponding relationship between the first element and the second element, binary bit operation processing is performed to obtain the second encrypted data.
[0033] In a possible implementation manner, adding noise to the second encrypted data to obtain final encrypted data includes:
[0034] Using a Gaussian mechanism of differential privacy, a sensitivity parameter corresponding to the second encrypted data is obtained;
[0035] Based on the preset first parameter, second parameter and the sensitivity parameter, noise obeying Gaussian distribution is obtained;
[0036] The obtained noise obeying the Gaussian distribution is added to the second encrypted data to obtain the final encrypted data.
[0037] In a possible implementation, it further includes:
[0038] Obtain the shared data to be decrypted;
[0039] Acquire a second chaotic mapping parameter and a second symmetric key corresponding to the shared data to be decrypted;
[0040] The shared data to be decrypted is decrypted based on the second chaotic mapping parameter and the second symmetric key to obtain the decrypted shared data.
[0041] In a possible implementation manner, the decrypting the shared data to be decrypted based on the second chaotic mapping parameter and the second symmetric key to obtain the decrypted shared data includes:
[0042] Performing a noise removal process on the shared data to be decrypted to obtain first decrypted data;
[0043] Based on the second chaotic mapping parameter, performing piecewise linear chaotic inverse mapping processing on the first decrypted data to obtain second decrypted data;
[0044] Based on the second symmetric key, compressed sensing inverse processing is performed on the second decrypted data to obtain decrypted shared data.
[0045] In a second aspect, an embodiment of the present application provides a data sharing device, applied to a computing device, including:
[0046] An acquisition module, used to acquire data to be shared;
[0047] A processing module, used for performing compressed sensing processing on the data to be shared to obtain first encrypted data;
[0048] The processing module is further used to perform piecewise linear chaotic mapping processing on the first encrypted data to obtain second encrypted data;
[0049] The processing module is further used to add noise to the second encrypted data to obtain final encrypted data;
[0050] The processing module is also used to share the final encrypted data.
[0051] In a third aspect, an embodiment of the present application provides a computer device, including: a memory, a processor;
[0052] Memory stores computer-executable instructions;
[0053] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0054] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0055] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0056] The data sharing method and device provided in the embodiment of the present application encrypt the shared data through compressed sensing processing, piecewise linear chaotic mapping processing and noise addition processing in sequence to obtain the final encrypted data. The present application encrypts the shared data through three different encryption methods, so that the final encrypted data obtained is difficult to crack, thereby improving the security of the data to be shared. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1 Schematic diagram of application scenarios provided for this application;
[0059] Figure 2 Schematic diagram of the data sharing method provided for this application Figure 1 ;
[0060] Figure 3 Schematic diagram of the data sharing method provided for this application Figure 2 ;
[0061] Figure 4 Schematic diagram of the data sharing method provided for this application Figure 3 ;
[0062] Figure 5 A flowchart illustrating a compressed sensing technique process;
[0063] Figure 6 Schematic diagram of the data sharing method provided for this application Figure 4 ;
[0064] Figure 7 Schematic diagram of the data sharing method provided for this application Figure 5 ;
[0065] Figure 8 Schematic diagram of the data sharing method provided for this application Figure 6 ;
[0066] Fig. 9 Schematic diagram of the data sharing method provided for this application Figure 7 ;
[0067] Fig.10 Schematic diagram of the data sharing method provided for this application Figure 8 ;
[0068] Fig.11 A schematic diagram of the structure of the data sharing device provided by this application;
[0069] Fig.12 A schematic diagram of the structure of the computer device provided for this application.
[0070] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0071] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0072] With the development of global informatization, data sharing has gradually gained attention. Data sharing can promote the circulation and utilization of information and reduce duplication of work and costs. Figure 1 The application scenario diagram provided for this application is as follows: Figure 1 As shown, the computing device ① can select a server with computing capabilities, and the computing device encrypts the data to be shared to obtain encrypted shared data, and then shares the encrypted shared data.
[0073] Combining the above scenarios, we can see that there are many ways to achieve data sharing, such as centralized database sharing, distributed database sharing, application program interface sharing, data sharing platform, cloud computing and cloud storage services, and data federation technology, etc. However, in the current ways of achieving data sharing, there are cases of data leakage and personal privacy leakage.
[0074] The data sharing method provided in the present application encrypts the shared data through three different encryption methods, namely compressed sensing processing, piecewise linear chaotic mapping processing and noise addition processing, so that the final encrypted data obtained is difficult to crack, thereby improving the security of the data to be shared.
[0075] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0076] Figure 2 Schematic diagram of the data sharing method provided for this application Figure 1 , applied to computing devices, such as Figure 2 As shown, the method includes:
[0077] S201: Acquire data to be shared.
[0078] In conjunction with the scenario example, the data to be shared is data that needs to be shared, such as file data.
[0079] S202: Perform compressed sensing processing on the data to be shared to obtain first encrypted data.
[0080] Combined with the scene example, compressed sensing technology is also called compressed sampling or sparse sampling. Through compressed sensing technology, the shared data is first encrypted, which can improve the subsequent transmission efficiency, visual security and robustness of the first encrypted data.
[0081] S203: Perform piecewise linear chaotic mapping processing on the first encrypted data to obtain second encrypted data.
[0082] Combined with the scenario example, piecewise linear chaotic mapping processing is a method for generating chaotic sequences, which has the characteristics of simple mathematical form, ergodicity and randomness. The second encrypted data obtained by processing the first encrypted data with piecewise linear chaotic mapping can further improve the security of the data.
[0083] S204: Add noise to the second encrypted data to obtain final encrypted data.
[0084] Combined with the scenario example, after the shared data is processed by compressed sensing and piecewise linear chaotic mapping, differential privacy calculation is performed on the obtained second encrypted data. The core goal of differential privacy is to prevent attackers from obtaining private information of individual data through analysis results while analyzing the data set. Gaussian mechanism is a common method to achieve differential privacy. Under the Gaussian mechanism in differential privacy calculation, noise can be added to the second encrypted data based on Gaussian distribution to obtain the final encrypted data.
[0085] S205: Share the final encrypted data.
[0086] Combined with the scenario example, the final encrypted data is shared to achieve the purpose of data sharing, such as uploading the final encrypted data to a preset sharing platform and sharing the final encrypted data through the sharing platform. Based on the method provided in this example, the shared data is encrypted in three different encryption methods, namely, compressed sensing processing, piecewise linear chaotic mapping processing, and noise addition processing, so that the final encrypted data is difficult to crack, thereby improving the security of the data to be shared.
[0087] Optional, Figure 3 Schematic diagram of the data sharing method provided for this application Figure 2 , applied to a computing device, the data to be shared includes a first page image, a last page image and at least one middle page image;
[0088] Accordingly, if Figure 3 As shown, S201 includes:
[0089] S301, performing two-dimensional wavelet transform on the first page image, the last page image and each middle page image respectively to obtain sparse coefficients corresponding to the first page image, the last page image and each middle page image respectively.
[0090] Combined with the scenario example, the data to be shared can be file data, such as contract data. For file data, the content of each page can be represented by the corresponding image, generally including the first image, the last page image, and the middle page image of each page. For each page image, when the text font in the text image is more complex, with more stroke changes and edge details, the Daubechies (dbN) wavelet basis function can be selected to perform a two-dimensional wavelet transform on it. Wavelet transform can divide the image into sub-bands of different scales and directions, so that the image presents a certain sparsity in the wavelet domain, so as to obtain the sparse coefficient corresponding to each page image. The sparse coefficient corresponding to each page image includes the sparse coefficient corresponding to each pixel on the image. The darker the color represented by the pixel value of the pixel, the higher the sparse coefficient corresponding to the pixel.
[0091] S302: Obtain a preset measurement matrix.
[0092] Combined with the scenario example, the type of the measurement matrix can be selected as a Gaussian random measurement matrix, and each element in the Gaussian random measurement matrix is a random number that obeys the Gaussian distribution. Specifically, the number of rows M and the number of columns N of the measurement matrix can be determined first. The number of columns N of the measurement matrix corresponding to each page image is the number of corresponding subbands, and the number of rows can be determined according to the preset compression ratio N / M. The compression ratio represents the relationship between M and N. The compression ratio can be determined by referring to two conditions. The first condition is: Generally, if you want to get a higher compression ratio, M needs to be much smaller than N. The second condition can be determined according to M≥CKlog(N / M), where C is a constant and K represents the number of non-zero elements in the sparse coefficients corresponding to the image. According to the above two conditions, the value of the compression ratio N / M is determined, and the value of the number of rows M is determined according to the value of the number of columns N. Finally, each roundness in the measurement matrix is randomly extracted from a Gaussian distribution with a mean of 0 and a variance of 1 / M to obtain a measurement matrix.
[0093] S303. Based on the measurement matrix, the sparse coefficients corresponding to the first page image, the last page image and each intermediate page image are sampled respectively to obtain compressed sensing measurement values corresponding to the first page image, the last page image and each intermediate page image.
[0094] Combined with the scenario example, the measurement matrix obtained above is used to sample the sparse coefficients of the first page image, the last page image and each middle page image in turn, and the compressed sensing measurement value corresponding to each page image is obtained in turn. The compressed sensing measurement value corresponding to each page image contains the key information in the image, but the amount of data is greatly reduced.
[0095] S304: Fusing the compressed sensing measurement values corresponding to the first page image and the last page image to obtain a first fusion result.
[0096] Combined with the scene example, there will generally be black and white or color stamps on the first page image or the last page image, so the first page image is distinguished from the last page image and the middle page image, and they are processed separately. For the first page image and the last page image, the compressed sensing measurement value corresponding to the first page image is fused with the compressed sensing measurement value corresponding to the last page image, so as to be arranged into a two-dimensional vector (x, y), where the compressed sensing measurement value of the first page image can be used as x, and the compressed sensing measurement value of the last page image can be used as y, and the obtained two-dimensional vector is determined as the first fusion result.
[0097] S305: Fuse the compressed sensing measurement values corresponding to all the intermediate page images to obtain a second fusion result.
[0098] Combined with the scene example, for all the middle page images, the compressed sensing measurement values corresponding to all the middle page images are arranged in order into an n-dimensional matrix, where n is the value of the middle page image, and the obtained n-dimensional matrix is determined as the second fusion result.
[0099] S306: Use the first symmetric key to encrypt the first fusion result to obtain a first key value, and use the first symmetric key to encrypt the second fusion result to obtain a second key value.
[0100] In combination with the scenario example, a first symmetric key is determined based on the Advanced Encryption Standard (AES) symmetric encryption algorithm, and the first fusion result and the second fusion result are encrypted respectively using the first symmetric key to obtain a first key value Key1 corresponding to the first fusion result and a second key value Key2 corresponding to the second fusion result.
[0101] S307: quantize and map the first key value and the second key value to obtain first encrypted data.
[0102] Combined with the scenario example, the first key value Key1 and the second key value Key2 are quantized to obtain pixel values that can be represented as an image, and then the obtained pixel values are mapped to an image format to obtain a corresponding mask image. The mask image is expressed as a meaningless noise image, but contains the encrypted information corresponding to the first page image, the last page image and all the middle page images in the data to be shared. The obtained mask image can be determined as the first encrypted image.
[0103] Based on the method provided in this example, the shared data may be compressed for the first time based on the compressed sensing technology to obtain an encrypted first encrypted image.
[0104] Optional, Figure 4 Schematic diagram of the data sharing method provided for this application Figure 3 ,like Figure 4 As shown, before S301, it also includes:
[0105] S401, normalizing the first page image and the last page image.
[0106] Combined with the scene example, Figure 5 is a flowchart of an example of compressed sensing technology processing, such as Figure 5 As shown, the first page image and the last page image are used as wrapping pages, and the pixel values of the images corresponding to the wrapping pages are preprocessed in a manner including normalization. After normalization, the range of the pixel values can be adjusted to a standard interval, and the standard interval can be determined as [0, 1] or [0, 255].
[0107] S402, performing grayscale processing and normalization processing on each intermediate page image.
[0108] Combined with the scene example, combined with Figure 5 , the method of preprocessing the pixel values of the middle page image includes normalization and grayscale processing. The normalization processing of the pixel values of the middle page image is the same as the normalization processing of the pixel values of the packaging page image. When the pixel values of the middle page image are grayscale processed, if the middle page image is a color image, it can be converted by using the weighted average method. Specifically: Grayscale value = 0.299×R+0.587×G+0.114×B, where R represents the pixel value of the red channel, G represents the pixel value of the green channel, and B represents the pixel value of the blue channel. Combined with Figure 5 After preprocessing the packaging page image and all the intermediate page images, they are sequentially subjected to two-dimensional wavelet transform and compressed sampling to obtain a two-dimensional vector and an n-dimensional matrix. The two-dimensional vector and the n-dimensional matrix are then symmetric encrypted and quantized to map and obtain a mask image, i.e., the first encrypted data.
[0109] Based on the method provided in this example, preprocessing of the packaging page image and all intermediate page images can improve the robustness of subsequent compressed sensing processing of the images.
[0110] Optional, Figure 6 Schematic diagram of the data sharing method provided for this application Figure 4 ,like Figure 6 As shown, S203 includes:
[0111] S601: Obtain a preset first chaotic mapping parameter.
[0112] Combined with the scenario example, the piecewise linear chaotic mapping has a unique property that can generate sequences that appear random but are actually generated by certain rules. This chaotic property is suitable for data encryption and obfuscation. The chaotic mapping parameters include the slope and intercept corresponding to the piecewise linear chaotic mapping formula.
[0113] S602: Obtain a piecewise linear chaotic mapping formula based on the first chaotic mapping parameters.
[0114] Combined with the scene example, the following is the piecewise linear chaos mapping formula of the example:
[0115]
[0116] Among them, ai, bi, [li, ui] are the preset first chaotic mapping parameters.
[0117] S603: Iteratively process the first encrypted data based on the piecewise linear chaotic mapping formula to obtain corresponding iterative result data.
[0118] In combination with the scenario example, the pixel value of each pixel in the mask image represented by the first encrypted data can be iteratively calculated based on the piecewise linear chaotic mapping formula, and the iteration is stopped after a preset number of iterations n to obtain Xn+1, where Xn+1 represents the iterative result data of the pixel value of each pixel in the mask image after n iterations based on the piecewise linear chaotic mapping formula.
[0119] S604: Superimpose the iteration result data onto the first encrypted data to obtain the second encrypted data.
[0120] Combined with the scenario example, the iterative result data of each pixel value in the mask image after n iterations is superimposed with each corresponding pixel value in the mask image. For example, for pixel 1, the pixel value corresponding to pixel 1 in the original mask image is added to the value of Xn+1 corresponding to pixel 1 to obtain the chaotic result corresponding to pixel 1. In this way, the chaotic result corresponding to each pixel is obtained, and the chaotic results corresponding to all the obtained pixels are combined to obtain the second encrypted data. Based on the method provided in this example, the first encrypted data can be converted into the second encrypted data that is more difficult to crack based on the piecewise linear chaotic mapping process.
[0121] Optional, Figure 7 Schematic diagram of the data sharing method provided for this application Figure 5 ,like Figure 7 As shown, S604 includes:
[0122] S701. Obtain a correspondence between each first element in the iteration result data and each second element in the first encrypted data.
[0123] Combined with the scene example, each first element in the iterative result data represents the result Xn+1 of the pixel value of each pixel after n iterations, and each second element in the first encrypted data represents the original pixel value corresponding to each pixel in the mask image, and the result after n iterations corresponding to each pixel is matched with the original pixel value.
[0124] S702: Convert each first element in the iteration result data and each second element in the first encrypted data into binary respectively.
[0125] In combination with the scene example, the pixel value of each pixel in the mask image is converted into a first binary result, and then Xn+1 corresponding to the pixel value of each pixel is also converted into a second binary result.
[0126] S703: Perform binary bitwise operation processing according to the corresponding relationship between the first element and the second element to obtain the second encrypted data.
[0127] Combined with the scene example, according to the corresponding relationship between the result after n iterations corresponding to each pixel and the original pixel value, the first binary result corresponding to each pixel is subjected to bit operation, such as addition operation, to realize superimposing the iterative result data after n iterations corresponding to each pixel on the pixel value corresponding to each pixel of the mask image, so as to obtain the chaotic result corresponding to each pixel, and determine the chaotic results corresponding to all pixels as the second encrypted data. Based on the method provided in this example, the purpose of converting the first encrypted data into the second encrypted data which is more difficult to crack based on the piecewise linear chaotic mapping processing can be achieved.
[0128] Optional, Figure 8 Schematic diagram of the data sharing method provided for this application Figure 6 ,like Figure 8 As shown, S204 includes:
[0129] S801. Use the Gaussian mechanism of differential privacy to obtain a sensitivity parameter corresponding to the second encrypted data.
[0130] In combination with the scenario example, the sensitivity of the second encrypted data can be calculated based on the Gaussian mechanism in differential privacy computing, and the sensitivity of the second encrypted data can be recorded as Δ.
[0131] S802: Obtain noise that obeys Gaussian distribution based on the preset first parameter, the second parameter and the sensitivity parameter.
[0132] Combined with the scenario example, in the Gaussian mechanism, the first preset parameter is the privacy budget ε, and the second preset parameter is the failure probability parameter δ. Among them, the failure probability parameter δ is usually a very small value, such as 10-5 The noise obtained follows a Gaussian distribution (0, (Δ 2 ×2ln(1.25 / δ)) / ε 2 ), and thus the noise is obtained.
[0133] S803: Add the obtained noise obeying the Gaussian distribution to the second encrypted data to obtain final encrypted data.
[0134] Combined with the scenario example, the obtained noise is added to the obtained second encrypted data, so that the final encrypted data obtained is triple-encrypted by the added noise, compressed sensing and piecewise linear chaotic mapping, thereby improving the privacy protection of shared data.
[0135] Optional, Fig. 9 Schematic diagram of the data sharing method provided for this application Figure 7 ,like Fig. 9 As shown, it also includes:
[0136] S901. Obtain shared data to be decrypted.
[0137] In combination with the scenario example, after the above-mentioned data to be shared is encrypted, the obtained final encrypted data can be shared, for example, the final encrypted data is shared based on the sharing platform. At the same time, other shared data can also be obtained based on the sharing platform.
[0138] S902: Obtain a second chaotic mapping parameter and a second symmetric key corresponding to the shared data to be decrypted.
[0139] Combined with the scenario example, the shared data obtained based on the sharing platform is also encrypted data. If you want to know the actual content of the shared data, you need to decrypt the shared data. The sharing platform locally stores the chaotic mapping parameters corresponding to each shared data when performing piecewise linear chaotic mapping, and the corresponding symmetric key when performing symmetric encryption, so the second chaotic mapping parameters and second symmetric key corresponding to the received shared data can be obtained from the sharing platform locally.
[0140] S903. Decrypt the shared data to be decrypted based on the second chaotic mapping parameter and the second symmetric key to obtain decrypted shared data.
[0141] In combination with the scenario example, based on the obtained second chaotic mapping parameters and the second symmetric key, the shared data is de-noised, inversely mapped based on the second chaotic mapping parameters, and symmetric decryption is performed based on the second symmetric key alignment to obtain the decrypted shared data. Based on the method provided in this example, the obtained shared data can be decrypted to obtain the corresponding decrypted data.
[0142] Optional, Fig.10 Schematic diagram of the data sharing method provided for this application Figure 8 ,like Fig.10 As shown, S903 includes:
[0143] S1001. Perform noise removal processing on the shared data to be decrypted to obtain first decrypted data.
[0144] Combined with the scenario example, based on the above embodiment, the operations for encrypting shared data are: compressed sensing processing, piecewise linear chaotic mapping processing and noise addition processing, so when decrypting the shared data obtained from the sharing platform, it is necessary to perform inverse processing in the order of encryption. Therefore, the order of decryption should be: denoising processing, piecewise linear chaotic inverse mapping processing and compressed sensing inverse processing. Therefore, firstly, the shared data is subjected to the inverse operation of differential privacy calculation for denoising. The noise can be removed according to the Gaussian distribution characteristics and addition method of the noise, and the data encrypted by piecewise linear chaos is restored, which is determined as the first decrypted data.
[0145] S1002. Based on the second chaotic mapping parameters, perform piecewise linear chaotic inverse mapping processing on the first decrypted data to obtain second decrypted data.
[0146] Combined with the scenario example, the first decrypted data is first subjected to the inverse operation of the binary bit operation, and then the data after the inverse operation of the binary bit operation is subjected to piecewise linear chaotic inverse mapping processing according to the obtained second chaotic mapping parameters, so as to restore the pixel value of each pixel point in the mask image corresponding to the obtained shared data, and determine it as the second decrypted data.
[0147] S1003. Based on the second symmetric key, perform compressed sensing inverse processing on the second decrypted data to obtain decrypted shared data.
[0148] Combined with the scenario example, based on the obtained second symmetric key, the second decrypted data is symmetric decrypted to obtain the compressed sensing measurement values after the compressed sensing processing corresponding to the first page image, the last page image and each middle page image of the obtained shared data, and then the compressed sensing inverse processing is performed to obtain the first page image, the last page image and each middle page image, and the first page image, the last page image and each middle page image are determined as the decrypted shared data. Based on the method provided in this example, according to the encryption processing order of the data, the obtained shared data is subjected to denoising, piecewise linear chaotic inverse mapping and compressed sensing inverse processing in turn to accurately obtain the decrypted shared data.
[0149] Based on the method provided in this embodiment, the shared data is encrypted by compressed sensing processing, piecewise linear chaotic mapping processing and noise addition processing in sequence. The shared data is encrypted by three different encryption methods, so that the final encrypted data is difficult to crack, thereby improving the security of the shared data.
[0150] Fig.11 The structural diagram of the data sharing device provided by the present application is applied to a computing device, such as Fig.11 As shown, the data sharing device includes:
[0151] An acquisition module 111 is used to acquire data to be shared;
[0152] The processing module 112 is used to perform compressed sensing processing on the data to be shared to obtain first encrypted data;
[0153] The processing module 112 is further used to perform piecewise linear chaotic mapping processing on the first encrypted data to obtain second encrypted data;
[0154] The processing module 112 is further configured to add noise to the second encrypted data to obtain final encrypted data;
[0155] The processing module 112 is further used to perform sharing processing on the final encrypted data.
[0156] The data to be shared includes a first page image, a last page image and at least one middle page image;
[0157] Optionally, the processing module 112 is specifically used to perform two-dimensional wavelet transform on the first page image, the last page image and each intermediate page image respectively, so as to obtain sparse coefficients corresponding to the first page image, the last page image and each intermediate page image respectively;
[0158] The processing module 112 is further configured to obtain a preset measurement matrix;
[0159] The processing module 112 is further specifically used to sample the sparse coefficients corresponding to the first page image, the last page image and each intermediate page image respectively based on the measurement matrix to obtain the compressed sensing measurement values corresponding to the first page image, the last page image and each intermediate page image respectively;
[0160] The processing module 112 is further configured to fuse the compressed sensing measurement values corresponding to the first page image and the last page image to obtain a first fusion result;
[0161] The processing module 112 is further configured to fuse the compressed sensing measurement values corresponding to all the intermediate page images to obtain a second fusion result;
[0162] The processing module 112 is further configured to encrypt the first fusion result using a first symmetric key to obtain a first key value, and encrypt the second fusion result using the first symmetric key to obtain a second key value;
[0163] The processing module 112 is further configured to perform quantization and mapping processing on the first key value and the second key value to obtain first encrypted data.
[0164] Optionally, the processing module 112 is further configured to perform normalization processing on the first page image and the last page image;
[0165] The processing module 112 is further configured to perform grayscale processing and normalization processing on each intermediate page image.
[0166] Optionally, the processing module 112 is further configured to obtain a preset first chaotic mapping parameter;
[0167] The processing module 112 is further configured to obtain a piecewise linear chaotic mapping formula based on the first chaotic mapping parameter;
[0168] The processing module 112 is further configured to iteratively process the first encrypted data based on the piecewise linear chaotic mapping formula to obtain corresponding iterative result data;
[0169] The processing module 112 is further configured to superimpose the iteration result data onto the first encrypted data to obtain the second encrypted data.
[0170] Optionally, the processing module 112 is further configured to obtain a corresponding relationship between each first element in the iteration result data and each second element in the first encrypted data;
[0171] The processing module 112 is further configured to convert each first element in the iteration result data and each second element in the first encrypted data into binary respectively;
[0172] The processing module 112 is further configured to perform binary bit operation processing according to the corresponding relationship between the first element and the second element to obtain the second encrypted data.
[0173] Optionally, the processing module 112 is further configured to adopt a Gaussian mechanism of differential privacy to obtain a sensitivity parameter corresponding to the second encrypted data;
[0174] The processing module 112 is further configured to obtain noise that obeys a Gaussian distribution based on a preset first parameter, a second parameter and the sensitivity parameter;
[0175] The processing module 112 is further configured to add the noise obeying the Gaussian distribution to the second encrypted data to obtain the final encrypted data.
[0176] Optionally, the processing module 112 is further used to obtain shared data to be decrypted;
[0177] The processing module 112 is further used to obtain a second chaotic mapping parameter and a second symmetric key corresponding to the shared data to be decrypted;
[0178] The processing module 112 is further configured to perform decryption processing on the shared data to be decrypted based on the second chaotic mapping parameter and the second symmetric key to obtain the decrypted shared data.
[0179] Optionally, the processing module 112 is further configured to perform a noise removal process on the shared data to be decrypted to obtain first decrypted data;
[0180] The processing module 112 is further configured to perform piecewise linear chaotic inverse mapping processing on the first decrypted data based on the second chaotic mapping parameter to obtain second decrypted data;
[0181] The processing module 112 is further specifically configured to perform compressed sensing inverse processing on the second decrypted data based on the second symmetric key to obtain decrypted shared data.
[0182] The data sharing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0183] Fig.12 This is a schematic diagram of the structure of the computer device provided in this application. Fig.12 As shown, the computer device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.
[0184] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0185] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0186] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0187] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0188] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0189] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0190] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0191] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0192] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0193] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0194] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0195] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0196] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0197] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0198] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A data sharing method, characterized in that: Applied to computing devices, including: Get the data to be shared; Performing compressed sensing processing on the data to be shared to obtain first encrypted data; Performing piecewise linear chaotic mapping processing on the first encrypted data to obtain second encrypted data; adding noise to the second encrypted data to obtain final encrypted data; The final encrypted data is shared.
2. The method according to claim 1, characterized in that The data to be shared includes a first page image, a last page image and at least one middle page image; Accordingly, performing compressed sensing processing on the data to be shared to obtain first encrypted data includes: Performing two-dimensional wavelet transform on the first page image, the last page image and each middle page image respectively, so as to obtain sparse coefficients corresponding to the first page image, the last page image and each middle page image respectively; Get the preset measurement matrix; Based on the measurement matrix, the sparse coefficients corresponding to the first page image, the last page image and each middle page image are sampled respectively to obtain compressed sensing measurement values corresponding to the first page image, the last page image and each middle page image respectively; Fusing the compressed sensing measurement values corresponding to the first page image and the last page image to obtain a first fusion result; Fusing the compressed sensing measurement values corresponding to all the intermediate page images to obtain a second fusion result; The first fusion result is encrypted using a first symmetric key to obtain a first key value, and the second fusion result is encrypted using the first symmetric key to obtain a second key value; The first key value and the second key value are quantized and mapped to obtain first encrypted data.
3. The method according to claim 2, characterized in that Before performing two-dimensional wavelet transform on the first page image, the last page image and each middle page image respectively, the method further includes: Normalizing the first page image and the last page image; Grayscale processing and normalization processing are performed on each intermediate page image.
4. The method according to claim 1, characterized in that: The performing piecewise linear chaotic mapping processing on the first encrypted data to obtain second encrypted data includes: Obtaining a preset first chaotic mapping parameter; Obtaining a piecewise linear chaotic mapping formula based on the first chaotic mapping parameter; Iteratively processing the first encrypted data based on the piecewise linear chaotic mapping formula to obtain corresponding iterative result data; The iteration result data is superimposed on the first encrypted data to obtain the second encrypted data.
5. The method according to claim 4, characterized in that The step of superimposing the iteration result data onto the first encrypted data to obtain the second encrypted data includes: Obtaining a corresponding relationship between each first element in the iteration result data and each second element in the first encrypted data; Convert each first element in the iteration result data and each second element in the first encrypted data into binary respectively; According to the corresponding relationship between the first element and the second element, binary bit operation processing is performed to obtain the second encrypted data.
6. The method according to claim 1, characterized in that The adding noise to the second encrypted data to obtain final encrypted data comprises: Using a Gaussian mechanism of differential privacy, a sensitivity parameter corresponding to the second encrypted data is obtained; Based on the preset first parameter, second parameter and the sensitivity parameter, noise obeying Gaussian distribution is obtained; The obtained noise obeying the Gaussian distribution is added to the second encrypted data to obtain the final encrypted data.
7. The method according to any one of claims 1 to 6, characterized in that: Also includes: Obtain the shared data to be decrypted; Acquire a second chaotic mapping parameter and a second symmetric key corresponding to the shared data to be decrypted; The shared data to be decrypted is decrypted based on the second chaotic mapping parameter and the second symmetric key to obtain the decrypted shared data.
8. The method according to claim 7, characterized in that The decrypting the shared data to be decrypted based on the second chaotic mapping parameter and the second symmetric key to obtain the decrypted shared data includes: Performing noise removal processing on the shared data to be decrypted to obtain first decrypted data; Based on the second chaotic mapping parameter, performing piecewise linear chaotic inverse mapping processing on the first decrypted data to obtain second decrypted data; Based on the second symmetric key, compressed sensing inverse processing is performed on the second decrypted data to obtain decrypted shared data.
9. A data sharing device, characterized in that: Applied to computing devices, including: An acquisition module, used to acquire data to be shared; A processing module, used for performing compressed sensing processing on the data to be shared to obtain first encrypted data; The processing module is further used to perform piecewise linear chaotic mapping processing on the first encrypted data to obtain second encrypted data; The processing module is further used to add noise to the second encrypted data to obtain final encrypted data; The processing module is also used to share the final encrypted data.
10. A computer device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.