A data encryption storage method, an encryption terminal and a decryption terminal
By superimposing and encrypting the photos in the electronic album, using the random number of splicing functions and path selection functions to generate encrypted path data and encrypted tile data, the problem of difficulty in protecting the privacy of the electronic album photo content in the prior art is solved, and the effect of not causing privacy leakage even if the photos are leaked.
Patent Information
- Application Number
- CN202111492937.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2041-12-08
AI Technical Summary
The prior art is difficult to effectively protect the privacy of photo content in electronic photo albums. Setting a privacy password alone is not enough to ensure security, especially after the privacy password is leaked.
By obtaining real-time data of electronic devices and electronic photos to be encrypted, the random number of splicing functions and path selection functions are used to generate encrypted path data and encrypted tile data, superimpose and encrypt the photos, generate encrypted electronic photos, and upload them to cloud storage.
Even if the photos are leaked, it will not cause privacy leakage, protecting the security of user privacy to the greatest extent, and changing the content of the photos is achieved.
Smart Images

Figure CN114398647B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data encryption, and particularly relates to a data encryption storage method, an encryption terminal, and a decryption terminal. Background Art
[0002] An electronic photo album refers to a special document of still pictures that can be viewed on a computer, and its content is not limited to photographic photos, but can also include various artistic creation pictures. The electronic photo album has advantages that cannot be compared with traditional photo albums: the expressive means of combining pictures, texts, sounds, and images, the function of freely modifying and editing, the fast retrieval method, the permanent preservation characteristic of never fading, and the superior means of cheap copying and distribution.
[0003] In addition to being presented in the form of a video, an electronic photo album can also be presented in various forms and multiple formats, such as browsing and interacting on a computer, viewing through a network interaction method, watching in a video method, etc. The most common electronic photo album is the mobile phone photo album. To protect privacy, people usually set a privacy password for the mobile phone photo album, and then the content in the mobile phone photo album can be viewed after obtaining the privacy password.
[0004] However, only protecting by setting a privacy password is difficult to ensure security. After the privacy password is leaked, the photos in the mobile phone photo album are easily seen by others. Summary of the Invention
[0005] The purpose of the embodiments of the present invention is to provide a data encryption storage method, aiming to solve the problems proposed in the third part of the background art.
[0006] The embodiments of the present invention are implemented as follows. A data encryption storage method, the method includes:
[0007] Obtain the electronic photo to be encrypted and the real-time data of the electronic device, where the real-time data of the electronic device includes first intercepted data and second intercepted data;
[0008] Generate splicing quantity data according to the first intercepted data, the electronic photo to be encrypted, and the splicing quantity random function;
[0009] Calculate encrypted path data according to the second intercepted data, the splicing quantity data, the electronic photo to be encrypted, and the path selection function, and generate encrypted block data;
[0010] Perform superimposed encryption on the electronic photo to be encrypted through the encrypted block data to generate an encrypted electronic photo, and upload the splicing quantity data and the encrypted block data to the cloud.
[0011] Preferably, the step of generating splicing quantity data according to the first intercepted data, the electronic photo to be encrypted, and the splicing quantity random function specifically includes:
[0012] Analyze the electronic photo to be encrypted to obtain an image analysis report, where the image analysis report at least includes the number of pixels of the electronic photo to be encrypted and the number of edge pixels of the electronic photo to be encrypted;
[0013] Substitute the first intercepted data into the splicing quantity random function to obtain alternative quantity data;
[0014] Select a set of alternative quantity data as the splicing quantity data according to the image analysis report.
[0015] Preferably, the step of calculating the encrypted path data according to the second intercepted data, the splicing quantity data, the electronic photo to be encrypted and the path selection function and generating the encrypted tile data specifically includes:
[0016] Generate tile edge data according to the splicing quantity data and the electronic photo to be encrypted, and construct a blank image;
[0017] Divide the blank image into regions, label each region with a serial number, and generate a number table;
[0018] Substitute the second intercepted data into the path selection function to obtain a path calculation result, and sort the path calculation results in the generation order;
[0019] Eliminate the path calculation results that do not coincide with the number table, and connect the remaining path calculation results in order to obtain the encrypted tile data.
[0020] Preferably, the step of performing overlay encryption on the electronic photo to be encrypted by using the encrypted tile data to generate an encrypted electronic photo and uploading the splicing quantity data and the encrypted tile data to the cloud specifically includes:
[0021] Divide the electronic photo to be encrypted according to the splicing quantity data to obtain partitioned tiles;
[0022] Perform an overlay process on the encrypted tile data and each partitioned tile to obtain an encrypted electronic photo;
[0023] Upload the splicing quantity data and the encrypted tile data to the cloud, and use the cloud to store the encrypted tile data. The encrypted tile data needs to be authenticated by biometric identification when downloaded from the cloud.
[0024] Preferably, the number of the partitioned tiles is not less than a preset value.
[0025] Preferably, the biometric identification is voiceprint authentication, fingerprint authentication or face verification.
[0026] Another object of the embodiment of the present invention is to provide a data encryption terminal, where the data encryption terminal includes:
[0027] A data acquisition module, configured to acquire an electronic photo to be encrypted and real-time data of an electronic device, where the real-time data of the electronic device includes first intercepted data and second intercepted data;
[0028] A first calculation module, configured to generate splicing quantity data according to the first intercepted data, the electronic photo to be encrypted, and a splicing quantity random function;
[0029] A second calculation module, configured to calculate encrypted path data according to the second intercepted data, the splicing quantity data, the electronic photo to be encrypted, and a path selection function, and generate encrypted tile data;
[0030] An image encryption module, configured to perform overlay encryption on the electronic photo to be encrypted through the encrypted tile data, generate an encrypted electronic photo, and upload the splicing quantity data and the encrypted tile data to the cloud.
[0031] Preferably, the first calculation module includes:
[0032] An image analysis unit, configured to analyze the electronic photo to be encrypted to obtain an image analysis report, where the image analysis report at least includes the pixel quantity of the electronic photo to be encrypted and the edge pixel quantity of the electronic photo to be encrypted;
[0033] A first random unit, configured to substitute the first intercepted data into the splicing quantity random function to obtain alternative quantity data;
[0034] A data calculation unit, configured to select a group of alternative quantity data as the splicing quantity data according to the image analysis report.
[0035] Preferably, the second calculation module includes:
[0036] An edge data generation unit, configured to generate tile edge data according to the splicing quantity data and the electronic photo to be encrypted, and construct a blank image;
[0037] An image partitioning unit, configured to partition the blank image, label a serial number for each region, and generate a number table;
[0038] A path calculation unit, configured to substitute the second intercepted data into the path selection function to obtain a path calculation result, and sort the path calculation result in the generation order;
[0039] A tile generation unit, configured to eliminate the path calculation results that do not coincide with the number table, and connect the remaining path calculation results in order to obtain the encrypted tile data.
[0040] Another object of the embodiments of the present invention is to provide a data decryption terminal, which is used to download encrypted tile data from the cloud and restore the to-be-encrypted electronic photo according to the encrypted tile data and the already encrypted electronic photo.
[0041] A data encryption storage method provided by the embodiments of the present invention encrypts the data of the pictures stored in the electronic album by reading the information generated by the hardware where the electronic album is located, and changes the display content of the pictures, thereby realizing the alteration of the photo content. At this time, even if the photo is leaked, privacy will not be leaked, and the security of user privacy is protected to the greatest extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flowchart of a data encryption storage method provided by the embodiments of the present invention;
[0043] Figure 2 It is a flowchart of the steps of obtaining the to-be-encrypted electronic photo and the real-time data of the electronic device provided by the embodiments of the present invention;
[0044] Figure 3 It is a flowchart of the steps of calculating encrypted path data according to the second intercepted data, the splicing quantity data, the to-be-encrypted electronic photo and the path selection function, and generating encrypted tile data provided by the embodiments of the present invention;
[0045] Figure 4 It is a flowchart of the steps of performing overlay encryption on the to-be-encrypted electronic photo by using the encrypted tile data, generating the already encrypted electronic photo, and uploading the splicing quantity data and the encrypted tile data to the cloud provided by the embodiments of the present invention;
[0046] Figure 5 It is an architecture diagram of a data encryption terminal provided by the embodiments of the present invention;
[0047] Figure 6 It is an architecture diagram of the first calculation module provided by the embodiments of the present invention;
[0048] Figure 7 It is an architecture diagram of the second calculation module provided by the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0049] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0050] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0051] In addition to being presented in the form of video, electronic photo albums can also be presented in multiple forms and formats, such as browsing and interacting on a computer, viewing in an interactive way on the Internet, watching in a video way, etc. The most common electronic photo album is the mobile phone album. In order to protect privacy, people usually set a privacy password for the mobile phone album, and then they can view the content in the mobile phone album after obtaining the privacy password. However, it is difficult to ensure security by simply setting a privacy password. After the privacy password is leaked, the photos in the mobile phone album are easy to be seen by others.
[0052] The present invention encrypts the data of the pictures stored in the electronic album and changes the displayed content of the pictures by reading the information generated by the hardware where the electronic album is located, thereby realizing the alteration of the photo content. At this time, even if the photos are leaked, it will not cause privacy leakage, thus protecting the security of user privacy to the greatest extent.
[0053] like Figure 1 FIG. 1 is a flow chart of a data encryption storage method provided by an embodiment of the present invention, wherein the method comprises:
[0054] S100, obtaining an electronic photo to be encrypted and electronic device real-time data, wherein the electronic device real-time data includes first intercepted data and second intercepted data.
[0055] In this step, the electronic photo to be encrypted and the real-time data of the electronic device are obtained. The electronic photo to be encrypted is the photo that needs to be encrypted, which can be a picture taken by the current electronic device or a picture imported from an external device. The real-time data of the electronic device is the data generated by the electronic device itself. The first intercepted data and the second intercepted data are both from the electronic device itself. The two can be the same type of data or different types of data. Specifically, it can be a display video data stream intercepted from the electronic device or a wirelessly received data stream.
[0056] S200, generating splicing quantity data according to the first intercepted data, the electronic photo to be encrypted and a splicing quantity random function.
[0057] In this step, a splicing quantity random function is called to analyze the electronic photo to be encrypted, so as to determine the number of pixels contained in the electronic photo to be encrypted. Then, after the first intercepted data is transformed, it is converted into a numerical value and then substituted into the splicing quantity random function to generate a series of numerical results, and a set of numerical results is selected as the splicing quantity data.
[0058] S300, calculate encrypted path data based on the second intercepted data, the splicing quantity data, the electronic photo to be encrypted, and the path selection function, and generate encrypted tile data.
[0059] In this step, a comprehensive analysis of the electronic photo to be encrypted is performed according to the splicing quantity data to judge the number of pieces into which the electronic photo to be encrypted will be divided when divided according to the splicing quantity data. Then, a blank image is generated. After the second intercepted data is also transformed, it is substituted into the path selection function, and a series of results are calculated according to the path selection function, and the blank image is drawn to obtain the encrypted tile data, and the encrypted tile data is the basis for encryption.
[0060] S400, perform overlay encryption on the electronic photo to be encrypted through the encrypted tile data to generate an encrypted electronic photo, and upload the splicing quantity data and the encrypted tile data to the cloud.
[0061] In this step, overlay encryption is performed on the electronic photo to be encrypted through the encrypted tile data, that is, the entire electronic photo to be encrypted is covered with the encrypted tile data and then overlay processing is performed to obtain the encrypted electronic photo. For the sake of understanding, the process of this step is as follows: record the color value of a certain pixel point in the electronic photo to be encrypted as 15, and the color value of the pixel corresponding to this point in the encrypted tile data is 13, then the color value of the overlaid pixel point is 28. Therefore, when decrypting, according to the difference between the color value of the pixel in the encrypted electronic photo and the color value of the corresponding pixel at the corresponding position in the encrypted tile data stored in the cloud, the actual color value of the pixel in the electronic photo to be stored can be obtained. Uploading the splicing quantity data and the encrypted tile data to the cloud is to ensure data security.
[0062] As Figure 2 shown, as a preferred embodiment of the present invention, the step of generating the splicing quantity data according to the first intercepted data, the electronic photo to be encrypted, and the splicing quantity random function specifically includes:
[0063] S201, analyze the electronic photo to be encrypted to obtain an image analysis report, and the image analysis report at least includes the number of pixels of the electronic photo to be encrypted and the number of edge pixels of the electronic photo to be encrypted.
[0064] In this step, the electronic photo to be encrypted is analyzed. During this process, the color values of each pixel in the electronic photo to be encrypted are counted to obtain an image analysis report. The image analysis report includes at least the number of pixels in the electronic photo to be encrypted and the number of edge pixels in the electronic photo to be encrypted. Based on the number of edge pixels, the electronic photo to be encrypted can be divided into regions.
[0065] S202, Substitute the first intercepted data into the splicing quantity random function to obtain alternative quantity data.
[0066] In this step, substitute the first intercepted data into the splicing quantity random function. First, call the splicing quantity random function to transform the first intercepted data into a series of numerical values, and then substitute this series of numerical values into the splicing quantity random function in sequence to obtain alternative quantity data. The alternative quantity data contains a large number of alternative quantity values.
[0067] S203, Select a group of alternative quantity data as the splicing quantity data according to the image analysis report.
[0068] In this step, select a group of alternative quantity data as the splicing quantity data according to the image analysis report. To ensure the concealment of the encrypted electronic photo, the splicing quantity should not be too low. Therefore, first screen the splicing quantity data, and then randomly select a group of alternative quantity data exceeding the preset value as the splicing quantity data.
[0069] As Figure 3 shown, as a preferred embodiment of the present invention, the step of calculating the encryption path data based on the second intercepted data, the splicing quantity data, the electronic photo to be encrypted, and the path selection function, and generating the encrypted tile data specifically includes:
[0070] S301, Generate tile edge data according to the splicing quantity data and the electronic photo to be encrypted, and construct a blank image.
[0071] In this step, generate tile edge data according to the splicing quantity data and the electronic photo to be encrypted. First, divide the electronic photo to be encrypted into regions according to the splicing quantity data, and then determine the number of pixels on the edge of each region after division, that is, the tile edge data. Construct a blank image according to the tile edge data.
[0072] S302, Divide the blank image into regions, label each region with a serial number, and generate a number table.
[0073] In this step, the blank image is divided into regions. When dividing, the blank image is divided into pixel regions of a preset size. The width and height of the pixel region are each composed of a preset number of pixels. Each region is numbered, and a number table is generated. When numbering, random numbering can be performed without ensuring continuous numbering, and a number table is obtained.
[0074] S303. Substitute the second intercepted data into the path selection function to obtain a path calculation result, and sort the path calculation results in the generation order.
[0075] In this step, substitute the second intercepted data into the path selection function. Similarly, convert the second intercepted data into a series of values. Specifically, since the second intercepted data is binary data, it is segmented, and values are converted according to the segmented binary data and substituted into the path selection function to obtain a path calculation result, and the path calculation results are sorted in the generation order.
[0076] S304. Eliminate the path calculation results that do not coincide with the number table, and connect the remaining path calculation results in order to obtain encrypted tile data.
[0077] In this step, eliminate the path calculation results that do not coincide with the number table. Since the pixel regions recorded in the number table are suitable for connection, the non - coincident path calculation results need to be deleted. Then, connect the remaining path calculation results in order with a connection line of a preset pixel width to obtain encrypted tile data, that is, connect the pixel regions in a certain order.
[0078] As Figure 4 shown, as a preferred embodiment of the present invention, the steps of superimposing and encrypting the electronic photo to be encrypted with the encrypted tile data to generate an encrypted electronic photo and uploading the splicing quantity data and the encrypted tile data to the cloud specifically include:
[0079] S401. Divide the electronic photo to be encrypted according to the splicing quantity data to obtain partitioned tiles.
[0080] In this step, divide the electronic photo to be encrypted according to the splicing quantity data to obtain partitioned tiles. The number of pixels in the width and height directions of the partitioned tiles is the same as the number of pixels in the width and height directions of the blank image.
[0081] S402. Perform a superimposing process on the encrypted tile data and each partitioned tile to obtain an encrypted electronic photo.
[0082] S403. Upload the splicing quantity data and the encrypted tile data to the cloud, and use the cloud to store the encrypted tile data. The encrypted tile data needs to be authenticated by biometric identification when downloaded from the cloud.
[0083] In this step, the encrypted tile data is superimposed on each partition tile. That is, after the encrypted tile data is overlaid on each partition tile, color value calculation is performed to obtain the encrypted electronic photo. The encrypted tile data is stored in the cloud, and biometric authentication is required when downloading the encrypted tile data from the cloud. The biometric authentication is voiceprint authentication, fingerprint authentication, or face verification.
[0084] As Figure 5 shown, a data encryption terminal provided by an embodiment of the present invention includes:
[0085] A data acquisition module 100, configured to acquire an electronic photo to be encrypted and real-time data of an electronic device, where the real-time data of the electronic device includes first intercepted data and second intercepted data.
[0086] In this terminal, the data acquisition module 100 acquires an electronic photo to be encrypted and real-time data of the electronic device. The electronic photo to be encrypted is a photo that needs to be encrypted, specifically, it can be a picture taken by the current electronic device or a picture imported from an external device. The real-time data of the electronic device is data generated by the electronic device itself. The first intercepted data and the second intercepted data both come from the electronic device itself. The two can be of the same type of data or different types of data. Specifically, it can be a display video data stream intercepted from the electronic device or a wireless received data stream.
[0087] A first calculation module 200, configured to generate splicing quantity data according to the first intercepted data, the electronic photo to be encrypted, and a splicing quantity random function.
[0088] In this terminal, the first calculation module 200 calls the splicing quantity random function to analyze the electronic photo to be encrypted, so as to determine the number of pixels included in the electronic photo to be encrypted. Then, after the first intercepted data is converted, it is converted into a numerical value and then substituted into the splicing quantity random function to generate a series of numerical results, and a set of numerical results is selected as the splicing quantity data.
[0089] A second calculation module 300, configured to calculate encrypted path data according to the second intercepted data, the splicing quantity data, the electronic photo to be encrypted, and a path selection function, and generate encrypted tile data.
[0090] In this terminal, the second calculation module 300 comprehensively analyzes the electronic photo to be encrypted according to the splicing quantity data, determines the number of pieces the electronic photo to be encrypted will be divided into when divided according to the splicing quantity data, and then generates blank images. After the second intercepted data is also transformed, it is substituted into the path selection function. A series of results are calculated according to the path selection function, and the blank images are drawn to obtain encrypted tile data, which is the basis for encryption.
[0091] The image encryption module 400 is used to perform superposition encryption on the electronic photo to be encrypted through the encrypted tile data, generate the encrypted electronic photo, and upload the splicing quantity data and the encrypted tile data to the cloud.
[0092] In this terminal, the image encryption module 400 performs superposition encryption on the electronic photo to be encrypted through the encrypted tile data, that is, uses the encrypted tile data to cover the entire electronic photo to be encrypted, and then performs superposition processing to obtain the encrypted electronic photo. When decrypting, according to the difference between the color value of the pixel in the encrypted electronic photo and the color value of the corresponding pixel in the encrypted tile data stored in the cloud, the actual color value of the pixel in the electronic photo to be stored can be obtained. Uploading the splicing quantity data and the encrypted tile data to the cloud is to ensure data security.
[0093] As Figure 6 shown, as a preferred embodiment of the present invention, the first calculation module 200 includes:
[0094] The image analysis unit 201 is used to analyze the electronic photo to be encrypted and obtain an image analysis report, which at least includes the number of pixels of the electronic photo to be encrypted and the number of edge pixels of the electronic photo to be encrypted.
[0095] In this module, the image analysis unit 201 analyzes the electronic photo to be encrypted. During this process, the color value of each pixel in the electronic photo to be encrypted is counted to obtain an image analysis report, which at least includes the number of pixels of the electronic photo to be encrypted and the number of edge pixels of the electronic photo to be encrypted. The area of the electronic photo to be encrypted can be divided according to the number of edge pixels.
[0096] The first random unit 202 is used to substitute the first intercepted data into the splicing quantity random function to obtain alternative quantity data.
[0097] In this module, the first random unit 202 substitutes the first intercepted data into the splicing quantity random function. Before that, the splicing quantity random function is called first to transform the first intercepted data into a series of numerical values, and then this series of numerical values are successively substituted into the splicing quantity random function to obtain alternative quantity data, which contains a large number of alternative quantity values.
[0098] The data calculation unit 203 is configured to select a set of alternative quantity data as the splicing quantity data according to the image analysis report.
[0099] In this module, the data calculation unit 203 selects a set of alternative quantity data as the splicing quantity data according to the image analysis report. To ensure the concealment of the encrypted electronic photo, the splicing quantity should not be too low. Therefore, the splicing quantity data is first screened, and then a set of alternative quantity data exceeding the preset value is randomly selected as the splicing quantity data.
[0100] As Figure 7 shown, as a preferred embodiment of the present invention, the second calculation module 300 includes:
[0101] The edge data generation unit 301 is configured to generate tile edge data according to the splicing quantity data and the electronic photo to be encrypted, and construct a blank image.
[0102] In this module, the edge data generation unit 301 generates tile edge data according to the splicing quantity data and the electronic photo to be encrypted. First, the electronic photo to be encrypted is regionally divided according to the splicing quantity data, and then the number of pixels on the edge of each divided region is determined, that is, the tile edge data, and a blank image is constructed according to the tile edge data.
[0103] The image partitioning unit 302 is configured to partition the blank image, label each region with a serial number, and generate a number table.
[0104] In this module, the image partitioning unit 302 partitions the blank image. When partitioning, the blank image is divided into pixel regions of a preset size, and the width and height of the pixel region are both composed of a preset number of pixels. Each region is labeled with a serial number, and a number table is generated. When numbering, random numbering can be performed without ensuring continuous numbering to obtain the number table.
[0105] The path calculation unit 303 is configured to substitute the second intercepted data into the path selection function to obtain a path calculation result, and sort the path calculation results in the generation order.
[0106] In this module, the path calculation unit 303 substitutes the second intercepted data into the path selection function. Similarly, the second intercepted data is converted into a series of numerical values. Specifically, the second intercepted data is binary data. Therefore, it is subjected to data segmentation, and the binary data after segmentation is converted into numerical values, which are then substituted into the path selection function to obtain the path calculation result, and the path calculation results are sorted according to the generation order.
[0107] The tile generation unit 304 is configured to eliminate the path calculation results that do not coincide with the number table, and connect the remaining path calculation results in sequence to obtain encrypted tile data.
[0108] In this module, the tile generation unit 304 eliminates the path calculation results that do not coincide with the number table. Since the pixel areas recorded in the number table are suitable for connection, the path calculation results that do not coincide need to be deleted. Then, the remaining path calculation results are connected in sequence with a connection line of a preset pixel width to obtain encrypted tile data, that is, the connection lines are made between the pixel areas in a certain order.
[0109] An embodiment of the present invention further provides a data decryption terminal, which is used to download encrypted tile data from the cloud and restore the to-be-encrypted electronic photo according to the encrypted tile data and the encrypted electronic photo.
[0110] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily need to be executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages does not necessarily need to be sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0111] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0112] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0113] The above embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.
[0114] The above is only the preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A data encryption and storage method, characterized in that, the method includes: Obtain the electronic photo to be encrypted and the real-time data of the electronic device, where the real-time data of the electronic device includes first intercepted data and second intercepted data; Generate splicing quantity data according to the first intercepted data, the electronic photo to be encrypted, and the splicing quantity random function; Calculate encrypted path data according to the second intercepted data, the splicing quantity data, the electronic photo to be encrypted, and the path selection function, and generate encrypted block data; Perform overlay encryption on the electronic photo to be encrypted through the encrypted block data to generate an encrypted electronic photo, and upload the splicing quantity data and the encrypted block data to the cloud; The step of calculating encrypted path data according to the second intercepted data, the splicing quantity data, the electronic photo to be encrypted, and the path selection function, and generating encrypted block data specifically includes: Generate block edge data according to the splicing quantity data and the electronic photo to be encrypted, and construct a blank image; Divide the blank image into regions, label each region with a serial number, and generate a number table; Substitute the second intercepted data into the path selection function to obtain a path calculation result, and sort the path calculation results in the generated order; Eliminate the path calculation results that do not coincide with the number table, and connect the remaining path calculation results in order to obtain encrypted block data.
2. The data encryption and storage method according to claim 1, characterized in that, The step of generating splicing quantity data according to the first intercepted data, the electronic photo to be encrypted, and the splicing quantity random function specifically includes: Analyze the electronic photo to be encrypted to obtain an image analysis report, where the image analysis report at least includes the pixel quantity of the electronic photo to be encrypted and the edge pixel quantity of the electronic photo to be encrypted; Substitute the first intercepted data into the splicing quantity random function to obtain alternative quantity data; Select a group of alternative quantity data as the splicing quantity data according to the image analysis report.
3. The data encryption and storage method according to claim 1, characterized in that, The step of performing overlay encryption on the electronic photo to be encrypted through the encrypted block data to generate an encrypted electronic photo, and uploading the splicing quantity data and the encrypted block data to the cloud specifically includes: Divide the electronic photo to be encrypted according to the splicing quantity data to obtain partitioned blocks; Perform an overlay process on the encrypted block data and each partitioned block to obtain an encrypted electronic photo; Transmit the splicing quantity data and the encrypted block data to the cloud, and use the cloud to store the encrypted block data. The encrypted block data needs to be authenticated by biometric identification when downloaded from the cloud.
4. The data encryption and storage method according to claim 3, characterized in that, The quantity of the partitioned blocks is not less than a preset value.
5. The data encryption and storage method according to claim 3, characterized in that, The biometric identification is voiceprint authentication, fingerprint authentication, or face verification.
6. A data encryption terminal, characterized in that, the data encryption terminal includes: A data acquisition module for acquiring an electronic photo to be encrypted and real-time data of an electronic device, where the real-time data of the electronic device includes first intercepted data and second intercepted data; A first calculation module for generating splicing quantity data according to the first intercepted data, the electronic photo to be encrypted, and a splicing quantity random function; A second calculation module for calculating encrypted path data according to the second intercepted data, the splicing quantity data, the electronic photo to be encrypted, and a path selection function, and generating encrypted tile data; An image encryption module for performing overlay encryption on the electronic photo to be encrypted through the encrypted tile data, generating an encrypted electronic photo, and uploading the splicing quantity data and the encrypted tile data to the cloud; The second calculation module includes: An edge data generation unit for generating tile edge data according to the splicing quantity data and the electronic photo to be encrypted, and constructing a blank image; An image partitioning unit for partitioning the blank image into regions, numbering each region, and generating a numbering table; A path calculation unit for substituting the second intercepted data into the path selection function to obtain a path calculation result, and sorting the path calculation results in the generation order; A tile generation unit for eliminating path calculation results that do not coincide with the numbering table, and connecting the remaining path calculation results in order to obtain encrypted tile data.
7. The data encryption terminal according to claim 6, wherein, The first calculation module includes: An image analysis unit for analyzing the electronic photo to be encrypted to obtain an image analysis report, where the image analysis report at least includes the number of pixels of the electronic photo to be encrypted and the number of edge pixels of the electronic photo to be encrypted; A first random unit for substituting the first intercepted data into the splicing quantity random function to obtain alternative quantity data; A data calculation unit for selecting a set of alternative quantity data as the splicing quantity data according to the image analysis report.
Citation Information
Patent Citations
Privacy-protecting biological characteristic image processing method and device
CN111401320A