A data partition processing method and device, electronic equipment and storage medium
By using fuse technology to create temporary mount directories in storage devices, and intercepting and encrypting/decrypting data operations, the problem of low data security in existing technologies is solved, achieving higher data security and lower development costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-03-27
AI Technical Summary
Existing storage device partitioning schemes suffer from low data security.
By using fuse technology to create temporary mount directories, and by mounting multiple partitions and target file systems, the system intercepts operation data for encryption and decryption processing, thereby improving data security.
It improves data security, solves the limitation on the number of partitions, reduces development and maintenance costs, and enhances the user experience.
Smart Images

Figure CN116126967B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information security technology, and in particular to a data partitioning processing method, apparatus, electronic device and storage medium. Background Technology
[0002] During the computer boot process, the BIOS needs to locate the operating system on the hard drive, load it, and complete the boot process. To ensure the computer boots properly, the hard drive needs to be partitioned, which led to the early MBR partitioning scheme and the current GPT partitioning scheme.
[0003] The two partitioning schemes mentioned above are widely used, but if there are vulnerabilities, they can lead to data security problems. Therefore, the existing storage device partitioning schemes have the technical problem that data security cannot be guaranteed and the data security is relatively low. Summary of the Invention
[0004] In view of this, the present disclosure provides a data partitioning processing method, apparatus, electronic device and storage medium, which can solve the technical problems of low data security and unreliable data security in the prior art storage device partitioning scheme.
[0005] In a first aspect, embodiments of this disclosure provide a data partitioning processing method, employing the following technical solution:
[0006] According to the requirements, partition the target storage device and create a file system to obtain multiple partitions and the target file system;
[0007] Based on the multiple partitions and the target file system, and using a preset device, a temporary mount directory is created;
[0008] Based on fuse, the temporary mount directory is attached to enable the use of the target storage device.
[0009] Secondly, this disclosure also provides a data partitioning processing apparatus, which adopts the following technical solution:
[0010] The partitioning module is used to partition the target storage device and create a file system according to requirements, resulting in multiple partitions and the target file system;
[0011] The mount directory generation module is used to create a temporary mount directory based on the multiple partitions and the target file system, and on a preset device.
[0012] The mount execution module is used to mount the temporary mount directory based on fuse, and to use the target storage device.
[0013] In a third aspect, the embodiments of the present disclosure further provide an electronic device, which adopts the following technical scheme:
[0014] The electronic device comprises:
[0015] at least one processor; and
[0016] a memory connected in communication with the at least one processor; wherein
[0017] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data partition processing method described in any one of the above.
[0018] In a fourth aspect, the embodiments of the present disclosure further provide a computer-readable storage medium storing computer instructions for causing a computer to perform the data partition processing method described in any one of the above.
[0019] The data partition processing method provided by the embodiments of the present disclosure partitions the target storage device according to the requirements, and makes a file system to obtain a plurality of partitions and file systems, further creates a temporary mounting directory based on a preset device, and mounts the temporary mounting directory based on the fuse technology to use the target storage device. The embodiments of the present disclosure define the partition structure based on the requirements, solve the problem of the limitation of the number of partitions, and mount the temporary mounting directory through the fuse technology to intercept the operation data, guarantee the safety of the data, and achieve the technical effect of improving the data security compared with the prior art.
[0020] The above description is only a summary of the technical scheme of the present disclosure, in order to more clearly understand the technical means of the present disclosure, the contents of the specification can be implemented, and in order to make the above and other purposes, characteristics and advantages of the present disclosure more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical scheme of the embodiments of the present disclosure, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those skilled in the art can obtain other drawings according to these drawings without creating any creative labor.
[0022] Figure 1 A flowchart of a data partition processing method provided by the embodiments of the present disclosure is shown in the figure;
[0023] Figure 2A flowchart of a process of acquiring a partition scheme in a data partition processing method provided by an embodiment of the present disclosure is shown in FIG. 1.
[0024] Figure 3 A principle block diagram of a data partition processing apparatus provided by an embodiment of the present disclosure is shown in FIG. 2.
[0025] Figure 4 A principle block diagram of an electronic device provided by an embodiment of the present disclosure is shown in FIG. 3.
[0026] Reference signs: 11, partition module; 12, mounting directory generation module; 13, mounting execution module. DETAILED DESCRIPTION
[0027] The embodiments of the present disclosure will be described in detail below with reference to the drawings.
[0028] It should be apparent that the following describes embodiments of this disclosure by way of specific examples, and that one skilled in the art can readily derive further advantages and effects from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, rather than all the embodiments. This disclosure can also be implemented or applied by other different specific embodiments, and various modifications or changes can be made to the details in this specification without departing from the spirit of this disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in this disclosure, all other embodiments obtained by one of ordinary skill in the art without creative labor fall within the scope of protection of this disclosure.
[0029] It should be noted that the various aspects of the embodiments described below are within the scope of the appended claims. It should be apparent that the aspects described herein can be embodied in a wide variety of forms and that any specific structure and / or function described herein is merely illustrative. Based on the teachings herein one skilled in the art should appreciate that an aspect described herein can be implemented independently of any other aspects and that two or more of these aspects can be combined in various ways. For example, an apparatus can be implemented or a method can be practiced using any number of the aspects set forth herein. In addition, such an apparatus can be implemented or such a method can be practiced using other structure and / or functionality in addition to or other than one or more of the aspects set forth herein.
[0030] It should also be noted that the drawings included in the following embodiments are only to schematically illustrate the basic concept of the present disclosure, and only the components related to the present disclosure are shown in the drawings, not the number, shape and size of the components when actually implemented. The actual implementation of each component can be a random change in shape, number and ratio, and the layout of the components can also be more complex.
[0031] In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, one skilled in the art will understand that the described aspects can be practiced without these specific details.
[0032] Embodiment one
[0033] The embodiment of the present application provides a data partition processing method, which comprises the following steps:
[0034] S100: partitioning a target storage device and making a file system according to requirements, to obtain a plurality of partitions and a target file system;
[0035] S200: creating a temporary mounting directory based on a preset device according to the plurality of partitions and the target file system;
[0036] S300: mounting the temporary mounting directory based on fuse, and using the target storage device.
[0037] Based on the technical problems in the background art, how to redesign the partition format to solve the problem of the number of partitions, support multi-partition logic, and how to make the system correctly identify the custom partition are key points. The premise of identifying the partition is that it is a file system. The fuse (Filesystem in Userspace, user space file system) technology can provide an API for users to implement a file system, so that the file system does not have to be implemented in the operating system kernel, thereby intercepting the operation of the file system in the kernel and ensuring data security. Fuse provides a complete set of user-mode file system operation interfaces. Through fuse as an intermediate layer, the operating system and the file system, and the data docking of the custom partition space can be realized, and the purpose of displaying the partition is achieved. In addition, as an intermediate layer for data transmission, fuse can perform secondary processing on data according to needs, for example, encryption and decryption of data, which can improve data security.
[0038] In the embodiment of the present application, in step S100, the target storage device is partitioned according to the requirements of the subject executing the method provided by the embodiment of the present application, a plurality of partitions are obtained, and a file system is made according to the data stored in the plurality of partitions, to obtain a target file system.
[0039] The target storage device can be any form of storage device in the prior art, for example, it can be an optical storage medium, a magneto-optical storage medium, a magnetic storage medium, a medium with a built-in rewritable non-volatile memory, and a medium with a built-in ROM, etc., and more specifically, a U disk, a mobile hard disk, a memory card, etc. The specific form of the above-mentioned target storage device is only exemplary.
[0040] Step S100 comprises:
[0041] S110: Obtain a partitioning scheme for the target storage device according to requirements;
[0042] S120: According to the partitioning scheme, the data in the target storage device is allocated and managed, and a file system is created to obtain multiple partitions and a target file system.
[0043] Specifically, based on the requirements, the target storage device is partitioned to obtain a partitioning scheme. Examples of this partitioning scheme include the number of partitions, the size of each partition to be partitioned, and the encryption algorithm for the data in each partition to be partitioned.
[0044] According to the partitioning scheme and the above requirements, the data in the target storage device is allocated to each partition to be partitioned, and then the file system is created to obtain multiple partitions and the target file system.
[0045] For example, the target file system includes data, data structures, and data index information within multiple partitions.
[0046] like Figure 2 As shown, step S110 in the method provided in this application embodiment includes:
[0047] YY221383P
[0048] S111: Get the required number of partitions;
[0049] S112: Obtain the partition size information of each partition to be divided based on the size of the target storage device and the number of partitions;
[0050] S113: Encryption algorithm for obtaining data within each partition to be divided;
[0051] S114: Obtain the partitioning scheme based on the number of partitions, the partition size information of each partition to be partitioned, and the encryption algorithm of the data in each partition to be partitioned.
[0052] According to the needs of the subject implementing the method provided in the embodiments of this application, the number of partitions is obtained. The number of partitions can be set arbitrarily, for example, it can be 3, 10, 32, etc.
[0053] Based on the memory size of the target storage device and the number of partitions mentioned above, the memory size of each partition to be divided is obtained according to the requirements, thus obtaining multiple partition size information.
[0054] Furthermore, to ensure the security of the data within each partition to be divided, multiple encryption algorithms for the data within each partition to be divided are obtained.
[0055] Exemplarily, encryption algorithms with different complexity and security level can be set according to the security requirement of the data in each to-be-partitioned partition. For the partitions without security requirement, no encryption algorithm can be set for encryption protection.
[0056] Optionally, the same encryption algorithm can be set for different to-be-partitioned partitions, for example, for multiple to-be-partitioned partitions with the same data security requirement.
[0057] According to the number of partitions, the partition size information of each to-be-partitioned partition, and the encryption algorithm of the data in each to-be-partitioned partition, the above-mentioned partition scheme is generated as the basis for partitioning the memory of the target storage device.
[0058] The step S120 in the method provided by the embodiment of the present application comprises:
[0059] S121: connecting the target storage device to the computer device;
[0060] S122: using a partition tool to perform allocation management and file system production on the data in the target storage device according to the partition scheme, to obtain the multiple partitions and the target file system.
[0061] Specifically, the target storage device is connected to the computer device, the partition tool is used to partition the storage space in the target storage device and perform allocation management and file system production on the data according to the above-mentioned partition scheme, to obtain the multiple partitions and the target file system, and each partition stores corresponding data according to the corresponding encryption algorithm.
[0062] The above-mentioned partition tool can be based on any partition tool in the prior art.
[0063] In the step S200 in the method provided by the embodiment of the present application, further, a temporary mounting directory is created based on a preset device according to the multiple partitions and the above-mentioned target file system, the temporary mounting directory comprises multiple mounting points, and the multiple mounting points and the multiple partitions correspond one by one.
[0064] The data in the multiple partitions can be called for reading and writing through the multiple mounting points.
[0065] The preset device is used to simulate the data in the multiple partitions as block devices, so as to facilitate calling, and can be any specific device in the prior art.
[0066] Preferably, the above-mentioned preset device is a loop device.
[0067] In the step S300 in the embodiment of the present application, further, the temporary mounting directory is mounted based on the fuse technology, and the target storage device is used, for example, the data in the multiple partitions is scheduled and used.
[0068] Since the temporary mounting directory is hooked based on the fuse technology, when data in the multiple partitions is called by calling the mounting point, the fuse technology can intercept and thus avoid data leakage, ensuring the security of the data.
[0069] YY221383P
[0070] The step S300 in the method provided in the embodiments of the present application comprises:
[0071] S310: When a read operation or a write operation is performed on the target partition by operating the corresponding mounting point in the temporary mounting directory, the read operation or the write operation is intercepted based on the fuse, and the data targeted by the read operation or the write operation is processed, and the processed data is returned to the caller or is redirected to the target partition, wherein the target partition belongs to the multiple partitions.
[0072] The target partition is a partition that currently needs to be called for data and belongs to the multiple partitions. Based on the fuse technology, when a data caller performs a calling operation such as a read operation or a write operation on the target partition by operating the corresponding mounting point in the temporary mounting directory, the read operation or the write operation can be intercepted, and the data targeted by the read operation or the write operation is processed, and the processed data is returned to the caller or the data is redirected to the target partition. In this way, the security of the data can be improved.
[0073] In one possible embodiment, the step S310 comprises:
[0074] S311: When the read operation is performed, the sector data in the target partition after decryption is returned based on the fuse according to the encryption algorithm in the target partition.
[0075] S312: When the write operation is performed, the encrypted data is written into the target partition based on the fuse according to the encryption algorithm in the target partition.
[0076] In the embodiments of the present application, when a read operation is performed on the target partition, the read operation is intercepted based on the fuse, the data targeted by the read operation is decrypted based on the encryption algorithm in the target partition, and the decrypted data is returned to the caller that performs the read operation.
[0077] When a write operation is performed on the target partition, the write operation is intercepted based on the fuse, the data targeted by the write operation is encrypted based on the encryption algorithm in the target partition, and the encrypted data is written into the target partition. The data called based on the fuse is intercepted, and the security of the data in the partition can be ensured.
[0078] The data partition processing method provided in the embodiments of the present application achieves at least the following technical effects through the specific embodiments described above.
[0079] The embodiments of the present application define a partition structure based on requirements, solve the limitation of the number of partitions, create a temporary mounting directory through a loop device, provide a basis for operating data as an intermediate layer by fuse, and mount the temporary directory through fuse technology. When the mounting point is operated, the operation data can be intercepted, encrypted or decrypted, returned to the calling party or redirected to the partition, ensuring the security of the data. Compared with the prior art, the technical effect of improving data security is achieved.
[0080] In addition, compared with the prior art of placing the file system in the operating system kernel, since the fuse underlying driver is provided by the linux kernel, the fuse internally implements the scheduling of the driver layer and the application. In the embodiments of the present application, only the fuse method needs to be used in the application layer to intercept the operation data of the mounting directory, without the need for development of underlying implementation logic and configuration of the driver, so the development and maintenance cost is low and the stability is high.
[0081] Compared with the customized U disk file system implementation scheme, it has the problem of being relatively cumbersome, needs to implement the logic of the file system by itself, customizes the file operation interface, and may need the participation of the U disk manufacturer to provide the underlying hardware operation interface to realize. In the embodiments of the present application, only the self-defined partition format in the storage device needs to be formatted into a file system that can be recognized by the operating system, such as an ntfs, fat, or the like, so that normal mounting and implementation can be achieved, and the cost is low.
[0082] In the embodiments of the present application, after the partition mounting is implemented, the operation and function interface can be further customized, which is convenient for control and use and improves the use experience.
[0083] YY221383P
[0084] Embodiment Two
[0085] Based on the same inventive concept as the data partition processing method provided in the above embodiments, the embodiments of the present application also provide a data partition processing device. The device comprises:
[0086] The partition module 11 is configured to partition and make a file system for a target storage device according to requirements, to obtain a plurality of partitions and a target file system;
[0087] The mounting directory generation module 12 is configured to create a temporary mounting directory based on a preset device according to the plurality of partitions and the target file system;
[0088] The mounting execution module 13 is configured to mount the temporary mounting directory based on fuse, and use the target storage device.
[0089] Further, the partition module 11 is specifically configured to:
[0090] obtain a partition scheme for partitioning the target storage device according to a requirement;
[0091] perform allocation management and file system making on data in the target storage device according to the partition scheme, to obtain a plurality of partitions and a target file system.
[0092] The obtaining of the partition scheme for partitioning the target storage device according to a requirement includes:
[0093] obtaining a number of partitions required;
[0094] obtaining partition size information of each to-be-partitioned partition according to a size of the target storage device and the number of partitions;
[0095] obtaining an encryption algorithm of data in each to-be-partitioned partition;
[0096] obtaining the partition scheme according to the number of partitions, the partition size information of each to-be-partitioned partition, and the encryption algorithm of data in each to-be-partitioned partition.
[0097] The obtaining of a plurality of partitions and a target file system according to the partition scheme includes:
[0098]
[0099] connecting the target storage device to a computer device;
[0100] performing allocation management and file system making on data in the target storage device according to the partition scheme by using a partition tool, to obtain the plurality of partitions and the target file system.
[0101] Further, the preset device is a loop device.
[0102] Further, the mounting execution module 13 is specifically configured to:
[0103] When a read action or a write action is performed on a target partition by operating a corresponding mounting point in the temporary mounting directory, the read action or the write action is intercepted based on fuse, data targeted by the read action or the write action is processed, and the processed data is returned to a calling party or is redirected to the target partition, wherein the target partition belongs to the plurality of partitions.
[0104] When a read action is performed on the target partition, based on the fuse, the read action is intercepted, and the data targeted by the read action is decrypted according to the encryption algorithm in the target partition, and the decrypted data is returned to the caller of the read action.
[0105] When a read action is performed on the target partition, based on the fuse, the read action is intercepted, and the data targeted by the read action is decrypted according to the encryption algorithm in the target partition, and the decrypted data is returned to the caller of the read action.
[0106] When a write action is performed on the target partition, based on the fuse, the write action is intercepted, and the data targeted by the write action is encrypted according to the encryption algorithm in the target partition, and the encrypted data is written into the target partition.
[0107] Embodiment Three
[0108] Based on the same inventive concept as the data partition processing method provided in the above embodiments, the embodiment of the present application further provides an electronic device.
[0109] The electronic device of the embodiment of the present disclosure includes a memory and a processor. The memory is configured to store non-transitory computer readable instructions. Specifically, the memory can include one or more computer program products, which can include various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory, etc. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.
[0110] The processor can be a central processing unit (CPU) or other forms of processing units with data processing and / or instruction execution capabilities, and can control other components in the electronic device to perform desired functions. In an embodiment of the present disclosure, the processor is configured to run the computer readable instructions stored in the memory, so that the electronic device performs all or part of the steps of the data partition processing method of the embodiments of the present disclosure described above.
[0111] Those skilled in the art should understand that, in order to solve the technical problem of how to obtain a good user experience effect, the embodiment can also include well-known structures such as communication bus, interface, etc., which should also be included in the protection scope of the present disclosure.
[0112] As Figure 4 A structural schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown, which shows a structural schematic diagram suitable for implementing the electronic device in the embodiment of the present disclosure. Figure 4The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0113] like Figure 4 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0114] Typically, the following devices can be connected to the I / O interface: input devices, such as sensors or visual information acquisition devices; output devices, such as displays; storage devices, such as magnetic tapes or hard drives; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices (such as edge computing devices) to exchange data. Although Figure 4 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0115] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, all or part of the steps of the data partitioning processing method of embodiments of this disclosure are performed.
[0116] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0117] Example 4
[0118] Based on the same inventive concept as the data processing method in the above embodiments, this application also provides a computer-readable storage medium.
[0119] A computer-readable storage medium according to embodiments of the present disclosure stores non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the data partitioning processing methods of the foregoing embodiments of the present disclosure are performed.
[0120] The computer-readable storage medium described above includes, but is not limited to, an optical storage medium (for example, a CD-ROM and a DVD), a magneto-optical storage medium (for example, an MO), a magnetic storage medium (for example, a magnetic tape or a magnetic hard disk), a medium having a built-in rewritable nonvolatile memory (for example, a memory card), and a medium having a built-in ROM (for example, a ROM cartridge).
[0121] For detailed description of the present embodiment, reference can be made to the corresponding description in the foregoing embodiments, which will not be repeated here.
[0122] The above describes the basic principles of the present disclosure in combination with specific embodiments, but it should be noted that the advantages, benefits, effects and the like mentioned in the present disclosure are only examples and are not limiting, and these advantages, benefits, effects and the like cannot be considered as necessary for each embodiment of the present disclosure. In addition, the specific details of the above disclosure are only for the purpose of example and for the purpose of understanding, and are not limiting, and the above details do not limit the present disclosure to be necessarily implemented with the above specific details.
[0123] In the present disclosure, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. The block diagrams of devices, apparatuses, equipment, systems involved in the present disclosure are only illustrative examples and are not intended to require or imply the connection, arrangement, configuration shown in the block diagram. As those skilled in the art will recognize, these devices, apparatuses, equipment, systems can be connected, arranged, configured in any manner. Words such as "include", "contain", "have" and the like are open-ended words, which mean "including but not limited to", and can be used interchangeably. The words "or" and "and" used herein mean the word "and / or", and can be used interchangeably unless the context clearly indicates otherwise. The word "such as" used herein means the phrase "such as but not limited to", and can be used interchangeably.
[0124] In addition, as used herein, "or" used in a list of items, prefaced by "at least one of", indicates a disjunctive list such that, for example, a list of "at least one of A, B, or C" means A or B or C or AB or AC or BC or ABC (i.e., A and B and C). Also, the phrase "example of" as used herein means "example of, but not limited to" and can be used interchangeably.
[0125] It should also be noted that in the systems and methods of the present disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalents of the present disclosure.
[0126] Various changes, modifications, and alterations to the techniques described herein can be made without departing from the teachings of the attached claims. Moreover, the scope of the claims of this disclosure is not limited to the particular aspects described above. In addition, where a process, machine, manufacture, composition of matter, means, method, or result containing procedural, business, and other steps is described, it is understood that the description is intended to encompass the specific steps, data structures, and computer- readable media described, as well as the broader concepts of which these specific steps, data structures, and computer-readable media are a part. Thus, the scope of the claims of this disclosure is not intended to be limited to the particular aspects and examples described above. Indeed, it is anticipated that implementations of the present disclosure will provide improvements over the prior art, and it will be recognized by those of skill in the art that such improvements necessarily are within the scope of the teachings of the attached claims. Accordingly, no limitation is placed on the scope of the claims except for those implied by the attached claims and legal equivalents thereof.
[0127] The above description of the disclosed aspects is given for illustrative purposes only and is not intended to limit the scope of the disclosure. The aspects are described in terms of "preferred" embodiments and various modifications, alterations, and permutations of these preferred embodiments. These descriptions are not intended to be exhaustive or to limit the scope of the aspects to the precise forms described. Many modifications and variations are possible in light of the above teachings.
[0128] The above description is not intended to limit the scope of the present disclosure to the precise forms described. Many modifications and variations are possible in light of the above teachings. It is contemplated that the use of the present disclosure or aspects thereof can involve portions of components and combinations of steps of the processes with other steps or components not expressly stated or implied by this disclosure.
[0129] The above description has been given for illustrative purposes only and is not intended to limit the scope of the disclosure. The aspects are described in terms of "preferred" embodiments and various modifications, alterations, and permutations of these preferred embodiments. These descriptions are not intended to be exhaustive or to limit the scope of the aspects to the precise forms described. Many modifications and variations are possible in light of the above teachings. The above description is not intended to limit the scope of the present disclosure to the precise forms described. Many modifications and variations are possible in light of the above teachings. It is contemplated that the use of the present disclosure or aspects thereof can involve portions of components and combinations of steps of the processes with other steps or components not expressly stated or implied by this disclosure.
Claims
1. A data partitioning processing method, characterized in that, The method includes: According to the requirements, partition the target storage device and create a file system to obtain multiple partitions and the target file system; Based on the multiple partitions and the target file system, and using a preset device, a temporary mount directory is created; Based on fuse, the temporary mount directory is attached to enable the use of the target storage device; The step of partitioning the target storage device and creating a file system according to requirements includes: Based on the requirements, obtain a partitioning scheme for the target storage device; Based on the partitioning scheme, the data in the target storage device is allocated and managed, and a file system is created to obtain multiple partitions and a target file system; Based on the requirements, obtain a partitioning scheme for the target storage device, including: Get the required number of partitions; Based on the size of the target storage device and the number of partitions, obtain the partition size information of each partition to be divided; Obtain the encryption algorithm for the data within each partition to be divided; The partitioning scheme is obtained based on the number of partitions, the size information of each partition to be partitioned, and the encryption algorithm of the data in each partition to be partitioned.
2. The method according to claim 1, characterized in that, According to the partitioning scheme The data within the target storage device is allocated, managed, and a file system is created to obtain multiple partitions and a target file system, including: Connect the target storage device to a computer device; Using a partitioning tool, the data within the target storage device is allocated, managed, and a file system is created according to the partitioning scheme, resulting in the multiple partitions and the target file system.
3. The method according to claim 1, characterized in that, The preset device is a loop device.
4. The method according to claim 1, characterized in that, Using the target storage device includes: When performing read or write operations on the target partition by operating the corresponding mount point in the temporary mount directory, the read or write operation is intercepted based on fuse, and the data targeted by the read or write operation is processed. The processed data is then returned to the caller or redirected to the target partition, wherein the target partition belongs to one of the multiple partitions.
5. The method according to claim 4, characterized in that, When performing read or write operations on the target partition, based on fuse, the read or write operation is intercepted, and the data targeted by the read or write operation is processed. The processed data is then returned to the caller or redirected to the target partition, including: When a read operation is performed on the target partition, the read operation is intercepted based on fuse. According to the encryption algorithm in the target partition, the data targeted by the read operation is decrypted and the decrypted data is returned to the caller of the read operation. When a write operation is performed on the target partition, the write operation is intercepted based on fuse. The data targeted by the write operation is encrypted according to the encryption algorithm in the target partition, and the encrypted data is written into the target partition.
6. A data partitioning processing device, characterized in that, include: The partitioning module is used to partition the target storage device and create a file system according to requirements, resulting in multiple partitions and the target file system; The mount directory generation module is used to create a temporary mount directory based on the multiple partitions and the target file system, and on a preset device. The mounting execution module is used to mount the temporary mount directory based on fuse, and to use the target storage device. The step of partitioning the target storage device and creating a file system according to requirements includes: Based on the requirements, obtain a partitioning scheme for the target storage device; Based on the partitioning scheme, the data in the target storage device is allocated and managed, and a file system is created to obtain multiple partitions and a target file system; Based on the requirements, obtain a partitioning scheme for the target storage device, including: Get the required number of partitions; Based on the size of the target storage device and the number of partitions, obtain the partition size information of each partition to be divided; Obtain the encryption algorithm for the data within each partition to be divided; The partitioning scheme is obtained based on the number of partitions, the size information of each partition to be partitioned, and the encryption algorithm of the data in each partition to be partitioned.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the data partitioning processing method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the data partitioning processing method according to any one of claims 1-5.
Citation Information
Patent Citations
Fast fine-grained recovery method and device based on backup data
CN112965856A
Terminal and partition mounting method
CN114510754A