Data storage method, device, equipment, storage medium and program product

By dynamically allocating logical partitions and monitoring the stress state of the flash memory wafer in ZNS SSD, the resource contention problem of ZNS SSD during multiple partition operations is solved, thereby improving data storage efficiency and overall performance.

CN122284895APending Publication Date: 2026-06-26DAWNING INFORMATION IND (BEIJING) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411793249.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-07
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

When using ZNS SSDs for data storage, resource contention occurs when multiple partitions are operated on simultaneously, resulting in low data storage efficiency.

Method used

Upon receiving a business request, multiple logical partitions are allocated for the business request on the logical disk, and multiple target flash memory wafers are allocated for the business request on the physical disk. Data is stored on the corresponding wafers according to the stress status of the flash memory wafers. Data storage is guided by dynamically allocating logical partitions and monitoring the wafer stress status in real time.

Benefits of technology

It improves data storage efficiency, meets the performance needs of different users, reduces performance interference and garbage collection costs between various services, and ensures the continuity of data storage and overall performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122284895A_ABST
    Figure CN122284895A_ABST
Patent Text Reader

Abstract

This application relates to a data storage method, apparatus, device, storage medium, and program product. The method, upon receiving a service request, allocates multiple logical partitions on a logical disk and multiple target flash memory wafers on a physical disk for the service request. Then, it writes the data of the service request to the multiple logical partitions and stores the data from the multiple logical partitions to the multiple target flash memory wafers according to their stress status. In this method, by dynamically allocating logical partitions for service requests, it can better adapt to the diversity and dynamism of workloads, meet the performance needs of different users, and maximize the utilization of physical disk bandwidth by monitoring the wafer stress status in real time to guide wafer selection, thereby greatly improving data storage efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and in particular to a data storage method, apparatus, device, storage medium, and program product. Background Technology

[0002] With the rapid development of storage media technology, solid-state drives (SSDs) based on flash memory have gradually become the mainstream storage devices due to their advantages in performance, reliability, and energy efficiency.

[0003] Currently, the Non-Volatile Memory Express (NVME) standards group has introduced a new Zoned Name Space (ZNS) interface technology specification. ZNS technology divides the capacity of an SSD into zones for management. By eliminating the mapping from Logical Block Addressing (LBA) to pages within the device, garbage collection, and over-provisioning space (OP), ZNS technology simplifies the internal management of SSDs, enabling them to achieve higher performance and lower costs.

[0004] However, the data storage method using ZNSSSD described in relevant records can lead to resource contention when operating on multiple partitions (zones) simultaneously, resulting in low data storage efficiency. Summary of the Invention

[0005] Therefore, it is necessary to provide a data storage method, apparatus, device, storage medium, and program product that can improve data storage efficiency in response to the above-mentioned technical problems.

[0006] Firstly, this application provides a data storage method, the method comprising:

[0007] Upon receiving a business request, multiple logical partitions are allocated for the business request on the logical disk, and multiple target flash memory wafers are allocated for the business request on the physical disk;

[0008] The data of the business request is written to multiple logical partitions, and the data in the multiple logical partitions is stored on multiple target flash memory wafers according to the stress status of multiple target flash memory wafers.

[0009] The data storage method provided in this application allocates multiple logical partitions for the service request on a logical disk and multiple target flash memory wafers for the service request on a physical disk upon receiving a service request. Then, the data of the service request is written to the multiple logical partitions, and the data in the multiple logical partitions is stored on the multiple target flash memory wafers according to their stress status. In this method, by dynamically allocating logical partitions for the service request, it can better adapt to the diversity and dynamism of the load, meet the performance needs of different users, and maximize the utilization of physical disk bandwidth by monitoring the wafer stress status in real time to guide wafer selection, thereby greatly improving data storage efficiency. Furthermore, by storing different types of service requests on different logical disks, it can reduce performance interference between various services and reduce garbage collection costs.

[0010] In one embodiment, data from multiple logical partitions is stored on multiple target flash memory wafers according to the pressure state of multiple target flash memory wafers, including:

[0011] Obtain the parallelism of the business requests, and determine multiple target logical partitions from multiple logical partitions based on the parallelism.

[0012] The data in each target logical partition is stored in each target flash memory wafer, and the data corresponding to other logical partitions in multiple logical partitions is stored in each target flash memory wafer according to the pressure status of each target flash memory wafer.

[0013] In one embodiment, data corresponding to other logical partitions in a plurality of logical partitions is stored on each target flash memory wafer according to the pressure state of each target flash memory wafer, including:

[0014] Based on the pressure state of each target flash memory wafer, the first flash memory wafer that meets the storage conditions among multiple target flash memory wafers is determined;

[0015] If the number of first flash memory wafers is less than the number of multiple target flash memory wafers, then a new second flash memory wafer is allocated, and based on the first flash memory wafer and the second flash memory wafer, the data corresponding to other logical partitions in the multiple logical partitions are stored to each target flash memory wafer.

[0016] In one embodiment, based on a first flash memory wafer and a second flash memory wafer, data corresponding to other logical partitions in a plurality of logical partitions are stored to each target flash memory wafer, including:

[0017] The first flash memory wafer and the second flash memory wafer are used as target flash memory wafers;

