Data encryption method, system, electronic device and storage medium
By generating scrambling verification data for data encryption and error correction, the problem of wasted storage resources in existing technologies is solved, data security isolation and efficient utilization are achieved, and costs are reduced.
Patent Information
- Application Number
- CN202210094958.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-01-26
AI Technical Summary
Existing data storage solutions suffer from wasted storage resources and inefficient space utilization when the number of users or the amount of data is small, especially with physical and logical isolation methods, which leads to increased costs.
Verification data with error correction function is generated based on information of the target object, and scrambled using a scrambler. The scrambled verification data is then used for data encryption and error correction, achieving isolated and mixed storage of data on the same physical storage disk.
By using scrambling verification data, secure data isolation and error correction are achieved, avoiding waste of storage resources, improving space utilization, and reducing operation and maintenance and energy costs.
Smart Images

Figure CN114444102B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and in particular, to an obstacle detection system, an obstacle avoidance method, an electronic device and a storage medium. BACKGROUND
[0002] In existing data storage or cloud disk services, in order to ensure data security and data isolation, there are usually two data storage methods for data of different users, one is a physical isolation method, and the other is a logical isolation method.
[0003] For the physical isolation method, data of different users can be stored on different physical storage disks, and different storage disks correspond to different addresses. Since the mapping from logic to physical address and garbage collection operations are all completed within a single physical storage disk, natural physical isolation is achieved. In this way, data isolation is achieved, that is, user A cannot read the data of other users. After the user no longer purchases the service, the data is destroyed by rewriting the storage disk or other methods to avoid subsequent users from reading the data of user A.
[0004] For the logical isolation method, one or more physical storage disks are divided into multiple logical disks. One logical disk can occupy part or all of one physical storage disk, or part or all of multiple physical storage disks. Different users use different logical disks, and the logical address range that the user can access is limited to achieve permission and data isolation, and to avoid interference problems such as crosstalk and boundary crossing between different users.
[0005] The problem of both methods is that whether one or more physical storage disks correspond to one user, or one or more logical disks correspond to one user, there will be problems of storage resource vacancy and waste in the case of a small number of users or a small amount of stored data. SUMMARY
[0006] Therefore, embodiments of the present application provide an obstacle detection system to at least partially solve the above problems.
[0007] According to a first aspect of embodiments of the present application, a data encryption method is provided, including: based on information of a target object, obtaining check data with error correction function corresponding to the target object; using a scrambler to scramble the check data with error correction function and obtain scrambled check data corresponding to the target object; using the scrambled check data corresponding to the target object to encrypt and correct the data of the target object.
[0008] According to a second aspect of the embodiments of the present application, a data encryption method is provided, comprising: receiving scrambling generation data corresponding to a target object, the scrambling generation data being determined based on information of the target object and check data with error correction function; and encoding to-be-sent data using the scrambling generation data to obtain encrypted data.
[0009] According to a third aspect of the embodiments of the present application, an electronic device is provided, comprising: a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is used to store at least one executable instruction, the executable instruction causes the processor to perform operations corresponding to the method according to the second aspect.
[0010] According to a fourth aspect of the embodiments of the present application, a computer storage medium is provided, and the computer storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to the second aspect.
[0011] According to the method provided by the embodiments of the present application, the problem of early resource waste in the prior art is solved, and the problems of inevitable storage fragmentation due to factors such as a safe water level, suboptimal space utilization, and cost increase are avoided. Without buying storage space, the entire disk does not need to be repeatedly overwritten multiple times to ensure that no leakage occurs. BRIEF DESCRIPTION OF DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings can also be obtained by those skilled in the art based on these drawings.
[0013] Figure 1 A schematic diagram of data transmission according to the embodiments of the present application;
[0014] Figure 2 A schematic diagram of a storage controller according to the embodiments of the present application;
[0015] Figure 3 A step flowchart of a data encryption method according to the first embodiment of the present application;
[0016] Figure 4 A flowchart of a sub-step of step S304 of the data encryption method according to the first embodiment of the present application;
[0017] Figure 5 A flowchart of a sub-step of step S306 of the data encryption method according to the first embodiment of the present application;
[0018] Figure 6 This is a schematic diagram of the steps of another data encryption method according to the first embodiment of the present application;
[0019] Figure 7 This is a flowchart of the steps of the data encryption method according to the second embodiment of the present application;
[0020] Figure 8 This is a schematic diagram of the data encryption process of an embodiment of the present application;
[0021] Figure 9 This is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application;
[0022] Figure 10 Schematic diagram of converting scrambled check data into scrambled generated data according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present application.
[0024] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0025] Example 1
[0026] In this embodiment, the method is described by applying it to scenarios such as cloud disks or data storage centers, but it should be understood that the method is not limited thereto and can also be applied to other scenarios where data encryption and decryption are required.
[0027] Take the cloud disk application scenario as an example. Figure 1 As shown in the figure, the cloud disk scenario includes the terminal device of the target object (such as the user) and the cloud disk server. The terminal device can be a personal computer (such as a PC) or a mobile terminal (such as a mobile phone, PAD, wearable device, etc.). The cloud disk server includes a network interface, a storage controller, and a physical storage disk. Among them, the network interface is used to connect to the terminal device to achieve data exchange. The storage controller is connected between the network interface and the physical storage disk, and receives data sent by the network interface for processing. In addition, it can also read and write to the physical storage disk.
[0028] like Figure 2As shown, a new storage controller is configured in the embodiment. The storage controller includes a controller front end 201, an ECC encoder 204, an ECC decoder 203 and a scrambler 202.
[0029] The controller front end 201 is configured to send information of a target object and check data with error correction function to the scrambler 202. In addition, the controller front end 201 can also be configured to receive and send external data.
[0030] The scrambler 202 is configured to scramble the check data with error correction function according to the information of the target object, and output the scrambled check data to the ECC encoder 204 and the ECC decoder 203.
[0031] The ECC encoder 204 is configured to use the scrambled check data to encrypt and correct the data of the target object sent by the controller to obtain processed data.
[0032] The ECC decoder 203 is configured to use the scrambled check data to decode the processed data, and send the decoded data to the controller front end 201.
[0033] Optionally, the storage controller further includes a host interface 206, which is configured to communicate and interact with external data. The controller front end 201 is connected with the host interface 206 to receive and send data through the host interface 206.
[0034] Optionally, the storage controller further includes a media interface 205, which is connected with the ECC encoder 204 respectively, and is configured to receive the processed data output by the ECC encoder 204, and store the processed data to a physical storage disk.
[0035] The implementation process of the method of the embodiment will be described below in conjunction with the accompanying drawings:
[0036] Referring to Figure 3 The method includes the following steps:
[0037] Step S302: Based on the information of the target object, the check data with error correction function corresponding to the target object is obtained.
[0038] The information of the target object can include the identification (such as id or name, etc.) of the user using the cloud disk, but is not limited thereto. The check data with error correction function corresponding to the target object can be an ECC check matrix, which itself has the ability to correct data.
[0039] In an implementation, the obtaining of the check data with error correction function corresponding to the target object can be implemented by: selecting, from the plurality of candidate check data, the check data with error correction function as the check data with error correction function that meets the selection condition. The selection condition can be that the candidate check data has the strong protection ability and the strong error correction ability, but is not limited thereto.
[0040] In an example, the candidate check data can be alternative ECC check matrices, and the ECC check matrix (also referred to as ECC code) with the strong protection ability and the strong error correction ability is searched, selected and optimized from the ECC check matrices.
[0041] Step S304: scrambling the check data with error correction function using a scrambler, and obtaining scrambled check data corresponding to the target object.
[0042] The scrambler can add different disturbances to the check data with error correction function, thereby forming different scrambled check data. In this way, each target object can have a corresponding scrambled check data for subsequent encryption of the data of the target object. Moreover, because the scrambled check data itself has the error correction ability, the data error correction can be performed simultaneously in the encryption process, thereby achieving the error correction and encryption once.
[0043] In an implementation, as shown in FIG. 4, step S304 can be implemented by the following sub-steps. Figure 4
[0044] Sub-step S3041: determining a corresponding scrambling strategy based on the information of the target object.
[0045] For example, the scrambling strategy is generated by using a scrambling strategy generator based on the ID of the target object. The scrambling strategy can be any appropriate strategy. The scrambling strategy can be an interference matrix or other scrambling strategy. Because the ID of each target object is a unique identifier, the scrambling strategy generated for each target object can be different.
[0046] Sub-step S3042: scrambling the check data with error correction function according to the scrambling strategy using the scrambler, and obtaining scrambled check data corresponding to the target object.
[0047] For the selected check data with error correction function, in order to ensure that the scrambled check data of different target objects are different, thereby achieving data isolation and improving security, the scrambler scrambles the check data with error correction function using the scrambling strategy of different target objects, thereby generating scrambled check data exclusive to the target object.
[0048] In this way, the scrambler generates multiple variants, i.e., scrambled check data, based on the check data with error correction function in combination with the information (such as ID) of the target object. In this way, the encryption of the target object inherits the encryption and error correction capability of the original check data with error correction function, and each scrambled check data is independent of each other, realizing uniqueness and security.
[0049] Step S306: encrypt and correct the data of the target object using the scrambled check data corresponding to the target object.
[0050] Since the scrambled check data of different target objects are different, and each scrambled check data has error correction capability, using the scrambled check data corresponding to the target object to encode the data of the target object can realize encryption of the data, and at the same time, error correction of the data can be realized in the encoding process.
[0051] In one possible way, as shown in Figure 5 Step S306 can be implemented through the following sub-steps:
[0052] Sub-step S3061: in the storage process of the data of the target object, the scrambled check data is used by the ECC encoder to encrypt and correct the data of the target object, and the processed data is obtained.
[0053] For example, the scrambler generates the scrambled check data corresponding to the target object, and sends the scrambled check data to the ECC encoder and the ECC decoder. The ECC encoder receives the data of the target object from the front end of the controller, and obtains the scrambled check data from the scrambler, and uses the scrambled check data to encode the data of the target object to obtain the processed data. The encoding simultaneously realizes encryption and error correction of the data of the target object, so that the encryption module and the decryption module can be omitted.
[0054] Sub-step S3062: store the processed data of different target objects in the same physical storage disk.
[0055] The processed data output by the ECC encoder can be output to the physical storage disk through the medium interface. Since the data of different target objects are encoded using different scrambled check data, only specific scrambled check data can be used for decoding. For example, the target object A cannot use its own scrambled check data to decode the processed data of the target object B, and even in the process of attempting to decode, frequent errors will occur, system alarms will be generated and the authority will be shut down.
[0056] In this way, the processed data of different target objects can be stored in the same physical storage disk, and the physical storage disk does not need to be divided into multiple logical partitions, and the processed data of multiple target objects can be mixed and placed at different addresses in the same space. Even if a target object reads the processed data of another target object, it cannot successfully decode it. Based on this method, thin-privisioning can be realized.
[0057] Optionally, in the embodiment, as shown in Figure 6 The method can further include the following steps:
[0058] Step S308: Obtain the processed data of the target object, and use the scrambling check data to decrypt the processed data by the ECC decoder.
[0059] When the target object needs to read data, the processed data is read from the physical storage disk, and the scrambling check data is used to decode the processed data by the ECC decoder, so as to realize decryption, and the decrypted data is sent to the target object.
[0060] Step S310: Perform matrix conversion processing on the scrambling check data to obtain converted scrambling generation data.
[0061] In addition to realizing encryption based on scrambling check data in the physical storage disk to isolate data of different target objects, before this, in order to increase the way of encrypting data to be sent in the environment of the target object's device. Generate scrambling generation data for each target object. Use the converter to convert the scrambling check data to obtain the scrambling generation data.
[0062] Step S312: Send the scrambling generation data to the terminal device corresponding to the target object, so that the terminal device uses the scrambling generation data to encrypt the data to be sent.
[0063] By sending the scrambling generation data to the terminal device of the target object, the terminal device can use the scrambling generation data to encrypt the data (such as data, instructions, metadata, keys) to be sent, and then send it. A schematic diagram of converting scrambling check data into scrambling generation data is shown in Figure 10 .
[0064] This scheme fully solves the problem of early resource waste in the existing scheme, and avoids the inevitable storage fragmentation due to factors such as security water level, resulting in unsatisfactory space utilization, and further leading to cost increase and other problems. Without buying storage space, it is not necessary to repeatedly overwrite the entire disk multiple times to ensure that it will not be leaked.
[0065] Embodiment Two
[0066] Referring to Figure 7 , a step flow diagram of the method of Embodiment Two of the present application is shown.
[0067] The method comprises:
[0068] Step S702: receiving scrambling generation data corresponding to a target object, the scrambling generation data being determined based on information of the target object and check data with error correction function.
[0069] The scrambling generation data can be generated in the manner of the foregoing embodiments, and thus will not be described again.
[0070] Step S704: encoding the data to be sent using the scrambling generation data to obtain encrypted data.
[0071] The scrambling generation data can be used to encode the data to be sent to achieve encryption of the data. Since the scrambling generation data is generated based on the information of the target object, it has uniqueness, and since it inherits the error correction capability of the check data with error correction function, it can ensure that subsequent output transmission can be error corrected.
[0072] In this way Figure 8 A terminal device of a target object encodes data based on received scrambling generation data to achieve encryption, and then transmits the data to cloud storage through a suitable network.
[0073] Terminal devices of different target objects will integrate data into cloud storage in different scenarios and using different network environments. The scrambling generation data with error correction and encryption capabilities also achieves error removal on the transmission path. For example, when a target object needs to send a key to cloud storage, if a common encryption method is used, the key plaintext will always need to be transmitted through a secure method. However, using scrambling generation data to encode data can achieve keyless encoding and transmission. The encoding based on scrambling generation data is simple and direct, and only needs to perform matrix multiplication on the data and the generated scrambling data to generate a code word. The implementation operation is basic logical XOR superposition.
[0074] The cloud storage receives the encoded data sent by the terminal device, and the cloud storage uses the scrambling check data of each target object to complete decoding, which removes transmission errors on the one hand and ensures information accuracy on the other hand. After determining that there is no error, the code word with the removed error is written into the storage medium, thereby eliminating the encoding link on the cloud storage side.
[0075] The ECC code realizes strong error correction and strong encryption without a key, and respectively encrypts the data of multiple target objects through scrambling, thereby solving the data isolation of multiple target objects, supporting capacity overselling, and reducing operation and maintenance, turnover, energy, and other costs; because the ECC encoder and the ECC decoder can simultaneously realize encryption and error correction, the encryption and decryption modules are omitted. The encryption scheme can resist quantum computing cracking ability and support terminal device-based encryption of scrambled generated data, thereby improving the transmission efficiency of encrypted data.
[0076] Embodiment three
[0077] Reference Figure 9 The structure of an electronic device according to Embodiment Three of the present application is shown, and the specific implementation of the electronic device is not limited by the specific implementation of the present application.
[0078] As shown in Figure 9 The electronic device can include a processor 902, a communications interface 904, a memory 906, and a communications bus 908.
[0079] Among them:
[0080] The processor 902, the communications interface 904, and the memory 906 complete mutual communication through the communications bus 908.
[0081] The communications interface 904 is configured to communicate with other electronic devices or servers.
[0082] The processor 902 is configured to execute the program 910, and can specifically execute the related steps in the above method embodiments.
[0083] Specifically, the program 410 can include program code including computer operation instructions.
[0084] The processor 902 can be a CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement one or more embodiments of the present application. One or more processors included in the smart device can be the same type of processor, such as one or more CPUs; or can be different types of processors, such as one or more CPUs and one or more ASICs.
[0085] The memory 906 is configured to store the program 910. The memory 906 can include a high-speed RAM memory, and can also include a non-volatile memory such as at least one disk memory.
[0086] The program 910 can specifically be used to cause the processor 902 to perform operations corresponding to the foregoing method.
[0087] Specific implementation of each step in the program 910 can refer to the corresponding description in the foregoing method embodiments, and will not be described here. It can be clearly understood by those skilled in the art that, for the convenience and brevity of description, the specific working process of the device and the module described above can refer to the corresponding process description in the foregoing method embodiments, and will not be described here.
[0088] The embodiment of the present application further provides a computer program product, comprising computer instructions, which instruct a computing device to perform operations corresponding to any of the methods in the foregoing method embodiments.
[0089] The embodiment of the present application further provides a computer storage medium, which stores a computer program, and the program is executed by a processor to implement the method described above.
[0090] It should be noted that, according to the needs of implementation, each component / step described in the embodiment of the present application can be split into more components / steps, or two or more components / steps or part of the operation of the components / steps can be combined into a new component / step, to achieve the purpose of the embodiment of the present application.
[0091] The method according to the embodiment of the present application described above can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk or a magneto-optical disk, or downloaded through a network and originally stored in a remote recording medium or a non-transitory machine readable medium and then stored in a local recording medium, so that the method described herein can be processed by such software using a general computer, a special processor or programmable or special hardware such as an ASIC or an FPGA. It can be understood that the computer, the processor, the microprocessor controller or the programmable hardware includes a storage component (for example, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor or the hardware, the data encryption method described herein is implemented. In addition, when a general computer accesses the code for implementing the method shown herein, the execution of the code will convert the general computer into a special computer for executing the method shown herein.
[0092] Those skilled in the art can understand that the units and method steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software manner depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered as beyond the scope of the embodiments of the present application.
[0093] The above embodiments are only used to illustrate but not to limit the embodiments of the present application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application, and all equivalent technical solutions belong to the scope of the embodiments of the present application. The patent protection scope of the embodiments of the present application should be defined by the claims.
Claims
1. A data encryption method, comprising: obtaining, based on information of a target object, check data with error correction function corresponding to the target object; scrambling, using a scrambler, the check data with error correction function to obtain scrambled check data corresponding to the target object; encrypting and error correcting, using the scrambled check data corresponding to the target object, data of the target object; the encrypting and error correcting, using the scrambled check data corresponding to the target object, data of the target object, comprises: in a storage process of the data of the target object, encrypting and error correcting, using an ECC encoder, the data of the target object by the scrambled check data to obtain processed data; storing the processed data of different target objects.
2. The method of claim 1, wherein, the scrambling, using a scrambler, the check data with error correction function to obtain scrambled check data corresponding to the target object, comprises: determining a corresponding scrambling strategy based on information of a target object; scrambling, using the scrambler, the check data with error correction function according to the scrambling strategy to obtain scrambled check data corresponding to the target object.
3. The method of claim 1, wherein, The method further comprises: obtaining the processed data of the target object, and decrypting, using an ECC decoder, the processed data by the scrambled check data.
4. The method of any one of claims 1-3, wherein, The method further comprises: performing matrix conversion processing on the scrambled check data to obtain converted scrambled generation data; sending the scrambled generation data to a terminal device corresponding to the target object, so that the terminal device encrypts to-be-sent data using the scrambled generation data.
5. A storage controller, comprising a controller front end, an ECC encoder, an ECC decoder and a scrambler; the controller front end is configured to send information of a target object and check data with error correction function to the scrambler; the scrambler is configured to scramble check data with error correction function according to the information of the target object, and output scrambled check data obtained by scrambling to the ECC encoder and the ECC decoder; the ECC encoder is configured to encrypt and error correct, using the scrambled check data, data of the target object sent by the controller to obtain processed data; the ECC decoder is configured to decode the processed data using the scrambled check data, and send the decoded data to the controller front end; the ECC encoder is specifically configured to: in a storage process of the data of the target object, encrypt and error correct, using the ECC encoder, the data of the target object by the scrambled check data to obtain processed data; store the processed data of different target objects.
6. The storage controller of claim 5, wherein, The storage controller further comprises a medium interface, which is connected with the ECC encoder respectively and is configured to receive the processed data output by the ECC encoder and store the processed data to a physical storage disk.
7. An electronic device comprising: a processor, a memory, a communication interface, and a communication bus, which enable communication among the processor, the memory, and the communication interface through the communication bus; the memory is configured to store at least one executable instruction, which causes the processor to perform operations corresponding to the method of any one of claims 1-4.
8. A computer storage medium having stored thereon a computer program, which, when executed by a processor, implements the method of any one of claims 1-4.
9. A computer program product, comprising computer instructions, which instruct a computing device to perform operations corresponding to the method of any one of claims 1-4.
Citation Information
Patent Citations
Metadata aware copyback for memory devices
CN113496744A
System and method to scramble data based on a scramble key
US20130315397A1