Method, device, readable storage medium and electronic device for dynamically allocating physical blocks
By dynamically allocating physical block strips, the IO model and business storage space are determined based on the data size, which solves the problem of excessive physical block strip granularity in large-capacity storage, improves performance and efficiency, and adapts to different business scenarios.
Patent Information
- Application Number
- CN202411034662.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Existing physical block striping methods lead to excessive granularity in large capacity storage, affecting performance, especially inefficient in garbage collection operations.
By receiving data processing requests, obtaining the data size, determining the target IO model and business storage space, and dynamically allocating physical block strips in the basic storage space to adapt to different business scenarios.
The performance fluctuations of physical block strips in different business scenarios are optimized, data processing efficiency is improved, and various business application scenarios are adapted to.
Smart Images

Figure CN118567866B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of solid-state storage technology, and in particular to a method, device, readable storage medium and electronic device for dynamically allocating physical blocks. Background Art
[0002] SPB (Stripe Physical Block, also known as SuperBlock) is a logical division for NAND (flash memory) space management in the FTL (Flash Translation Layer) algorithm.
[0003] The existing SPB partitioning method usually divides all blocks with the same ID in all dies into one SPB. However, in large-capacity disks, due to the large number of dies, the granularity of SPB partitioning is too large, resulting in a long operation time and affecting performance. For example, for the storage garbage collection (GC) operation, the processing time of one SPB will increase, resulting in reduced collection efficiency. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method, device, readable storage medium and electronic device for dynamically allocating physical blocks, so as to dynamically allocate the size of SPB to adapt to different business application scenarios.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A method for dynamically allocating physical blocks, comprising:
[0007] Receiving a data processing request and obtaining the data volume of the data processing request;
[0008] Determining a target IO model for the data processing request according to the data amount;
[0009] Confirming the target business storage space according to the target IO model;
[0010] A physical block stripe in a basic storage space is obtained, and the physical block stripe is allocated to the target service storage space.
[0011] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0012] A device for dynamically allocating physical blocks, comprising:
[0013] A receiving module, used for receiving a data processing request and obtaining the data volume of the data processing request;
[0014] A first determining module, configured to determine a target IO model of the data processing request according to the data amount;
[0015] A second determination module, used to determine the target business storage space according to the target IO model;
[0016] The allocation module is used to obtain the physical block stripes in the basic storage space and allocate the physical block stripes to the target business storage space.
[0017] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0018] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the various steps in the above-mentioned method for dynamically allocating physical blocks.
[0019] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0020] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes each step of the method for dynamically allocating physical blocks.
[0021] The beneficial effects of the present invention are as follows: after receiving a data processing request and obtaining its corresponding data size, the target IO model and the target business storage space are determined according to the size of the data to be processed, and then the physical block stripes in the basic storage space are allocated to the target business storage space. That is, by identifying the business model corresponding to the data processing request, the physical block stripes in the basic storage space can be dynamically allocated, and the existing space management scheme of the fixed-size physical block stripes is improved to a management scheme of dynamically dividing the physical block stripes according to different business scenarios, thereby optimizing the performance fluctuations of the physical block stripes in different business scenarios and being able to adapt to different business application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a method for dynamically allocating physical blocks in an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of an IO model in a method for dynamically allocating physical blocks in an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of applying for a physical block stripe from a basic storage space in a method for dynamically allocating physical blocks in an embodiment of the present invention;
[0025] Figure 4A schematic diagram of splitting a physical block stripe in a method for dynamically allocating physical blocks in an embodiment of the present invention;
[0026] Figure 5 Another schematic diagram of splitting physical block stripes in a method for dynamically allocating physical blocks in an embodiment of the present invention;
[0027] Figure 6 A schematic diagram of the structure of a device for dynamically allocating physical blocks in an embodiment of the present invention;
[0028] Figure 7 FIG. 4 is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in conjunction with the implementation modes and the accompanying drawings.
[0030] Please refer to Figure 1 , a method for dynamically allocating physical blocks, comprising:
[0031] Receiving a data processing request and obtaining the data volume of the data processing request;
[0032] Determining a target IO model for the data processing request according to the data amount;
[0033] Confirming the target business storage space according to the target IO model;
[0034] A physical block stripe in a basic storage space is obtained, and the physical block stripe is allocated to the target service storage space.
[0035] From the above description, it can be seen that the beneficial effects of the present invention are: after receiving a data processing request and obtaining its corresponding data size, the target IO model and the target business storage space are determined according to the size of the data to be processed, and then the physical block stripes in the basic storage space are allocated to the target business storage space, that is, by identifying the business model corresponding to the data processing request, the physical block stripes in the basic storage space can be dynamically allocated, and the existing fixed-size physical block stripe space management scheme is improved to a management scheme that dynamically divides the physical block stripes according to different business scenarios, thereby optimizing the performance fluctuations of the physical block stripes in different business scenarios and being able to adapt to different business application scenarios.
[0036] Further, obtaining the data size of the data processing request includes:
[0037] Recording the logical block address of the data processing request;
[0038] receiving the next data processing request;
[0039] Determine whether the logic block address of the currently received data processing request is continuous with the logic block address of the next data processing request, and if so, continue to obtain the data processing requests until the logic block addresses are discontinuous, thereby obtaining continuous data processing requests; and obtain the data amount according to the continuous data processing requests;
[0040] If not, the data size is obtained according to the current data processing request.
[0041] It can be seen from the above description that by judging the continuity of each data processing request, continuous data processing requests can be combined into one data processing request for processing, thereby improving the processing efficiency of continuous data processing requests.
[0042] Further, it includes at least two IO models and a data volume range corresponding to the number of the IO models; the data volume ranges corresponding to different IO models do not overlap with each other;
[0043] Determining the target IO model of the data processing request according to the data amount includes:
[0044] Compare the data volume size with all the data volume ranges to obtain a target data volume range corresponding to the data volume size;
[0045] The IO model corresponding to the target data volume range is used as the target IO model.
[0046] From the above description, it can be seen that the corresponding IO model is set according to the data volume range, so that in the process of processing data, the corresponding IO model can be selected according to the different sizes of data to be processed, thereby improving data processing efficiency.
[0047] Further, it includes a business storage space corresponding to the IO model one by one;
[0048] Confirming the target business storage space according to the target IO model includes:
[0049] The business storage space corresponding to the target IO model is used as the target business storage space.
[0050] From the above description, it can be seen that by setting a business storage space that corresponds to the IO model one by one, that is, different business storage spaces correspond to different IO models, different IO business scenarios can be handled through different business storage spaces, thereby improving adaptability to the amount of data required for different business scenarios.
[0051] Further, the obtaining of physical block stripes in the basic storage space and allocating the physical block stripes to the target service storage space includes:
[0052] Applying for at least one physical block stripe from the basic storage space;
[0053] Obtaining a target number of split entries according to the target business storage space;
[0054] Each of the physical block stripes is split into a corresponding number of virtual physical block stripes according to the target split strip number.
[0055] From the above description, it can be seen that the physical block stripes are split into a corresponding number of virtual physical block stripes according to the target number of split stripes required by the target business storage space, so that the size of the split virtual physical block stripes is more adapted to the business needs, thereby realizing dynamic adjustment of the size of the virtual physical block stripes according to business needs.
[0056] Further, the step of splitting each of the physical block stripes into a corresponding number of virtual physical block stripes according to the target split number includes:
[0057] Obtaining a distribution pattern of grains in the physical block strip;
[0058] Each of the physical block strips is split into a corresponding number of virtual physical block strips according to the grain distribution rule and the target split number.
[0059] It can be seen from the above description that by splitting the physical block stripe in consideration of the grain distribution rule, the problem of performance loss of the virtual physical block stripe after the splitting can be avoided.
[0060] Further, the grain distribution rule includes the number of the wafer enable to which the grain belongs, and the number of the logic unit corresponding to the wafer enable;
[0061] The step of splitting each of the physical block stripes into a corresponding number of virtual physical block stripes according to the grain distribution rule and the target split number includes:
[0062] Classify the logic units with the same number under different chip enablement into a main category, and obtain the number of main categories;
[0063] The number of subcategories is obtained according to the number of main categories and the number of target splits, including:
[0064] Determine whether the number of the main categories reaches the target number of split strips, and if so, treat each of the main categories as the virtual physical block strip;
[0065] If not, the wafers with different numbers in each of the main categories are enabled to be divided into subcategories with the same number as the subcategories;
[0066] Each of the sub-classifications is used as the virtual physical block stripe.
[0067] From the above description, it can be seen that by dividing the same logical units under different chip enables into main categories, that is, there is no conflicting chip enable in each main category, the divided virtual physical block strips can be operated concurrently to avoid performance loss.
[0068] Another embodiment of the present invention provides a device for dynamically allocating physical blocks, including:
[0069] A receiving module, used for receiving a data processing request and obtaining the data volume of the data processing request;
[0070] A first determining module, configured to determine a target IO model of the data processing request according to the data amount;
[0071] A second determination module, used to determine the target business storage space according to the target IO model;
[0072] The allocation module is used to obtain the physical block stripes in the basic storage space and allocate the physical block stripes to the target business storage space.
[0073] Another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method for dynamically allocating physical blocks.
[0074] Another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned method for dynamically allocating physical blocks when executing the computer program.
[0075] The method, device, readable storage medium and electronic device for dynamically allocating physical blocks provided by the present invention can be applied to different types of memories to achieve dynamic allocation of physical blocks in the memories, which are described below through specific implementation methods:
[0076] Embodiment 1
[0077] Please refer to Figure 1 , a method for dynamically allocating physical blocks, comprising:
[0078] S1. Receive a data processing request and obtain the data size of the data processing request. The FTL identifies the IO model by determining whether the data processing request is a continuous large IO or a random small IO. The IO model currently being written is determined by determining the data size received by the front-end protocol and whether each LBA (Logical Block Address) is continuous. Specifically:
[0079] S11, recording the logical block address of the data processing request;
[0080] S12, receiving the next data processing request;
[0081] S13, determining whether the logical block address of the currently received data processing request is continuous with the logical block address of the next data processing request, if so, continuing to obtain data processing requests until the logical block addresses are discontinuous, thereby obtaining continuous data processing requests; and obtaining the data volume size according to the continuous data processing requests; if not, obtaining the data volume size according to the current data processing request;
[0082] For example: After the front end receives a series of continuous commands and transmits them to FTL, FTL records the LBA of the previous command each time and compares it with the LBA of the current command to determine whether the commands are continuous. At the same time, it records the data size of each command to obtain the total data size of continuous commands and the data size of a single command.
[0083] S2. Determine the target IO model of the data processing request according to the data volume; wherein, it is necessary to pre-divide multiple business storage spaces (Partitions), and the virtual physical block strips (Virtual SPBs) belonging to different business storage spaces are used to correspond to different IO business scenarios, that is, the IO model corresponds to the business storage space one by one; and the number of IO models can be set according to the number of specific business scenarios; in the initial state, all SPBs belong to the basic storage space, and after the IO model is identified by the FTL, the idle virtual physical block strips are selected to apply for the corresponding business storage space; at the same time, the IO model is set with a corresponding data volume range, and the data volume ranges corresponding to different IO models do not overlap;
[0084] Please refer to Figure 2In an optional implementation, three IO models are provided, namely, IO model 1, IO model 2 and IO model 3, and the three IO models correspond to business storage spaces Part 1, Part 2 and Part 3, respectively, and the basic storage space is Part 0; wherein, the data volume range corresponding to IO model 1 is greater than or equal to 128K, the data volume range corresponding to IO model 2 is 64-128K (including 64K), and the data volume range corresponding to IO model 3 is less than 64K; wherein, in order to speed up the table lookup process during the read operation, different sizes of L2P (Logical address TOPhysical address, logical address to physical address) mapping relationships can be established according to different IO models, for example, IO model 1 is a 128K mapping relationship, IO model 2 is 64K, and IO model 3 is a normal 4K mapping; that is, when reading 128K data in the business storage space (partition) based on IO model 1, only one L2P table needs to be queried, while the traditional solution needs to be queried once every 4K; the specific method of selecting the target IO model is as follows:
[0085] S21, compare the data volume size with all data volume ranges to obtain a target data volume range corresponding to the data volume size; that is, when the data volume is greater than or equal to 128K, it is judged to be within the data volume range of IO model 1, when the data volume is greater than or equal to 64K and less than 128K, it is within the data volume range of IO model 2, and the rest falls within the data volume range of IO model 3;
[0086] S22, taking the IO model corresponding to the target data volume range as the target IO model; that is, obtaining the corresponding IO model according to the data volume range determined in step S21.
[0087] S3. Confirm the target business storage space according to the target IO model; that is, use the business storage space corresponding to the target IO model as the target business storage space; if the target IO model is IO model 1, use the business storage space Part1 as the target business storage space.
[0088] S4, obtaining the physical block stripes in the basic storage space, and allocating the physical block stripes to the target business storage space, specifically including the following steps:
[0089] S41. Apply for at least one physical block stripe from the basic storage space; please refer to Figure 3 If the target IO model is IO model 1, apply to allocate the physical block stripe to the business storage space Part1 and split it according to the number of grains (DIE). The specific splitting method is as follows:
[0090] S42. Obtain the target number of split strips according to the target business storage space; for example, if the business storage space Part1 needs to split the physical block stripe into two virtual physical block stripes, the corresponding target number of split stripes is 2, wherein the number of splits can be set according to specific business needs, such as 2 strips, 4 strips, and the like; for example, if Part1 is set to 2 strips, it corresponds to a continuous IO data model greater than 128K; if Part2 is set to 4 strips, it corresponds to a continuous IO data model of 64K-128K; if Part3 is set to 8 strips, it corresponds to a small IO data model.
[0091] S43, split each physical block strip into a corresponding number of virtual physical block strips according to the target split number; wherein, when splitting the virtual physical block strips, the number of nand dies needs to be considered at the same time to ensure that all blocks in the divided virtual physical block strips can be operated concurrently to avoid performance loss; the specific splitting method is as follows:
[0092] S431, obtaining a distribution rule of the grains in the physical block strip; wherein the distribution rule of the grains includes the number of the chip enable to which the grain belongs, and the number of the logic unit corresponding to the chip enable; please refer to Figure 4 as well as Figure 5 For example, a 4TB SSD consists of 4 CHs (channels), 8 CEs (chip enables), and 2 LUNs (logical unit numbers) under each CE, that is, each CE has a LUN0 and a LUN1; LUN0 includes 4 CHs (CH0-CH3) and 8 CEs (CE0-CE7), a total of 32 DIEs; LUN1 includes 4 CHs and 8 CEs, a total of 32 DIEs, that is, a 4TB SSD includes 64 DIEs;
[0093] S432, split each physical block strip into a corresponding number of virtual physical block strips according to the grain distribution rule and the target split number, specifically:
[0094] S4321, classifying logic units with the same number under different chip enablement into a main category, and obtaining the number of main categories;
[0095] S4322. Obtain the number of subcategories according to the number of main categories and the number of target splits, including:
[0096] Determine whether the number of main categories reaches the target number of split strips. If so, treat each main category as a virtual physical block strip;
[0097] If not, the chips with different numbers in each main category can be divided into subcategories with the same number as the number of subcategories; each subcategory is used as a virtual physical block stripe.
[0098] Please refer to Figure 4 , if the target number of split strips is 2; then LUN0 of different CEs (CE0-CE7) is divided into the first main category, and LUN1 of different CEs (CE0-CE7) is divided into the second main category; since the target number of split strips is 2 and the number of main categories is 2, there is no need to further divide the sub-categories; that is, 2 virtual physical block stripes are obtained, namely, the first virtual physical block stripe (Virtual SPB0) includes the grains DIE0-DIE31 in LUN0 of different CEs; the second virtual physical block stripe (VirtualSPB1) includes the grains DIE32-DIE63.
[0099] Please refer to Figure 5 , if the target number of split strips is 4; then further split on the basis of the main classification; similarly first divide into the first main classification and the second main classification according to LUN0 and LUN1; since the target number of split strips is 4, and the number of main classifications is 2, it is necessary to further split the main classification into two sub-classifications; then divide CE0-CE3 in the first main classification LUN0 into the first virtual physical block stripe (Virtual SPB0) including grains DIE0-DIE15; divide CE4-CE7 in LUN0 into the second virtual physical block stripe (Virtual SPB1) including grains DIE16-DIE31; similarly divide the second main classification LUN1 to obtain the third virtual physical block stripe (Virtual SPB2) including grains DIE32-DIE47, and the fourth virtual physical block stripe (Virtual SPB3) including grains DIE48-DIE63.
[0100] Similarly, if the target split number is 8, the number of CEs in each sub-category is reduced, thereby obtaining 8 virtual physical block strips.
[0101] Embodiment 2
[0102] Please refer to Figure 6 , a device for dynamically allocating physical blocks, comprising:
[0103] A receiving module, used to receive a data processing request and obtain the data size of the data processing request;
[0104] A first determination module, used to determine a target IO model of a data processing request according to the amount of data;
[0105] A second determination module is used to determine the target business storage space according to the target IO model;
[0106] The allocation module is used to obtain the physical block stripes in the basic storage space and allocate the physical block stripes to the target business storage space.
[0107] Embodiment 3
[0108] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of a method for dynamically allocating physical blocks in the first embodiment.
[0109] Embodiment 4
[0110] Please refer to Figure 7 An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step in a method for dynamically allocating physical blocks in Embodiment 1 is implemented.
[0111] In summary, the present invention provides a method, device, readable storage medium and electronic device for dynamically allocating physical blocks, which realize the allocation of virtual physical block stripes according to the concept of dynamic space management, so that the size of the physical block stripes can be dynamically adjusted at any time, which is more flexible than the traditional fixed configuration scheme; and can select stripes of different sizes by identifying different business scenarios, which is convenient for resource allocation and reduces unnecessary processing of large stripes by FTL to improve performance in special scenarios; after receiving a data processing request and obtaining its corresponding data size, the target IO model and the target business storage space are determined according to the size of the data to be processed, and then the physical block stripes in the basic storage space are allocated to the target business storage space, that is, the business model corresponding to the data processing request can be identified, and the physical block stripes in the basic storage space can be dynamically allocated, and the existing fixed-size physical block stripe space management scheme is improved to a management scheme for dynamically dividing the physical block stripes according to different business scenarios, thereby optimizing the performance fluctuations of the physical block stripes in different business scenarios, and being able to adapt to different business application scenarios.
[0112] In the above embodiments provided in the present application, it should be understood that the disclosed methods, devices, computer-readable storage media, and electronic devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple components or modules can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or components or modules, which can be electrical, mechanical or other forms.
[0113] The components described as separate components may or may not be physically separated, and the components shown as components may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the components may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0114] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each component may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0115] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0116] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0117] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0118] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for dynamically allocating physical blocks, characterized in that: include: Receiving a data processing request and obtaining the data size of the data processing request; Determining a target IO model for the data processing request according to the data amount; Determine the target business storage space according to the target IO model; Acquire physical block stripes in a basic storage space, and allocate the physical block stripes to the target service storage space; The obtaining of the data size of the data processing request includes: Recording the logical block address of the data processing request; receiving the next data processing request; determining whether the logical block address of the currently received data processing request is continuous with the logical block address of the next data processing request; if so, continuing to obtain the data processing requests until the logical block addresses are discontinuous, thereby obtaining continuous data processing requests; and obtaining the data size according to the continuous data processing requests; If not, obtaining the data size according to the current data processing request; The acquiring of the physical block stripes in the basic storage space and allocating the physical block stripes to the target service storage space includes: Applying for at least one physical block stripe from the basic storage space; Obtaining a target number of split entries according to the target business storage space; Each of the physical block stripes is split into a corresponding number of virtual physical block stripes according to the target split number.
2. The method for dynamically allocating physical blocks according to claim 1, wherein: It includes at least two IO models and a data volume range corresponding to the number of the IO models; the data volume ranges corresponding to different IO models do not overlap with each other; Determining the target IO model of the data processing request according to the data amount includes: Comparing the data volume size with all the data volume ranges to obtain a target data volume range corresponding to the data volume size; The IO model corresponding to the target data volume range is used as the target IO model.
3. The method for dynamically allocating physical blocks according to claim 2, wherein: including business storage spaces corresponding one to one with the IO models; Confirming the target business storage space based on the target IO model includes: The business storage space corresponding to the target IO model is used as the target business storage space.
4. The method for dynamically allocating physical blocks according to claim 1, wherein: The step of splitting each of the physical block stripes into a corresponding number of virtual physical block stripes according to the target split number includes: Obtaining a distribution pattern of grains in the physical block strip; Each of the physical block stripes is split into a corresponding number of virtual physical block stripes according to the grain distribution rule and the target number of split stripes.
5. The method for dynamically allocating physical blocks according to claim 4, characterized in that: The grain distribution rule includes the number of the chip enable to which the grain belongs and the number of the logic unit corresponding to the chip enable; The step of splitting each physical block strip into a corresponding number of virtual physical block strips according to the grain distribution rule and the target split number includes: Classify the logic units with the same number under different chip enablement into a main category, and obtain the number of main categories; The number of subcategories is obtained according to the number of main categories and the number of target splits, including: Determine whether the number of the main categories reaches the target number of split strips, and if so, treat each of the main categories as the virtual physical block strip; If not, the wafers with different numbers in each main category are divided into subcategories with the same number as the subcategories; Each of the sub-classes is treated as the virtual physical block stripe.
6. A device for dynamically allocating physical blocks, characterized in that: include: A receiving module, configured to receive a data processing request and obtain the data size of the data processing request; A first determining module, configured to determine a target IO model of the data processing request according to the data amount; A second determining module is used to determine the target business storage space according to the target IO model; An allocation module, configured to obtain physical block stripes in a basic storage space and allocate the physical block stripes to the target service storage space; The obtaining of the data size of the data processing request includes: Recording the logical block address of the data processing request; receiving the next data processing request; determining whether the logical block address of the currently received data processing request is continuous with the logical block address of the next data processing request; if so, continuing to obtain the data processing requests until the logical block addresses are discontinuous, thereby obtaining continuous data processing requests; and obtaining the data size according to the continuous data processing requests; If not, obtaining the data size according to the current data processing request; The acquiring of the physical block stripes in the basic storage space and allocating the physical block stripes to the target service storage space includes: Applying for at least one physical block stripe from the basic storage space; Obtaining a target number of split entries according to the target business storage space; Each of the physical block stripes is split into a corresponding number of virtual physical block stripes according to the target split number.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for dynamically allocating physical blocks according to any one of claims 1 to 5 are implemented.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the processor implements the steps of the method for dynamically allocating physical blocks according to any one of claims 1 to 5.