[0018] Based on the degree of parallelism, multiple target logical partitions are determined from other logical partitions, and the process of storing data from each target logical partition to each target flash wafer is returned to be executed until the data from all logical partitions is stored in the physical disk.

[0019] The method described in this application embodiment monitors the pressure state of the flash memory wafer. When the pressure of the target flash memory wafer reaches a certain level, a new flash memory wafer can be automatically allocated, which can ensure the continuity and efficiency of data storage. Moreover, the above method can ensure that the pressure of each flash memory wafer is balanced, thereby avoiding overload of a certain wafer and affecting the overall performance.

[0020] In one embodiment, the method further includes:

[0021] Obtain the processing time and data size for each target flash memory wafer;

[0022] The data processing latency of each target flash memory wafer is determined based on the processing time and data size.

[0023] The pressure state of each target flash memory wafer is determined based on the data processing latency of each target flash memory wafer; the pressure state includes high pressure state and low pressure state.

[0024] The method described in this application embodiment can quickly and accurately assess the stress state of each target flash memory wafer by monitoring the processing time and data size of each wafer. Furthermore, by analyzing the stress state of each flash memory wafer, resources can be better allocated, preventing overload of certain wafers and thus improving the overall system storage efficiency.

[0025] In one embodiment, the method further includes:

[0026] Determine if the business request already exists in the allocated logical area;

[0027] If it is determined that the business request has an allocated logical area, then the step of allocating multiple logical partitions for the business request on the logical disk is executed;

[0028] If it is determined that there is no allocated logical area for the business request, then a logical area is allocated for the business request, and the steps of allocating multiple logical partitions for the business request on the logical disk are executed.

[0029] The method described in this application embodiment can more quickly locate the data storage location by pre-determining whether the business request has already been allocated a logical area, thereby reducing the time spent searching and allocating new storage space and improving storage efficiency.

[0030] Secondly, this application also provides a data storage device, the device comprising:

[0031] The allocation module is used to allocate multiple logical partitions on the logical disk for the business request and to allocate multiple target flash memory wafers on the physical disk for the business request when a business request is received.

[0032] The storage module is used to write data from business requests to multiple logical partitions and, based on the stress status of multiple target flash memory wafers, store the data from the multiple logical partitions to multiple target flash memory wafers.

[0033] Thirdly, this application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0034] Upon receiving a business request, multiple logical partitions are allocated for the business request on the logical disk, and multiple target flash memory wafers are allocated for the business request on the physical disk;

[0035] The data of the business request is written to multiple logical partitions, and the data in the multiple logical partitions is stored on multiple target flash memory wafers according to the stress status of multiple target flash memory wafers.

[0036] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0037] Upon receiving a business request, multiple logical partitions are allocated for the business request on the logical disk, and multiple target flash memory wafers are allocated for the business request on the physical disk;

[0038] The data of the business request is written to multiple logical partitions, and the data in the multiple logical partitions is stored on multiple target flash memory wafers according to the stress status of multiple target flash memory wafers.

[0039] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, performs the following steps:

[0040] Upon receiving a business request, multiple logical partitions are allocated for the business request on the logical disk, and multiple target flash memory wafers are allocated for the business request on the physical disk;

[0041] The data of the business request is written to multiple logical partitions, and the data in the multiple logical partitions is stored on multiple target flash memory wafers according to the stress status of multiple target flash memory wafers.

[0042] The aforementioned data storage method, apparatus, device, storage medium, and program product involve the following steps: Upon receiving a service request, the method allocates multiple logical partitions on a logical disk and multiple target flash memory wafers on a physical disk for the service request. Then, the data of the service request is written to the multiple logical partitions, and the data from the multiple logical partitions is stored on the multiple target flash memory wafers according to their stress status. By dynamically allocating logical partitions for service requests, this method better adapts to the diversity and dynamism of workloads, meeting the performance needs of different users. Furthermore, by monitoring the wafer stress status in real time to guide wafer selection, it maximizes the utilization of physical disk bandwidth, thereby significantly improving data storage efficiency. Moreover, by storing different types of service requests on different logical disks, it reduces performance interference between various services and garbage collection costs. Attached Figure Description

[0043] Figure 1 This is an internal structural diagram of a computer device in one embodiment;

[0044] Figure 2 This is a flowchart illustrating a data storage method in one embodiment;

[0045] Figure 3 This is a flowchart illustrating the data storage method in another embodiment;

[0046] Figure 4 This is a flowchart illustrating the data storage method in another embodiment;

[0047] Figure 5 This is a flowchart illustrating the data storage method in another embodiment;

[0048] Figure 6 This is a flowchart illustrating the data storage method in another embodiment;

[0049] Figure 7 This is a flowchart illustrating the data storage method in another embodiment;

[0050] Figure 8 This is a flowchart illustrating the data storage method in another embodiment;

[0051] Figure 9 This is a flowchart illustrating the data storage method in another embodiment;

[0052] Figure 10 This is a flowchart illustrating the data storage method in another embodiment;

[0053] Figure 11 This is a structural block diagram of a data storage device in one embodiment. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0055] With the rapid development of storage media technology, flash-based solid-state drives (SSDs) have gradually become the mainstream storage devices due to their advantages in performance, reliability, and energy efficiency. Currently, the Non-Volatile Memory Express (NVME) standards group has introduced a new Zoned Name Space (ZNS) interface technology specification. ZNS technology divides the SSD's capacity into zones for management. By eliminating the mapping from Logical Block Addressing (LBA) to pages, garbage collection, and over-provisioning space (OP), ZNS technology simplifies the internal management of SSDs, enabling them to achieve higher performance and lower costs. However, in related documentation, data storage methods using ZNSSSDs encounter resource contention when multiple zones are operated simultaneously, leading to low data storage efficiency.

