Method, system, device and storage medium for secure storage of encrypted data
By dividing data in the encrypted data storage system and selecting appropriate remote storage modules, the security and data loss problems of the encrypted data storage system are solved, and the secure storage and recovery of data are achieved.
Patent Information
- Application Number
- CN202411162144.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The prior art has failed to effectively solve the security problems of encrypted data on storage systems and storage nodes, especially the inability to prevent data leakage and data loss caused by storage system failure.
By dividing encrypted data into different storage units and selecting appropriate storage units in the remote storage module for storage, the selection unit is sorted according to the security values and indicators of the user module and the remote storage module to ensure that the data is in a safe and suitable storage module. storage in the process ensures separate storage and recovery of data.
It effectively avoids the loss of stored data. Even if partially stored data is lost, encrypted data can be recovered, ensuring the security of encrypted data and preventing unauthorized recovery.
Smart Images

Figure CN118690418B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data storage, and in particular relates to a secure storage method, system, device and storage medium for encrypted data. Background Art
[0002] Encrypted data is data obtained by encrypting plaintext data. Since the plaintext data corresponding to the encrypted data usually has a higher value, the secure storage of encrypted data has become an issue of increasing concern.
[0003] Similar prior art includes Chinese patent application with publication number CN108038168A, which discloses a data external storage method, the method includes: managing, monitoring, and configuring permissions for an external storage system; selecting an external storage system through a storage operation module for data to be stored; verifying the operation permissions of the selected external storage system; converting the data to be stored into an agreed format and storing it, and recording file information; creating an index file for the data to be stored in the agreed format; based on the index file, finding the storage location of the corresponding data and downloading or deleting it, and the patent application can realize the diversification of data external storage. In addition, similar prior art includes Chinese patent application with publication number CN117666970A, which provides a data storage method and a data storage device, wherein the data storage method includes: obtaining data to be stored of a first master node, wherein the first master node is any one of a plurality of master nodes; in the case of a failure of the first master node, performing type identification on the data to be stored and determining the data type of the data to be stored; based on the data type, selecting a target master node corresponding to the data to be stored from storage nodes other than the first master node; storing the data to be stored in the target master node.
[0004] However, the above patent application does not consider the security issues of storage systems and storage nodes, and cannot solve the problem of storage data leakage. Therefore, the present invention proposes a secure storage method, system, device and storage medium for encrypted data. Summary of the invention
[0005] The division unit divides the encrypted data into different storage data, the storage unit stores any storage data, and the selection unit selects a final remote storage module each time to store the storage data not stored in any storage unit, and selecting a final remote storage module includes selecting a second number of remote storage modules from all remote storage modules based on the interval between the user module and the remote storage module and the total security value, continuing to select a third number of remote storage modules according to the first index of all remote storage units in the second number of remote storage modules, obtaining the second index of the remote storage unit that meets the first index requirement in the third number of remote storage modules, and selecting the remote storage module where the remote storage unit with the highest second index ranking is located as the final remote storage module. The present invention aims to select a safe and appropriate remote storage module to store different storage data generated by encrypted data, and ensure the security of encrypted data.
[0006] In order to achieve the above-mentioned object of the invention, the present invention provides a secure storage method for encrypted data as described below, which mainly includes the following steps:
[0007] S1. The division unit in the user module performs division processing on the encrypted data to obtain different storage data, and the storage unit in the user module stores any one storage data among all the storage data;
[0008] S2, the selection unit in the user module selects the first number of remote storage modules whose intervals with the user module exceed a preset interval threshold from all remote storage modules, and the selection unit respectively calculates the sum of the safety value of the user module and the safety value of the first number of remote storage modules to obtain the first number of total safety values, and continues to select the second number of remote storage modules corresponding to the total safety values greater than the preset total safety value threshold from the first number of remote storage modules;
[0009] S3, the selection unit determines whether the second number is greater than a preset second number threshold value, if not, lowers the interval threshold value, and jumps to S2, if yes, the selection unit obtains the first indexes of all remote storage units in the remote storage module of the second number, and continues to select the remote storage module of the third number that contains the remote storage unit whose first index meets the preset first index requirement from the remote storage module of the second number;
[0010] S4, the selection unit determines whether the third number is greater than a preset third number threshold value, if not, lowers the interval threshold value, and jumps to S2, if yes, the selection unit obtains the second index of the remote storage unit that meets the first index requirement in the remote storage module of the third number, sorts all the remote storage units according to the second index, and selects the remote storage module where the remote storage unit with the highest sorting is located as the final remote storage module;
[0011] S5, the communication unit of the user module sends a storage data to the final remote storage module through the network module for storage, and the selection unit determines whether there is any unstored storage data. If yes, jump to S2, if not, end all steps.
[0012] As a preferred technical solution of the present invention, the safety value of the user module represents the probability of a crisis event occurring at the location of the user module, and the safety value of the remote storage module represents the probability of a crisis event occurring at the location of the remote storage module; the first indicator of the remote storage unit includes the size of the available space of the remote storage unit, and the amount of data that can be written to the remote storage unit per unit time; the second indicator of the remote storage unit refers to the time from the time the remote storage unit starts writing preset data to the time the remote storage unit completes writing the preset data.
[0013] As a preferred technical solution of the present invention, the division unit performs division processing on the encrypted data to obtain different storage data, including the following steps:
[0014] S11, the dividing unit divides the encrypted data into first encrypted data and second encrypted data, and the dividing unit generates first feature data and second feature data;
[0015] S12, the division unit performs a preset operation on the first encrypted data, the first characteristic data, and the second characteristic data to obtain a first portion of stored data A, and at the same time, the division unit performs a preset operation on the second encrypted data and the second characteristic data to obtain a first portion of stored data B, and the division unit combines the first portion of stored data A and the first portion of stored data B to obtain the first stored data;
[0016] S13, the division unit performs a preset operation on the first encrypted data and the first characteristic data to obtain the second part of the stored data A, and at the same time, the division unit performs a preset operation on the second encrypted data, the first characteristic data, and the second characteristic data to obtain the second part of the stored data B, and the division unit connects the second part of the stored data A and the second part of the stored data B to obtain the second stored data;
[0017] S14. The division unit connects the first characteristic data and the second characteristic data together as the third storage data, and performs a preset operation on the first encrypted data and the second characteristic data to obtain the fourth part of the storage data A, performs a preset operation on the second encrypted data and the first characteristic data to obtain the fourth part of the storage data B, and merges the fourth part of the storage data A and the fourth part of the storage data B to obtain the fourth storage data.
[0018] As a preferred technical solution of the present invention, when a crisis event occurs at the location of the user module and the storage unit loses the stored data, the following processing is included:
[0019] Processing situation A: when the storage unit stores the first storage data, the storage unit performs a preset operation on the second part of the storage data A and the third part of the storage data B to obtain the first part of the storage data A, performs a preset operation on the second part of the storage data B and the third part of the storage data A to obtain the first part of the storage data B, and combines the first part of the storage data A and the first part of the storage data B to obtain the first storage data;
[0020] Processing situation B: When the storage unit stores the second storage data, the storage unit performs a preset operation on the first part of the storage data A and the third part of the storage data B to obtain the second part of the storage data A, performs a preset operation on the first part of the storage data B and the third part of the storage data A to obtain the second part of the storage data B, and merges the second part of the storage data A and the second part of the storage data B to obtain the second storage data.
[0021] As a preferred technical solution of the present invention, when a crisis event occurs at the location of the user module and the storage unit loses the stored data, the following processing is also included:
[0022] Processing situation C: when the storage unit stores the third storage data, the storage unit performs a preset operation on the first part of the storage data A and the fourth part of the storage data A to obtain the third part of the storage data A, performs a preset operation on the second part of the storage data B and the fourth part of the storage data B to obtain the third part of the storage data B, and combines the third part of the storage data A and the third part of the storage data B to obtain the third storage data;
[0023] Processing situation D: When the storage unit stores the fourth storage data, the storage unit performs a preset operation on the first part of the storage data A and the third part of the storage data A to obtain the fourth part of the storage data A, performs a preset operation on the second part of the storage data B and the third part of the storage data B to obtain the fourth part of the storage data B, and merges the fourth part of the storage data A and the fourth part of the storage data B to obtain the fourth storage data.
[0024] As a preferred technical solution of the present invention, the storage unit restores the encrypted data, including the following execution conditions:
[0025] Execution situation A: the storage unit performs a preset operation on the first part storage data B, the second part storage data A, and the second part storage data B to obtain first encrypted data, performs a preset operation on the first part storage data A, the first part storage data B, and the second part storage data A to obtain second encrypted data, and connects the first encrypted data and the second encrypted data to obtain encrypted data;
[0026] Execution condition B: the storage unit performs a preset operation on the first part storage data A, the third part storage data A, and the third part storage data B to obtain first encrypted data, performs a preset operation on the first part storage data B and the third part storage data B to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data;
[0027] Execution condition C: The storage unit performs a preset operation on the second part storage data A and the third part storage data A to obtain first encrypted data, performs a preset operation on the second part storage data B, the third part storage data A, and the third part storage data B together to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data.
[0028] As a preferred technical solution of the present invention, the storage unit restores the encrypted data, and further includes the following execution conditions:
[0029] Execution condition D: the storage unit performs a preset operation on the first part of the stored data A, the first part of the stored data B, and the fourth part of the stored data B to obtain first encrypted data, performs a preset operation on the first part of the stored data A, the fourth part of the stored data A, and the fourth part of the stored data B to obtain second encrypted data, and connects the first encrypted data and the second encrypted data to obtain encrypted data;
[0030] Execution condition E: the storage unit performs a preset operation on the second part storage data B, the fourth part storage data A, and the fourth part storage data B to obtain first encrypted data, performs a preset operation on the second part storage data A, the second part storage data B, and the fourth part storage data A to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data;
[0031] Execution condition F: The storage unit performs a preset operation on the third part of the stored data B and the fourth part of the stored data A to obtain the first encrypted data, performs a preset operation on the third part of the stored data A and the fourth part of the stored data B to obtain the second encrypted data, and connects the first encrypted data and the second encrypted data to obtain the encrypted data.
[0032] The present invention also provides a secure storage system for encrypted data, comprising the following modules:
[0033] The user module includes a division unit, a storage unit, a selection unit, and a communication unit, which are used to divide the encrypted data to obtain different storage data, store any storage data among all the storage data, and select the first number of remote storage modules whose interval with the user module exceeds the interval threshold from all the remote storage modules, respectively calculate the sum of the security value of the user module and the security value of the first number of remote storage modules to obtain the total security value of the first number, continue to select the second number of remote storage modules corresponding to the total security value greater than the total security value threshold from the remote storage modules of the first number, and judge whether the second number is greater than the second number threshold. If not, reduce the interval threshold and re-calculate. Select the remote storage module of the first number, if yes, the selection unit obtains the first index of all the remote storage units in the remote storage module of the second number, and continues to select the remote storage module of the third number including the remote storage unit whose first index meets the first index requirement from the remote storage module of the second number, and is also used to determine whether the third number is greater than the third number threshold, if no, lower the interval threshold, reselect the remote storage module of the first number, if yes, obtain the second index of the remote storage unit that meets the first index requirement in the remote storage module of the third number, sort all the remote storage units according to the second index, and select the remote storage module where the remote storage unit with the highest sorting is located as the final remote storage module;
[0034] A network module, used for transmitting data between the communication unit of the user module and the communication unit of the remote storage module;
[0035] The remote storage module includes a remote storage unit and a communication unit, and is used to store the storage data sent from the communication unit of the user module and to send the storage data to the communication unit of the user module.
[0036] The present invention also provides a device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement any one of the above-mentioned methods when executing the computer program.
[0037] The present invention also provides a storage medium, wherein the storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute any one of the above methods.
[0038] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0039] In the present invention, first, the division unit performs division processing on the encrypted data to obtain different storage data, and the storage unit stores any one of the storage data in all the storage data. Then, the selection unit selects the first number of remote storage modules whose interval with the user module exceeds the interval threshold, and respectively calculates the sum of the security value of the user module and the security value of the first number of remote storage modules to obtain the total security value of the first number, and continues to select the second number of remote storage modules corresponding to the total security value greater than the total security value threshold. Secondly, the selection unit obtains the first index of all remote storage units in the second number of remote storage modules, and continues to select the third number of remote storage modules containing remote storage units whose first index meets the first index requirement. Thirdly, the selection unit obtains the second index of the remote storage unit that meets the first index requirement in the third number of remote storage modules, and selects the remote storage module where the remote storage unit with the highest second index ranking is located as the final remote storage module. Finally, the communication unit of the user module sends a storage data to the final remote storage module through the network module for storage. When there is still storage data that has not been stored, the step of generating the final remote storage module is repeated. The present invention selects a safe and suitable remote storage module to store different storage data generated by encrypted data, which can avoid storage data loss as much as possible. Even if individual storage data is lost, the encrypted data can still be restored because the rules are mastered in advance. Different storage data are stored separately. Even if the individual storage data is stolen, the encrypted data cannot be restored without knowing the rules, which can ensure the security of the encrypted data. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A flowchart of a method for securely storing encrypted data according to the present invention;
[0041] Figure 2 The figure is a structural diagram of the secure storage system for encrypted data of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with 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 intended to limit the present invention.
[0043] 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.
[0044] The present invention provides Figure 1 The secure storage method for encrypted data shown is mainly implemented by performing the following steps:
[0045] S1. The division unit in the user module performs division processing on the encrypted data to obtain different storage data, and the storage unit in the user module stores any one storage data among all the storage data;
[0046] S2, the selection unit in the user module selects a first number of remote storage modules whose intervals with the user module exceed a preset interval threshold from all remote storage modules, and the selection unit respectively calculates the sum of the safety value of the user module and the safety value of the first number of remote storage modules to obtain a first number of total safety values, and continues to select a second number of remote storage modules corresponding to a total safety value greater than a preset total safety value threshold from the first number of remote storage modules;
[0047] S3, the selection unit determines whether the second number is greater than a preset second number threshold value, if not, the interval threshold value is lowered, and the process jumps to S2, if yes, the selection unit obtains the first indexes of all remote storage units in the remote storage module of the second number, and continues to select a remote storage module of the third number including a remote storage unit whose first index meets the preset first index requirement from the remote storage module of the second number;
[0048] S4, the selection unit determines whether the third number is greater than a preset third number threshold value. If not, the interval threshold value is lowered and the process goes to S2. If yes, the selection unit obtains the second index of the remote storage unit that meets the first index requirement in the remote storage modules of the third number, sorts all the remote storage units according to the second index, and selects the remote storage module where the remote storage unit with the highest sorting is located as the final remote storage module;
[0049] S5. The communication unit of the user module sends a storage data to the final remote storage module through the network module for storage. The selection unit determines whether there is any unstored storage data. If yes, jump to S2. If not, end all steps.
[0050] Specifically, although the encrypted data is the result data after encrypting the plaintext data, once the encrypted data is obtained, there is still a risk of being cracked, resulting in the leakage of the plaintext data. In addition, the device storing the encrypted data is not absolutely safe. Crisis events such as natural disasters may occur in the location of the device, which may cause the loss of the stored encrypted data. In order to solve these technical problems, steps S1 to S5 are proposed.
[0051] In step S1, the division unit performs division processing on the encrypted data to obtain different storage data, specifically obtaining the first storage data to the fourth storage data. The detailed process of the division processing will be described below. The storage unit selects any storage data for storage. In step S2, the selection unit selects the remote storage modules of the first number from all the remote storage modules. The intervals between these remote storage modules and the user modules exceed the interval threshold. The interval can be a geographical distance. This is done to prevent the user module and the remote storage module from having a crisis event at the same time, resulting in the simultaneous disappearance of the stored storage data. The selection unit calculates the sum of the security value of the user module and the security value of the remote storage modules of the first number respectively to obtain the total security value of the first number, and continues to select the remote storage modules of the second number from the remote storage modules of the first number. The total security values corresponding to these remote storage modules are greater than the total security value threshold, so as to avoid the loss of storage data as much as possible. In step S3, the selection unit determines whether the second number is greater than the second number threshold. If not, the interval threshold is reduced and the step S2 is jumped to continue execution. For example, if the second number threshold is 2, if so, the selection unit obtains the security values of all remote storage units in the remote storage module of the second number. The first indicator is used to select the remote storage modules of the third number from the remote storage modules of the second number. These remote storage modules contain remote storage units whose first indicator meets the requirements of the first indicator. In step S4, the selection unit determines whether the third number is greater than the third number threshold. If not, the interval threshold is lowered and the execution is continued in step S2. For example, if the third number threshold is 1, if so, the selection unit obtains the second indicator of the remote storage unit that meets the requirements of the first indicator in the remote storage module of the third number, and sorts all the remote storage units according to the second indicator. The remote storage unit with a better second indicator is sorted higher. , select the remote storage module where the remote storage unit with the highest ranking is located as the final remote storage module. In step S5, the communication unit of the user module sends a storage data to the final remote storage module through the network module for storage, specifically stored in the above-mentioned remote storage unit with the highest ranking. This storage data is any one of the multiple storage data not stored in the user module. The selection unit determines whether there is any unstored storage data. If so, jump to step S2 to continue execution and select a new final remote storage module. If not, since all the storage data have been stored, all steps can be ended.
[0052] It should be noted that when the selection unit repeatedly executes from step S2 to select a new final remote storage module, the remote storage module that has been selected as the final remote storage module will be eliminated and will not be selected again as the new final remote storage module, that is, the storage data not stored in the storage unit will be stored in a different remote storage module.
[0053] Furthermore, the safety value of the user module represents the probability of a crisis event occurring at the location of the user module, and the safety value of the remote storage module represents the probability of a crisis event occurring at the location of the remote storage module; the first indicator of the remote storage unit includes the size of the available space of the remote storage unit, and the amount of data that can be written to the remote storage unit per unit time; the second indicator of the remote storage unit refers to the time from the time the remote storage unit starts writing the preset data to the time the remote storage unit completes writing the preset data.
[0054] Specifically, the security value of the user module represents the probability of a crisis event occurring at the location of the user module, and the security value of the remote storage module represents the probability of a crisis event occurring at the location of the remote storage module. The larger the probability, the smaller the corresponding security value, and the smaller the probability, the larger the corresponding security value. When the sum of the security value of the user module and the security value of the remote storage module is greater than the above-mentioned total security value threshold, it means that the combination of the user module and the remote storage module is relatively safe. For example, if the security value threshold is 6, if the security value of the user module is 2, then the security value of the remote storage module is at least 5, which can avoid crisis events occurring in the user module and the remote storage module at the same time, resulting in the simultaneous loss of stored data.
[0055] The first indicator of the remote storage unit includes the size of the available space of the remote storage unit and the amount of data that can be written by the remote storage unit per unit time. The first indicator can represent the performance of the remote storage unit. The remote storage unit with better performance is more suitable for storing data. The second indicator of the remote storage unit refers to the time from the time the remote storage unit starts writing preset data to the time the remote storage unit completes writing the preset data. The second indicator represents the response speed of the remote storage unit. The remote storage unit with faster response speed is more suitable for storing data.
[0056] Furthermore, the division unit performs division processing on the encrypted data to obtain different storage data, including the following steps:
[0057] S11, the dividing unit divides the encrypted data into first encrypted data and second encrypted data, and the dividing unit generates first feature data and second feature data;
[0058] S12, the dividing unit performs a preset operation on the first encrypted data, the first characteristic data, and the second characteristic data to obtain a first portion of stored data A, and at the same time, the dividing unit performs a preset operation on the second encrypted data and the second characteristic data to obtain a first portion of stored data B, and the dividing unit combines the first portion of stored data A and the first portion of stored data B to obtain the first stored data;
[0059] S13, the dividing unit performs a preset operation on the first encrypted data and the first characteristic data to obtain the second part of the stored data A, and the dividing unit performs a preset operation on the second encrypted data, the first characteristic data, and the second characteristic data to obtain the second part of the stored data B, and the dividing unit connects the second part of the stored data A and the second part of the stored data B to obtain the second stored data;
[0060] S14. The division unit connects the first characteristic data and the second characteristic data together as the third storage data, and performs a preset operation on the first encrypted data and the second characteristic data to obtain the fourth part of the storage data A, performs a preset operation on the second encrypted data and the first characteristic data to obtain the fourth part of the storage data B, and merges the fourth part of the storage data A and the fourth part of the storage data B to obtain the fourth storage data.
[0061] Specifically, in step S11, the division unit divides the encrypted data into first encrypted data and second encrypted data. Specifically, the encrypted data in binary form can be equally divided into first encrypted data and second encrypted data. The division unit also generates first feature data and second feature data. Specifically, a random number generation algorithm can be used. The first feature data and the second feature data are also binary data. In step S12, the division unit performs a preset operation on the first encrypted data, the first feature data, and the second feature data to obtain a first portion of stored data A. For ease of understanding the preset operation, for example, if the first encrypted data is "11001100", the first feature data is "00011100", and the second feature data is "00001111", then the first encrypted data and the first feature data perform a preset operation to obtain an intermediate result "11010000", and then perform a preset operation with the second feature data to obtain a final result "11011111", that is, a half-addition operation is performed on the corresponding two bits of data. The division unit performs a preset operation on the second encrypted data and the second feature data to obtain the first portion of stored data B , then merge the first part of the stored data A and the first part of the stored data B to obtain the first stored data. For example, if the first part of the stored data A is "11011111" and the first part of the stored data B is "11110000", then the first stored data is "1101111111110000". In step S13, the division unit performs a preset operation on the first encrypted data and the first feature data to obtain the second part of the stored data A, performs a preset operation on the second encrypted data, the first feature data, and the second feature data together to obtain the second part of the stored data B, and then connects the second part of the stored data A and the second part of the stored data B to obtain the second stored data. The connection operation is the same as the merging operation. In step S14, the division unit connects the first feature data and the second feature data together as the third stored data, and performs a preset operation on the first encrypted data and the second feature data to obtain the fourth part of the stored data A, performs a preset operation on the second encrypted data and the first feature data to obtain the fourth part of the stored data B, and merges the fourth part of the stored data A and the fourth part of the stored data B to obtain the fourth stored data. Through the above method, the encrypted data can be divided into the first storage data to the fourth storage data for separate storage, and even if the individual storage data is stolen, the encrypted data is not easily leaked.
[0062] Furthermore, when a crisis occurs at the location of the user module and the storage unit loses the stored data, the following processing is included:
[0063] Processing situation A: when the storage unit stores the first storage data, the storage unit performs a preset operation on the second part of the storage data A and the third part of the storage data B to obtain the first part of the storage data A, performs a preset operation on the second part of the storage data B and the third part of the storage data A to obtain the first part of the storage data B, and combines the first part of the storage data A and the first part of the storage data B to obtain the first storage data;
[0064] Processing situation B: When the storage unit stores the second storage data, the storage unit performs a preset operation on the first part of the storage data A and the third part of the storage data B to obtain the second part of the storage data A, performs a preset operation on the first part of the storage data B and the third part of the storage data A to obtain the second part of the storage data B, and merges the second part of the storage data A and the second part of the storage data B to obtain the second storage data.
[0065] Specifically, even if a crisis event occurs in the location of the user module, the user module can generate the original storage data based on other storage data. In this embodiment, the user module records the remote storage modules that store the storage data that it has not stored, so when it needs to generate the original storage data, it can obtain other storage data from these remote storage modules.
[0066] Here, different situations are introduced. If the storage unit stores the first storage data, the storage unit divides the second storage data into equal parts to obtain the second part storage data A and the second part storage data B, and divides the third storage data into equal parts to obtain the third part storage data A and the third part storage data B. Then, the storage unit performs a preset operation on the second part storage data A and the third part storage data B to obtain the first part storage data A, wherein the second part storage data A is the result of the preset operation on the first encryption data and the first feature data, the third part storage data B is the second feature data, and the result of the preset operation on the second part storage data A and the third part storage data B is exactly equal to the first part storage data A. The storage unit also performs a preset operation on the second part storage data B and the third part storage data A to obtain the first part storage data B, and merges the first part storage data A and the first part storage data B to obtain the first storage data. If the storage unit stores the second storage data, the first storage data is divided equally to obtain the first part storage data A and the first part storage data B, and the third storage data is divided equally to obtain the third part storage data A and the third part storage data B. The storage unit performs a preset operation on the first part storage data A and the third part storage data B to obtain the second part storage data A, performs a preset operation on the first part storage data B and the third part storage data A to obtain the second part storage data B, and merges the second part storage data A and the second part storage data B to obtain the second storage data.
[0067] Furthermore, in the case where a crisis event occurs at the location of the user module and the storage unit loses the stored data, the following processing is also included:
[0068] Processing situation C: when the storage unit stores the third storage data, the storage unit performs a preset operation on the first part of the storage data A and the fourth part of the storage data A to obtain the third part of the storage data A, performs a preset operation on the second part of the storage data B and the fourth part of the storage data B to obtain the third part of the storage data B, and combines the third part of the storage data A and the third part of the storage data B to obtain the third storage data;
[0069] Processing situation D: When the storage unit stores the fourth storage data, the storage unit performs a preset operation on the first part of the storage data A and the third part of the storage data A to obtain the fourth part of the storage data A, performs a preset operation on the second part of the storage data B and the third part of the storage data B to obtain the fourth part of the storage data B, and merges the fourth part of the storage data A and the fourth part of the storage data B to obtain the fourth storage data.
[0070] Specifically, continuing with the above content, if the storage unit stores the third storage data, the first storage data is equally divided to obtain the first part storage data A and the first part storage data B, the second storage data is equally divided to obtain the second part storage data A and the second part storage data B, and the fourth storage data is equally divided to obtain the fourth part storage data A and the fourth part storage data B, so that the storage unit performs a preset operation on the first part storage data A and the fourth part storage data A to obtain the third part storage data A, performs a preset operation on the second part storage data B and the fourth part storage data B to obtain the third part storage data B, and merges the third part storage data A and the third part storage data B to obtain the third storage data. If the storage unit stores the fourth storage data, the first storage data is divided equally to obtain the first part of the storage data A and the first part of the storage data B, the second storage data is divided equally to obtain the second part of the storage data A and the second part of the storage data B, and the third storage data is divided equally to obtain the third part of the storage data A and the third part of the storage data B. After that, the storage unit performs a preset operation on the first part of the storage data A and the third part of the storage data A to obtain the fourth part of the storage data A, performs a preset operation on the second part of the storage data B and the third part of the storage data B to obtain the fourth part of the storage data B, and merges the fourth part of the storage data A and the fourth part of the storage data B to obtain the fourth storage data. Through the above method, even if a crisis event occurs at the location of the user module, the stored storage data will not be lost.
[0071] Furthermore, the storage unit restores the encrypted data, including the following execution conditions:
[0072] Execution situation A: the storage unit performs a preset operation on the first part storage data B, the second part storage data A, and the second part storage data B to obtain first encrypted data, performs a preset operation on the first part storage data A, the first part storage data B, and the second part storage data A to obtain second encrypted data, and connects the first encrypted data and the second encrypted data to obtain encrypted data;
[0073] Execution condition B: the storage unit performs a preset operation on the first part storage data A, the third part storage data A, and the third part storage data B to obtain first encrypted data, performs a preset operation on the first part storage data B and the third part storage data B to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data;
[0074] Execution situation C: The storage unit performs a preset operation on the second part storage data A and the third part storage data A to obtain first encrypted data, performs a preset operation on the second part storage data B, the third part storage data A, and the third part storage data B together to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data.
[0075] Specifically, if a crisis event occurs at the location of the user module and any two of the three remote storage modules, the storage unit can also restore the encrypted data based on the remaining two storage data, wherein the three remote storage modules store the storage data not stored in the user module, which can avoid the loss of the encrypted data and ensure the security of the encrypted data. Here, different situations of generating encrypted data based on two storage data are introduced, provided that the corresponding partial storage data A and the corresponding partial storage data B need to be restored. The specific method has been introduced above and will not be repeated here.
[0076] Execution situation A means: the storage unit performs a preset operation on the first part of the storage data B, the second part of the storage data A, and the second part of the storage data B to obtain the first encrypted data, wherein the first part of the storage data B is the result of the preset operation on the second encrypted data and the second characteristic data, the second part of the storage data A is the result of the preset operation on the first encrypted data and the first characteristic data, and the second part of the storage data B is the result of the preset operation on the second encrypted data, the first characteristic data, and the second characteristic data, so that the result of the preset operation on the first part of the storage data B, the second part of the storage data A, and the second part of the storage data B is just the first encrypted data, and then the storage unit performs a preset operation on the first part of the storage data A, the first part of the storage data B, and the second part of the storage data A to obtain the second encrypted data, and connects the first encrypted data with the second encrypted data to obtain the encrypted data. Execution situation B means: the storage unit performs a preset operation on the first part of the storage data A, the third part of the storage data A, and the third part of the storage data B to obtain the first encrypted data, performs a preset operation on the first part of the storage data B and the third part of the storage data B to obtain the second encrypted data, and combines the first encrypted data with the second encrypted data to obtain the encrypted data. Execution condition C refers to: the storage unit performs a preset operation on the second part storage data A and the third part storage data A to obtain first encrypted data, performs a preset operation on the second part storage data B, the third part storage data A, and the third part storage data B together to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data.
[0077] Furthermore, the storage unit restores the encrypted data, and further includes the following execution conditions:
[0078] Execution situation D: the storage unit performs a preset operation on the first part of the stored data A, the first part of the stored data B, and the fourth part of the stored data B to obtain first encrypted data, performs a preset operation on the first part of the stored data A, the fourth part of the stored data A, and the fourth part of the stored data B to obtain second encrypted data, and connects the first encrypted data and the second encrypted data to obtain encrypted data;
[0079] Execution situation E: the storage unit performs a preset operation on the second part storage data B, the fourth part storage data A, and the fourth part storage data B to obtain first encrypted data, performs a preset operation on the second part storage data A, the second part storage data B, and the fourth part storage data A to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data;
[0080] Execution condition F: The storage unit performs a preset operation on the third part of the stored data B and the fourth part of the stored data A to obtain first encrypted data, performs a preset operation on the third part of the stored data A and the fourth part of the stored data B to obtain second encrypted data, and connects the first encrypted data and the second encrypted data to obtain encrypted data.
[0081] Specifically, following the above content, other situations of generating encrypted data based on two stored data are introduced. Execution situation D refers to: the storage unit performs a preset operation on the first part of the stored data A, the first part of the stored data B, and the fourth part of the stored data B together to obtain the first encrypted data, performs a preset operation on the first part of the stored data A, the fourth part of the stored data A, and the fourth part of the stored data B to obtain the second encrypted data, and connects the first encrypted data and the second encrypted data to obtain the encrypted data. Execution situation E refers to: the storage unit performs a preset operation on the second part of the stored data B, the fourth part of the stored data A, and the fourth part of the stored data B to obtain the first encrypted data, performs a preset operation on the second part of the stored data A, the second part of the stored data B, and the fourth part of the stored data A to obtain the second encrypted data, and combines the first encrypted data and the second encrypted data to obtain the encrypted data. Execution situation F refers to: the storage unit performs a preset operation on the third part of the stored data B and the fourth part of the stored data A to obtain the first encrypted data, performs a preset operation on the third part of the stored data A and the fourth part of the stored data B to obtain the second encrypted data, and connects the first encrypted data and the second encrypted data to obtain the encrypted data.
[0082] According to another aspect of the embodiment of the present invention, Figure 2 As shown, a secure storage system for encrypted data is also provided, including a user module, a network module, and a remote storage module, to implement the secure storage method for encrypted data described above, wherein the functions of each module are as follows:
[0083] The user module includes a division unit, a storage unit, a selection unit, and a communication unit; it is used to divide the encrypted data to obtain different storage data, store any storage data among all the storage data, and at the same time select the first number of remote storage modules whose interval with the user module exceeds the interval threshold from all the remote storage modules, respectively calculate the sum of the security value of the user module and the security value of the first number of remote storage modules to obtain the total security value of the first number, continue to select the second number of remote storage modules corresponding to the total security value greater than the total security value threshold from the remote storage modules of the first number, and judge whether the second number is greater than the second number threshold. If not, reduce the interval threshold and re-calculate. Select the remote storage module of the first number, if yes, the selection unit obtains the first index of all the remote storage units in the remote storage module of the second number, and continues to select the remote storage module of the third number including the remote storage unit whose first index meets the first index requirement from the remote storage module of the second number, and is also used to determine whether the third number is greater than the third number threshold, if no, lower the interval threshold, reselect the remote storage module of the first number, if yes, obtain the second index of the remote storage unit that meets the first index requirement in the remote storage module of the third number, sort all the remote storage units according to the second index, and select the remote storage module where the remote storage unit with the highest sorting is located as the final remote storage module;
[0084] A network module, used for transmitting data between the communication unit of the user module and the communication unit of the remote storage module;
[0085] The remote storage module includes a remote storage unit and a communication unit; it is used to store the storage data sent from the communication unit of the user module, and to send the storage data to the communication unit of the user module.
[0086] According to another aspect of an embodiment of the present invention, there is further provided a device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement any one of the above methods when executing the computer program.
[0087] According to another aspect of an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores program instructions, wherein when the program instructions are executed, a device where the storage medium is located is controlled to execute any one of the above methods.
[0088] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0089] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned 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-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0090] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0091] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0092] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for secure storage of encrypted data, characterized in that The steps include: S1. The division unit in the user module performs division processing on the encrypted data to obtain different storage data, and the storage unit in the user module stores any one storage data among all the storage data; S2, the selection unit in the user module selects the first number of remote storage modules whose intervals with the user module exceed a preset interval threshold from all remote storage modules, and the selection unit respectively calculates the sum of the safety value of the user module and the safety value of the first number of remote storage modules to obtain the first number of total safety values, and continues to select the second number of remote storage modules corresponding to the total safety values greater than the preset total safety value threshold from the first number of remote storage modules; S3, the selection unit determines whether the second number is greater than a preset second number threshold value, if not, lowers the interval threshold value, and jumps to S2, if yes, the selection unit obtains the first indexes of all remote storage units in the remote storage module of the second number, and continues to select the remote storage module of the third number that contains the remote storage unit whose first index meets the preset first index requirement from the remote storage module of the second number; S4, the selection unit determines whether the third number is greater than a preset third number threshold value, if not, lowers the interval threshold value, and jumps to S2, if yes, the selection unit obtains the second index of the remote storage unit that meets the first index requirement in the remote storage module of the third number, sorts all the remote storage units according to the second index, and selects the remote storage module where the remote storage unit with the highest sorting is located as the final remote storage module; S5, the communication unit of the user module sends a storage data to the final remote storage module through the network module for storage, and the selection unit determines whether there is any unstored storage data, if yes, jumps to S2, if no, ends all steps; The division unit performs division processing on the encrypted data to obtain different storage data, including the following steps: S11, the dividing unit divides the encrypted data into first encrypted data and second encrypted data, and the dividing unit generates first feature data and second feature data; S12, the division unit performs a preset operation on the first encrypted data, the first characteristic data, and the second characteristic data to obtain a first portion of stored data A, and at the same time, the division unit performs a preset operation on the second encrypted data and the second characteristic data to obtain a first portion of stored data B, and the division unit combines the first portion of stored data A and the first portion of stored data B to obtain the first stored data; S13, the division unit performs a preset operation on the first encrypted data and the first characteristic data to obtain the second part of the stored data A, and at the same time, the division unit performs a preset operation on the second encrypted data, the first characteristic data, and the second characteristic data to obtain the second part of the stored data B, and the division unit connects the second part of the stored data A and the second part of the stored data B to obtain the second stored data; S14. The division unit connects the first characteristic data and the second characteristic data together as the third storage data, and performs a preset operation on the first encrypted data and the second characteristic data to obtain the fourth part of the storage data A, performs a preset operation on the second encrypted data and the first characteristic data to obtain the fourth part of the storage data B, and merges the fourth part of the storage data A and the fourth part of the storage data B to obtain the fourth storage data.
2. The method according to claim 1, characterized in that The safety value of the user module represents the probability of a crisis event occurring at the location of the user module, and the safety value of the remote storage module represents the probability of a crisis event occurring at the location of the remote storage module; the first indicator of the remote storage unit includes the size of the available space of the remote storage unit and the amount of data that can be written to the remote storage unit per unit time; the second indicator of the remote storage unit refers to the time from the time the remote storage unit starts writing preset data to the time the remote storage unit completes writing the preset data.
3. The method according to claim 1, characterized in that: In the case where a crisis event occurs at the location of the user module and the storage unit loses the stored data, the following processing is included: Processing situation A: when the storage unit stores the first storage data, the storage unit performs a preset operation on the second part of the storage data A and the third part of the storage data B to obtain the first part of the storage data A, performs a preset operation on the second part of the storage data B and the third part of the storage data A to obtain the first part of the storage data B, and combines the first part of the storage data A and the first part of the storage data B to obtain the first storage data; Processing situation B: When the storage unit stores the second storage data, the storage unit performs a preset operation on the first part of the storage data A and the third part of the storage data B to obtain the second part of the storage data A, performs a preset operation on the first part of the storage data B and the third part of the storage data A to obtain the second part of the storage data B, and merges the second part of the storage data A and the second part of the storage data B to obtain the second storage data.
4. The method according to claim 3, characterized in that In the case where a crisis event occurs at the location of the user module and the storage unit loses the stored data, the following processing is also included: Processing situation C: when the storage unit stores the third storage data, the storage unit performs a preset operation on the first part of the storage data A and the fourth part of the storage data A to obtain the third part of the storage data A, performs a preset operation on the second part of the storage data B and the fourth part of the storage data B to obtain the third part of the storage data B, and combines the third part of the storage data A and the third part of the storage data B to obtain the third storage data; Processing situation D: When the storage unit stores the fourth storage data, the storage unit performs a preset operation on the first part of the storage data A and the third part of the storage data A to obtain the fourth part of the storage data A, performs a preset operation on the second part of the storage data B and the third part of the storage data B to obtain the fourth part of the storage data B, and merges the fourth part of the storage data A and the fourth part of the storage data B to obtain the fourth storage data.
5. The method according to claim 4, characterized in that The storage unit restores the encrypted data, including the following execution conditions: Execution situation A: the storage unit performs a preset operation on the first part storage data B, the second part storage data A, and the second part storage data B to obtain first encrypted data, performs a preset operation on the first part storage data A, the first part storage data B, and the second part storage data A to obtain second encrypted data, and connects the first encrypted data and the second encrypted data to obtain encrypted data; Execution condition B: the storage unit performs a preset operation on the first part storage data A, the third part storage data A, and the third part storage data B to obtain first encrypted data, performs a preset operation on the first part storage data B and the third part storage data B to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data; Execution condition C: The storage unit performs a preset operation on the second part storage data A and the third part storage data A to obtain first encrypted data, performs a preset operation on the second part storage data B, the third part storage data A, and the third part storage data B together to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data.
6. The method according to claim 5, characterized in that The storage unit restores the encrypted data, and also includes the following execution conditions: Execution condition D: the storage unit performs a preset operation on the first part of the stored data A, the first part of the stored data B, and the fourth part of the stored data B to obtain first encrypted data, performs a preset operation on the first part of the stored data A, the fourth part of the stored data A, and the fourth part of the stored data B to obtain second encrypted data, and connects the first encrypted data and the second encrypted data to obtain encrypted data; Execution condition E: the storage unit performs a preset operation on the second part storage data B, the fourth part storage data A, and the fourth part storage data B to obtain first encrypted data, performs a preset operation on the second part storage data A, the second part storage data B, and the fourth part storage data A to obtain second encrypted data, and combines the first encrypted data and the second encrypted data to obtain encrypted data; Execution condition F: The storage unit performs a preset operation on the third part of the stored data B and the fourth part of the stored data A to obtain the first encrypted data, performs a preset operation on the third part of the stored data A and the fourth part of the stored data B to obtain the second encrypted data, and connects the first encrypted data and the second encrypted data to obtain the encrypted data.
7. A secure storage system for encrypted data, used to implement the method according to any one of claims 1 to 6, characterized in that: Includes the following modules: The user module includes a division unit, a storage unit, a selection unit, and a communication unit, which are used to divide the encrypted data to obtain different storage data, store any storage data among all the storage data, and select the first number of remote storage modules whose interval with the user module exceeds the interval threshold from all the remote storage modules, respectively calculate the sum of the security value of the user module and the security value of the first number of remote storage modules to obtain the total security value of the first number, continue to select the second number of remote storage modules corresponding to the total security value greater than the total security value threshold from the remote storage modules of the first number, and judge whether the second number is greater than the second number threshold. If not, reduce the interval threshold and re-calculate. Select the remote storage module of the first number, if yes, the selection unit obtains the first index of all the remote storage units in the remote storage module of the second number, and continues to select the remote storage module of the third number including the remote storage unit whose first index meets the first index requirement from the remote storage module of the second number, and is also used to determine whether the third number is greater than the third number threshold, if no, lower the interval threshold, reselect the remote storage module of the first number, if yes, obtain the second index of the remote storage unit that meets the first index requirement in the remote storage module of the third number, sort all the remote storage units according to the second index, and select the remote storage module where the remote storage unit with the highest sorting is located as the final remote storage module; A network module, used for transmitting data between the communication unit of the user module and the communication unit of the remote storage module; The remote storage module includes a remote storage unit and a communication unit, and is used to store the storage data sent from the communication unit of the user module and to send the storage data to the communication unit of the user module.
8. A device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement the method according to any one of claims 1 to 6 when executing the computer program.
9. A storage medium, characterized in that: The storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