[0056] This application provides a data storage method aimed at solving the above-mentioned technical problems. The following embodiments will specifically illustrate the data storage method described in this application.

[0057] The data storage method provided in this application embodiment can be applied to, for example... Figure 1 The computer device shown can be a terminal or a server, and its internal structure diagram can be as follows: Figure 1As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a data storage method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0058] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0059] In one embodiment, such as Figure 2 As shown, a data storage method is provided, which can be applied to... Figure 1 Taking a computer device as an example, the explanation includes the following steps:

[0060] S201, upon receiving a service request, allocates multiple logical partitions for the service request on the logical disk and allocates multiple target flash memory wafers for the service request on the physical disk.

[0061] The business request is a write request, which can be multiple different business requests from the same user or from different users. The logical disk includes multiple logical partitions (zones), which exist in a vertical mapping manner. The logical disk is associated with the physical disk, providing a contiguous address space that is mapped to logical partitions within it. Due to this mapping, the logical partitions are logically contiguous, but not necessarily contiguous on the physical wafers; they can be distributed across one or more wafers as needed. For example, the logical disk might correspond to 1.5GB of data, consisting of 16 logical partitions, each with 96MB of data. The physical disk is composed of multiple flash memory wafers. The target flash memory wafer is the one corresponding to the business request.

[0062] In this embodiment, the computer device can pre-configure different logical disks according to the service type. Each logical disk has logical partitions, and the number of logical partitions on different logical disks can be the same or different. The correspondence between service types and logical disks can then be saved to the logical disk management module. For example, service type 1 corresponds to logical disk 1, service type 2 corresponds to logical disk 2, and so on, with service type n corresponding to logical disk n. The correspondence between service types and logical partitions is stored on the logical disks. The service type can be determined using information such as data volume, user type, service type, service request lifecycle, service popularity value, and service bandwidth requirements. Figure 3 As shown, after receiving a service request, the computer device can determine one or more service types corresponding to the service request based on the relevant information of the service request. Then, it obtains the correspondence between the service types and logical disks, and determines one or more logical disks corresponding to the service request based on the correspondence. Finally, it allocates multiple logical partitions for the service request on the logical disks. After allocating multiple logical partitions for the service request, the computer device can determine the flash memory wafers corresponding to the multiple logical partitions on the physical disks as target flash memory wafers. Optionally, it can also allocate flash memory wafers corresponding to the logical partitions as target flash memory wafers. Optionally, it can also allocate flash memory wafers as target flash memory wafers based on the service concurrency. It should be noted that logical partitions in a logical disk are nominally allocated but not actually used before allocation. Before actual use, they can be adjusted and replaced (adjustment and replacement can only occur in logical partitions that are not actually used). Once a logical partition is used, it cannot be adjusted or replaced before being reclaimed.

[0063] S202 writes the data of the business request to multiple logical partitions, and stores the data in the multiple logical partitions to multiple target flash memory wafers according to the pressure status of multiple target flash memory wafers.

[0064] The data requested by the business is the data that the business requests, i.e., the data that needs to be written to the physical disk. The stress state includes low-pressure and high-pressure states. Low-pressure indicates that the bandwidth capacity of the target flash memory wafer can meet the business requirements, while high-pressure indicates that the bandwidth capacity of the target flash memory wafer cannot meet the business requirements.

[0065] In this embodiment, after the computer device allocates multiple logical partitions on the logical disk and multiple target flash memory wafers on the physical disk for the service request based on the above steps, for any logical disk, the identifier of the data requested by the service request can be written to the corresponding logical partition, that is, the identifier of the data is recorded in the logical partition. Optionally, the data requested by the service request can also be written to the corresponding logical partition, that is, the data itself is recorded in the logical partition. After the computer device writes the data of the service request to multiple logical partitions, it can store the data of the service request from the logical partitions to multiple target flash memory wafers in batches. After storing the data of each batch of service request to multiple target flash memory wafers, the pressure status of multiple target flash memory wafers can be monitored. Specifically, a pressure monitoring module can be set to detect the pressure status of each target flash memory wafer, and then the data in the multiple logical partitions can be stored to multiple target flash memory wafers according to the pressure status of multiple target flash memory wafers. During the data storage process, if there is a target flash memory wafer in a high-pressure state, a new flash memory wafer is created to replace the target flash memory wafer in the high-pressure state.

[0066] The data storage method provided in this application allocates multiple logical partitions for the service request on a logical disk and multiple target flash memory wafers for the service request on a physical disk upon receiving a service request. Then, the data of the service request is written to the multiple logical partitions, and the data in the multiple logical partitions is stored on the multiple target flash memory wafers according to their stress status. In this method, by dynamically allocating logical partitions for the service request, it can better adapt to the diversity and dynamism of the load, meet the performance needs of different users, and maximize the utilization of physical disk bandwidth by monitoring the wafer stress status in real time to guide wafer selection, thereby greatly improving data storage efficiency. Furthermore, by storing different types of service requests on different logical disks, it can reduce performance interference between various services and reduce garbage collection costs.

[0067] In one embodiment, a specific implementation method for data storage based on the pressure state of the flash memory wafer is also provided, such as... Figure 4 As shown, step S203 above, "data from multiple logical partitions to multiple target flash memory wafers according to the pressure state of multiple target flash memory wafers," includes:

[0068] S301: Obtain the parallelism of the business request and determine multiple target logical partitions from multiple logical partitions based on the parallelism.

[0069] The number of target logical partitions corresponds to the degree of parallelism. The number of target flash memory wafers also corresponds to the degree of parallelism. Different target logical partitions correspond to different target flash memory wafers.

[0070] In this embodiment, after receiving a service request, the computer device can analyze the service request, estimate the parallelism corresponding to the service request, and then determine multiple target logical partitions from multiple logical partitions and target flash memory wafers from multiple flash memory wafers based on the parallelism. For example, if the computer device determines the parallelism to be 4, it can further determine 4 logical partitions from multiple logical partitions as target logical partitions and 4 flash memory wafers from multiple flash memory wafers as target flash memory wafers. Optionally, after estimating the parallelism corresponding to the service request, the computer device can determine the number of target flash memory wafers and then allocate logical partitions to each target flash memory wafer. For example, it can first allocate 4 logical partitions located on 4 different wafers. When determining the target logical partitions and target flash memory wafers, the target logical partitions can be determined from front to back according to the position of the logical partitions on the logical disk, and the target flash memory wafers can be determined from front to back according to the position of the flash memory wafers on the physical disk. Optionally, the target logical partitions can also be determined according to the order of service priority, and the target flash memory wafers can be determined according to the capacity size of the flash memory wafers. Optionally, the same number of target logical partitions and target flash memory wafers as the concurrency level can be determined in other ways, which are not limited in the embodiments of this application.

[0071] S302, data in each target logical partition is stored in each target flash memory wafer, and data corresponding to other logical partitions in multiple logical partitions is stored in each target flash memory wafer according to the pressure status of each target flash memory wafer.

[0072] In this embodiment, after the computer device determines multiple target logical partitions and the target flash memory wafers corresponding to each target logical partition based on the above steps, it can sequentially store data from each target logical partition to each target flash memory wafer. After storage, it monitors the pressure status of each target flash memory wafer and then, based on the pressure status of each target flash memory wafer, stores data corresponding to other logical partitions in the multiple logical partitions to each target flash memory wafer. During data storage, if a target flash memory wafer is under high pressure, a new flash memory wafer is created to replace the one under high pressure. For example, the computer device can write sequentially from zone1 to zone4. When these four zones are full, the target zones are further adjusted based on the pressure status of each target flash memory wafer. The pressure status of the target flash memory wafer can be determined by the performance indicators of the target flash memory wafer during operation.

[0073] Specifically, such as Figure 5 As shown, step S302 above, "according to the pressure state of each target flash memory wafer, storing the data corresponding to other logical partitions in multiple logical partitions to each target flash memory wafer", includes:

[0074] S401, based on the pressure state of each target flash memory wafer, determine the first flash memory wafer among multiple target flash memory wafers that meets the storage conditions.

[0075] The storage condition refers to bandwidth capability. The first flash memory wafer is the target flash memory wafer that meets the storage condition.

[0076] In this embodiment, after obtaining the pressure state of each target flash memory wafer based on the above steps, the computer device can evaluate the pressure state and determine the first flash memory wafer that meets the storage conditions from among multiple target flash memory wafers. Specifically, the pressure state of each target flash memory wafer can be input into a prediction model for evaluation to obtain an evaluation result. If the evaluation result indicates that the current pressure state of the target flash memory wafer is a low-pressure state, then the target flash memory wafer is determined to meet the storage conditions; if the evaluation result indicates that the current pressure state of the target flash memory wafer is a high-pressure state, then the target flash memory wafer is determined not to meet the storage conditions. Optionally, the performance indicators in the pressure state of each target flash memory wafer can be compared with indicator thresholds to obtain an evaluation result.

[0077] S402, if the number of first flash memory wafers is less than the number of multiple target flash memory wafers, then a new second flash memory wafer is allocated, and data corresponding to other logical partitions in the multiple logical partitions are stored to each target flash memory wafer according to the first flash memory wafer and the second flash memory wafer.

[0078] In this embodiment, if the number of first flash memory wafers is less than the number of multiple target flash memory wafers, it indicates that there are target flash memory wafers that do not meet the storage conditions. In this case, new second flash memory wafers can be reallocated to replace the target flash memory wafers that do not meet the storage conditions. Then, based on the first and second flash memory wafers, new second flash memory wafers are determined, and the data corresponding to other logical partitions in the multiple logical partitions are stored on each target flash memory wafer. The process then returns to step S302 above, storing the data corresponding to other logical partitions in the multiple logical partitions on each target flash memory wafer. If the number of first flash memory wafers is equal to the number of multiple target flash memory wafers, it indicates that all current target flash memory wafers meet the storage conditions. The process continues to follow up on the current multiple target flash memory wafers, storing the data corresponding to other logical partitions in the multiple logical partitions on each target flash memory wafer. When allocating new second flash memory wafers, the computer device can, based on the pressure status of other flash memory wafers, assign the flash memory wafer with the lowest pressure as the new second flash memory wafer.

[0079] Optional, such as Figure 6 As shown, step S402 above, "data corresponding to other logical partitions in multiple logical partitions are stored to each target flash memory wafer according to the first flash memory wafer and the second flash memory wafer," includes:

[0080] S501 uses the first flash memory wafer and the second flash memory wafer as the target flash memory wafer.

[0081] In this embodiment of the application, after the computer device allocates a new second flash memory wafer based on the above steps, it can use the first flash memory wafer and the second flash memory wafer as new target flash memory wafers.

[0082] S502 determines multiple target logical partitions from other logical partitions based on the degree of parallelism, and returns to execute the step of storing data in each target logical partition to each target flash memory wafer, until the data in all logical partitions is stored in the physical disk.

[0083] In this embodiment of the application, after the computer device determines the target flash memory wafer based on the above steps, the computer device can determine multiple target logical partitions from other logical partitions according to the degree of parallelism, and return to execute step S302 until all logical partitions are stored in the physical disk.

[0084] For example, such as Figure 7 As shown, when the write bandwidth of a logical disk only requires the parallelism of four flash memory wafers to meet the requirements, the computer device can first allocate four zones located on four different wafers. Zones 1 to 4 are written sequentially. When these four zones are full, the computer device adjusts the zones according to the pressure status of each target flash memory wafer, that is, it determines the first flash memory wafer among multiple target flash memory wafers that meets the storage conditions. If all the current target flash memory wafers meet the storage conditions, that is, the bandwidth capacity of the current wafer can meet the user's needs, then four zones 5-8 located on the same wafer are allocated for use. If there are target flash memory wafers that do not meet the storage conditions, that is, there are target flash memory wafers whose bandwidth capacity cannot meet the user's needs, then the flash memory wafers need to be expanded. The computer device will select an additional zone 5 located on another wafer and allocate zones 5-9 for continued use. Among them, the wafer location of zone 5 will be selected from the wafer with the lowest current pressure. When the zones to be allocated are filled sequentially, they will be allocated again according to the current pressure status, until all 16 zones have been allocated.

[0085] The method described in this application embodiment monitors the pressure state of the flash memory wafer. When the pressure of the target flash memory wafer reaches a certain level, a new flash memory wafer can be automatically allocated, which can ensure the continuity and efficiency of data storage. Moreover, the above method can ensure that the pressure of each flash memory wafer is balanced, thereby avoiding overload of a certain wafer and affecting the overall performance.

[0086] In one embodiment, such as Figure 8 As shown, a method for determining the pressure state of each target flash memory wafer is also provided, the method comprising:

[0087] S601, obtain the processing time and data size of each target flash memory wafer in the data processing.

[0088] The processing time is the time difference between the two sampling points. The data size is the difference in data size between the two sampling points.

[0089] In this embodiment of the application, after the computer device stores the data in each target logical partition to each target flash memory wafer, it can obtain the processing time and data size of each target flash memory wafer in processing the data.

[0090] S602 determines the data processing latency of each target flash memory wafer based on the processing time and data size.

[0091] In this embodiment, after the computer device obtains the processing time t and data size s of each target flash memory wafer based on the above steps, it can divide the processing time and data size for any target flash memory wafer to obtain the data processing latency. Specifically, the computer device can periodically sample the total processing time and total size on each target flash memory wafer. The current stress state of the target flash memory can be determined by the time difference (time) and size difference (data) between two sampling points. For example, if three requests are processed between two sampling points, with processing times of t1, t2, and 3, and sizes of s1, s2, and s3, then the cumulative total processing time is t = t1 + t2 + t3, the size is s = s1 + s2 + s3, and the current data processing latency is t / s.

[0092] S603 determines the pressure state of each target flash memory wafer based on the data processing latency of each target flash memory wafer.

[0093] The lower the data processing latency, the lower the pressure on the wafer. Pressure states include high-pressure and low-pressure states.

[0094] In this embodiment, a preset pressure threshold for the flash memory wafer can be set in advance according to business needs. After the computer device obtains the data processing latency of each target flash memory wafer based on the above steps, for any target flash memory wafer, the data processing latency can be compared with the preset pressure threshold. If the data processing latency is greater than the preset pressure threshold, the pressure state of the target flash memory wafer is determined to be high pressure; if the data processing latency is not greater than the preset pressure threshold, the pressure state of the target flash memory wafer is determined to be low pressure. It should be noted that the pressure on flash memory wafers with exhausted internal logical partitions and flash memory wafers with no allocated logical partitions is zero.

[0095] The method described in this application embodiment can quickly and accurately assess the stress state of each target flash memory wafer by monitoring the processing time and data size of each wafer. Furthermore, by analyzing the stress state of each flash memory wafer, resources can be better allocated, preventing overload of certain wafers and thus improving the overall system storage efficiency.

[0096] In one embodiment, such as Figure 9 As shown, the above data storage method also includes:

[0097] S701, determine whether the business request has an allocated logical area.

[0098] In this embodiment of the application, when a computer device receives a service request, it can determine the service type corresponding to the service request based on the relevant information of the service request, and determine whether the service request has an allocated logical area based on the service type.

[0099] S702, if it is determined that the business request has an allocated logical area, then execute the step of allocating multiple logical partitions for the business request on the logical disk.

[0100] In this embodiment of the application, if it is determined that the service request has an allocated logical area, the step of "allocating multiple logical partitions for the service request on the logical disk" in S201 is executed.

[0101] S703, if it is determined that there is no allocated logical area for the business request, then allocate a logical area for the business request and execute the step of allocating multiple logical partitions for the business request on the logical disk.

[0102] In this embodiment, if it is determined that no logical area has been allocated for the service request, a logical area is allocated for the service request first, and then the step of "allocating multiple logical partitions for the service request on the logical disk" in S201 is executed. Specifically, when a user's service request is issued, the computer device first determines whether a logical disk has been allocated for the service request. If it has been allocated, the logical disk is used directly for data storage. If it has not been allocated, the corresponding concurrency is estimated based on the corresponding user and request identifier, and a logical disk is allocated. The logical disk will first pre-allocate logical partitions corresponding to the number of concurrency levels. When it is full, it will determine whether the pressure of the current flash memory wafer meets the requirements. If it does, it will continue to pre-allocate on the original wafer; if it does not, it will expand to a new wafer for pre-allocation. For the read and write operations of logical partitions, the computer device will statistically analyze the pressure status at the wafer level to guide the selection of logical partition allocation. When selecting logical partitions, logical partitions on wafers with lower pressure are preferred.

[0103] The method described in this application embodiment can more quickly locate the data storage location by pre-determining whether the business request has already been allocated a logical area, thereby reducing the time spent searching and allocating new storage space and improving storage efficiency.

[0104] In summary, based on all the above embodiments, a data storage method is also provided, such as... Figure 10 As shown, the method includes:

[0105] S801: Upon receiving a service request, determine whether the service request has an allocated logical partition. If it is determined that the service request has an allocated logical partition, then execute step S803. If it is determined that the service request does not have an allocated logical partition, then execute step S802.

[0106] S802 allocates a logical area for business requests.

[0107] The S803 allocates multiple logical partitions for service requests on a logical disk and multiple target flash memory wafers for service requests on a physical disk.

[0108] S804 writes the data of the business request to multiple logical partitions, obtains the parallelism of the business request, and determines multiple target logical partitions from the multiple logical partitions based on the parallelism.

[0109] S805 stores the data corresponding to each target logical partition to each target flash memory wafer, and obtains the processing time and data size of each target flash memory wafer in processing the data.

[0110] S806 determines the data processing latency of each target flash memory wafer based on the processing time and data size.

[0111] S807 determines the pressure state of each target flash memory wafer based on the data processing latency of each target flash memory wafer. The pressure state includes a high-pressure state and a low-pressure state.

[0112] S808 determines the first flash memory wafer that meets the storage conditions among multiple target flash memory wafers based on the pressure state of each target flash memory wafer.

[0113] S809, if the number of first flash memory wafers is less than the number of multiple target flash memory wafers, then allocate a new second flash memory wafer and use the first flash memory wafer and the second flash memory wafer as target flash memory wafers.

[0114] S810 determines multiple target logical partitions from other logical partitions based on the degree of parallelism and returns to execute the steps of S805 until the data in all logical partitions is stored in the physical disk.

[0115] The methods described in each of the above steps have been described in the foregoing embodiments. For details, please refer to the foregoing descriptions. They will not be repeated here.

[0116] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0117] Based on the same inventive concept, this application also provides a data storage device for implementing the data storage method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more data storage device embodiments provided below can be found in the limitations of the data storage method described above, and will not be repeated here.

[0118] In one embodiment, such as Figure 11 As shown, a data storage device is provided, comprising:

[0119] The allocation module 11 is used to allocate multiple logical partitions on the logical disk for the service request and to allocate multiple target flash memory wafers on the physical disk for the service request when a service request is received.

[0120] Storage module 12 is used to write data from business requests to multiple logical partitions, and to store data from multiple logical partitions to multiple target flash memory wafers according to the stress status of multiple target flash memory wafers.

[0121] In one embodiment, the above-mentioned storage module includes:

[0122] The determination unit is used to obtain the parallelism of the business request and determine multiple target logical partitions from multiple logical partitions based on the parallelism.

[0123] The storage unit is used to store data from each target logical partition to each target flash memory wafer, and to store data corresponding to other logical partitions in multiple logical partitions to each target flash memory wafer according to the pressure status of each target flash memory wafer.

[0124] In one embodiment, the above-mentioned storage unit includes:

[0125] The determination sub-unit is used to determine the first flash memory wafer that meets the storage conditions among multiple target flash memory wafers based on the pressure state of each target flash memory wafer.

[0126] The storage subunit is used to allocate a new second flash memory wafer if the number of first flash memory wafers is less than the number of multiple target flash memory wafers, and to store the data corresponding to other logical partitions in multiple logical partitions to each target flash memory wafer according to the first flash memory wafer and the second flash memory wafer.

[0127] In one embodiment, the aforementioned storage subunit is specifically used to use the first flash memory wafer and the second flash memory wafer as target flash memory wafers; determine multiple target logical partitions from other logical partitions according to the degree of parallelism, and return to perform the step of storing data in each target logical partition to each target flash memory wafer, until the data in all logical partitions is stored in the physical disk.

[0128] In one embodiment, the above-mentioned data storage device further includes:

[0129] The acquisition module is used to acquire the processing time and data size of each target flash memory wafer during data processing.

[0130] The first determining module is used to determine the data processing latency of each target flash memory wafer based on the processing time and data size.

[0131] The second determining module is used to determine the pressure state of each target flash memory wafer based on the data processing latency of each target flash memory wafer; the pressure state includes a high-pressure state and a low-pressure state.

[0132] In one embodiment, the above-mentioned data storage device further includes:

[0133] The third determination module is used to determine whether a business request has an allocated logical partition.

[0134] The fourth determination module is used to perform the step of allocating multiple logical partitions for the business request on the logical disk if it is determined that the business request has an allocated logical partition.

[0135] The fifth determination module is used to execute the step of writing the data of the business request to multiple logical partitions if it is determined that the business request does not have an allocated logical partition.

[0136] Each module in the aforementioned data storage device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0137] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0138] Upon receiving a business request, multiple logical partitions are allocated for the business request on the logical disk, and multiple target flash memory wafers are allocated for the business request on the physical disk;

[0139] The data of the business request is written to multiple logical partitions, and the data in the multiple logical partitions is stored on multiple target flash memory wafers according to the stress status of multiple target flash memory wafers.

[0140] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0141] Obtain the parallelism of the business requests, and determine multiple target logical partitions from multiple logical partitions based on the parallelism.

[0142] The data in each target logical partition is stored in each target flash memory wafer, and the data corresponding to other logical partitions in multiple logical partitions is stored in each target flash memory wafer according to the pressure status of each target flash memory wafer.

[0143] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0144] Based on the pressure state of each target flash memory wafer, the first flash memory wafer that meets the storage conditions among multiple target flash memory wafers is determined;

[0145] If the number of first flash memory wafers is less than the number of multiple target flash memory wafers, then a new second flash memory wafer is allocated, and based on the first flash memory wafer and the second flash memory wafer, the data corresponding to other logical partitions in the multiple logical partitions are stored to each target flash memory wafer.

[0146] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0147] The first flash memory wafer and the second flash memory wafer are used as target flash memory wafers;

[0148] Based on the degree of parallelism, multiple target logical partitions are determined from other logical partitions, and the process of storing data from each target logical partition to each target flash wafer is returned to be executed until the data from all logical partitions is stored in the physical disk.

[0149] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0150] Obtain the processing time and data size for each target flash memory wafer;

[0151] The data processing latency of each target flash memory wafer is determined based on the processing time and data size.

[0152] The pressure state of each target flash memory wafer is determined based on the data processing latency of each target flash memory wafer; the pressure state includes high pressure state and low pressure state.

[0153] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0154] Determine whether the service request exists in an allocated logical area;

[0155] If it is determined that the service request has an allocated logical area, then the step of allocating multiple logical partitions for the service request on the logical disk is executed;

[0156] If it is determined that the service request does not have an allocated logical area, then the logical area is allocated for the service request, and the step of allocating multiple logical partitions for the service request on the logical disk is executed.

[0157] The computer device provided in the above embodiments has a similar implementation principle and technical effect to the above method embodiments, and will not be described again here.

[0158] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0159] Upon receiving a business request, multiple logical partitions are allocated for the business request on the logical disk, and multiple target flash memory wafers are allocated for the business request on the physical disk;

[0160] The data of the business request is written to multiple logical partitions, and the data in the multiple logical partitions is stored on multiple target flash memory wafers according to the stress status of multiple target flash memory wafers.

[0161] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0162] Obtain the parallelism of the business requests, and determine multiple target logical partitions from multiple logical partitions based on the parallelism.

[0163] The data in each target logical partition is stored in each target flash memory wafer, and the data corresponding to other logical partitions in multiple logical partitions is stored in each target flash memory wafer according to the pressure status of each target flash memory wafer.

[0164] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0165] Based on the pressure state of each target flash memory wafer, the first flash memory wafer that meets the storage conditions among multiple target flash memory wafers is determined;

[0166] If the number of first flash memory wafers is less than the number of multiple target flash memory wafers, then a new second flash memory wafer is allocated, and based on the first flash memory wafer and the second flash memory wafer, the data corresponding to other logical partitions in the multiple logical partitions are stored to each target flash memory wafer.

[0167] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0168] The first flash memory wafer and the second flash memory wafer are used as target flash memory wafers;

[0169] Based on the degree of parallelism, multiple target logical partitions are determined from other logical partitions, and the process of storing data from each target logical partition to each target flash wafer is returned to be executed until the data from all logical partitions is stored in the physical disk.

[0170] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0171] Obtain the processing time and data size for each target flash memory wafer;

[0172] The data processing latency of each target flash memory wafer is determined based on the processing time and data size.

[0173] The pressure state of each target flash memory wafer is determined based on the data processing latency of each target flash memory wafer; the pressure state includes high pressure state and low pressure state.

[0174] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0175] Determine whether the service request exists in an allocated logical area;

[0176] If it is determined that the service request has an allocated logical area, then the step of allocating multiple logical partitions for the service request on the logical disk is executed;

[0177] If it is determined that the service request does not have an allocated logical area, then the logical area is allocated for the service request, and the step of allocating multiple logical partitions for the service request on the logical disk is executed.

[0178] The computer-readable storage medium provided in the above embodiments has a similar implementation principle and technical effect to the above method embodiments, and will not be described again here.

[0179] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0180] Upon receiving a business request, multiple logical partitions are allocated for the business request on the logical disk, and multiple target flash memory wafers are allocated for the business request on the physical disk;

[0181] The data of the business request is written to multiple logical partitions, and the data in the multiple logical partitions is stored on multiple target flash memory wafers according to the stress status of multiple target flash memory wafers.

[0182] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0183] Obtain the parallelism of the business requests, and determine multiple target logical partitions from multiple logical partitions based on the parallelism.

[0184] The data in each target logical partition is stored in each target flash memory wafer, and the data corresponding to other logical partitions in multiple logical partitions is stored in each target flash memory wafer according to the pressure status of each target flash memory wafer.

[0185] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0186] Based on the pressure state of each target flash memory wafer, the first flash memory wafer that meets the storage conditions among multiple target flash memory wafers is determined;

[0187] If the number of first flash memory wafers is less than the number of multiple target flash memory wafers, then a new second flash memory wafer is allocated, and based on the first flash memory wafer and the second flash memory wafer, the data corresponding to other logical partitions in the multiple logical partitions are stored to each target flash memory wafer.

[0188] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0189] The first flash memory wafer and the second flash memory wafer are used as target flash memory wafers;

[0190] Based on the degree of parallelism, multiple target logical partitions are determined from other logical partitions, and the process of storing data from each target logical partition to each target flash wafer is returned to be executed until the data from all logical partitions is stored in the physical disk.

[0191] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0192] Obtain the processing time and data size for each target flash memory wafer;

[0193] The data processing latency of each target flash memory wafer is determined based on the processing time and data size.

[0194] The pressure state of each target flash memory wafer is determined based on the data processing latency of each target flash memory wafer; the pressure state includes high pressure state and low pressure state.

[0195] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0196] Determine whether the service request exists in an allocated logical area;

[0197] If it is determined that the service request has an allocated logical area, then the step of allocating multiple logical partitions for the service request on the logical disk is executed;

[0198] If it is determined that the service request does not have an allocated logical area, then the logical area is allocated for the service request, and the step of allocating multiple logical partitions for the service request on the logical disk is executed.

[0199] The computer program product provided in the above embodiments has a similar implementation principle and technical effect to the above method embodiments, and will not be described again here.

[0200] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0201] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0202] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data storage method, characterized in that, The method includes: Upon receiving a service request, multiple logical partitions are allocated for the service request on the logical disk, and multiple target flash memory wafers are allocated for the service request on the physical disk; The data of the service request is written into the multiple logical partitions, and the data in the multiple logical partitions is stored in the multiple target flash memory wafers according to the pressure status of the multiple target flash memory wafers.

2. The method according to claim 1, characterized in that, The step of storing data from the multiple logical partitions to the multiple target flash memory wafers according to the pressure state of the multiple target flash memory wafers includes: Obtain the parallelism of the business request, and determine multiple target logical partitions from the multiple logical partitions based on the parallelism; The data corresponding to each of the target logical partitions is stored in each of the target flash memory wafers, and the data corresponding to other logical partitions among the plurality of logical partitions is stored in each of the target flash memory wafers according to the pressure state of each of the target flash memory wafers.

3. The method according to claim 2, characterized in that, The step of storing data corresponding to other logical partitions in the plurality of logical partitions to each of the target flash memory wafers according to the pressure state of each of the target flash memory wafers includes: Based on the pressure state of each target flash memory wafer, determine the first flash memory wafer among the plurality of target flash memory wafers that meets the storage conditions; If the number of the first flash memory wafers is less than the number of the plurality of target flash memory wafers, then a new second flash memory wafer is allocated, and data corresponding to other logical partitions in the plurality of logical partitions are stored in each of the target flash memory wafers according to the first flash memory wafers and the second flash memory wafers.

4. The method according to claim 3, characterized in that, The step of storing data corresponding to other logical partitions in the plurality of logical partitions to each of the target flash memory wafers based on the first flash memory wafer and the second flash memory wafer includes: The first flash memory wafer and the second flash memory wafer are used as the target flash memory wafer; Based on the parallelism, the plurality of target logical partitions are determined from the other logical partitions, and the process of storing the data in each of the target logical partitions to each of the target flash memory wafers is returned to be executed until the data in all logical partitions is stored in the physical disk.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtain the processing time and data size of each target flash memory wafer in processing the data; Based on the processing time and the data size, the data processing latency of each target flash memory wafer is determined; The pressure state of each target flash memory wafer is determined based on the data processing latency of each target flash memory wafer; the pressure state includes a high-pressure state and a low-pressure state.

6. The method according to any one of claims 1-4, characterized in that, The method further includes: Determine whether the service request exists in an allocated logical area; If it is determined that the service request has an allocated logical area, then the step of allocating multiple logical partitions for the service request on the logical disk is executed; If it is determined that the service request does not have an allocated logical area, then the logical area is allocated for the service request, and the step of allocating multiple logical partitions for the service request on the logical disk is executed.

7. A data storage device, characterized in that, The device includes: The allocation module is used to allocate multiple logical partitions on a logical disk for a service request upon receiving a service request, and to allocate multiple target flash memory wafers on a physical disk for the service request. The storage module is used to write the data of the business request into the plurality of logical partitions, and to store the data in the plurality of logical partitions into the plurality of target flash memory wafers according to the pressure status of the plurality of target flash memory wafers.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.