Data storage method, device, system and equipment based on ZNS-SSD

By using the host and SSD side schedulers and monitors on the host side and SSD side in the ZNS SSD system to obtain and transmit QoS information, the problem of opaque QoS information in the SSD is solved, and accurate data storage area selection is achieved and storage efficiency is improved.

CN119025014APending Publication Date: 2024-11-26BEIJING SUPERSTRING ACAD OF MEMORY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310611968.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the existing ZNS SSD technology, the quality parameter (QoS) information inside the SSD is not transparent, making it difficult for the host-side system software to obtain accurate QoS information, affecting the efficiency and performance of data storage.

Method used

By setting a scheduler and a monitor on the host side and the SSD side, acquiring and transmitting QoS information of each area, the host side scheduler determines a storage area for writing data based on these information, and sends a write instruction to the SSD side for storage.

Benefits of technology

The data storage strategy based on precise QoS information is realized, which improves the efficiency and performance of data writing, and provides a reliable basis for data placement for applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025014A_ABST
    Figure CN119025014A_ABST
Patent Text Reader

Abstract

The invention relates to a data storage method, device, system and equipment based on ZNS-SSD. The method comprises the steps of receiving to-be-written data in response to a write-in request sent by a requester, selecting QoS information of each region associated with the write-in request from pre-stored service information, determining a to-be-written region according to the associated QoS information, and writing the to-be-written data into the to-be-written region. According to the application, the service information of each region can be obtained based on the monitor in the controller, and the region meeting the storage requirement is provided for the user based on the service information according to the sent write-in request, so that a reliable basis is provided for developing a customized data placement strategy for an application program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage technology, and in particular to a data storage method, device, system and equipment based on ZNS-SSD. Background Art

[0002] SSD (Solid State Drive) is a new type of solid state drive that supports zoned namespace (Zoned Namespace, ZNS). The host and SSD can interact with each other based on the ZNS protocol. ZNS divides the namespace in an SSD into multiple zones ( Zone ), each Zone is an independent read / write unit that can be read in any order but needs to be written in order. These features allow ZNS SSD to improve its internal data placement, thereby achieving higher performance through higher write throughput, higher Quality of Service (QoS), and larger capacity.

[0003] The NVMe standard is an interface protocol for PCI-E solid-state drives. The construction method of each zone in the SSD is determined by the manufacturer of the controller in the SSD. The construction of the zone is not clearly defined in the NVMe protocol; the mapping of the zone's logical address to the SSD physical address is inside the controller and is handled by the flash translation layer (FTL). The FTL's address mapping of the zone may change, resulting in the QoS information of each zone not necessarily being exactly the same.

[0004] In order to customize the data placement rules of the application and provide a basis for application development, the system software on the host side needs to measure the QoS information of each zone; however, the internal implementation of the SSD is not transparent to the system software and is easily interfered with, resulting in the system software being unable to obtain accurate QoS information. Summary of the invention

[0005] Based on this, it is necessary to provide a data storage method, device, system and equipment based on ZNS-SSD to address the above technical problems, so as to solve the problem in the prior art that the internal implementation of SSD is opaque to the system software and is easily interfered with, resulting in the system software on the host side being unable to obtain accurate quality parameters.

[0006] In a first aspect, the present application provides a data storage method based on ZNS-SSD, which is applied to a host side. The method comprises:

[0007] The scheduler on the host side receives the data to be written in response to the write request sent by the requester, selects QoS information associated with the write request from the pre-stored service information, and determines the area to be written according to the selected associated QoS information;

[0008] Sending a write instruction carrying the data to be written and the area to be written to the SSD side, so that the SSD side executes the write instruction and stores the data to be written in the area to be written;

[0009] The service information includes QoS information of each area on the SSD side, and is obtained by a monitor in a controller disposed on the SSD side, and the service information is provided to the scheduler through an interface, and the scheduler stores the service information in a memory.

[0010] In one of the embodiments, the service information further includes the area identifier of each area on the SSD side, and the QoS information includes multiple types of quality parameters, each type of quality parameter corresponds to a unique type identifier;

[0011] The selecting the QoS information associated with the write request from the pre-stored service information, and determining the area to be written according to the selected associated QoS information, comprises:

[0012] parsing a first screening condition carried by the write request;

[0013] Selecting, from the service information, a quality parameter that meets the first screening condition as the associated QoS information;

[0014] Determining the area to be written according to the area identifier corresponding to the selected quality parameter that meets the first screening condition;

[0015] If a type identifier of the quality parameter is the same as a type identifier corresponding to the write request, and a value of the quality parameter satisfies a first threshold range, then it is considered that the quality parameter meets the first screening condition.

[0016] In one of the embodiments, the service information also includes the pointer position of each area on the SSD side;

[0017] The determining the area to be written according to the area identifier corresponding to the selected quality parameter meeting the first screening condition includes:

[0018] According to the selected area identifier corresponding to the quality parameter meeting the first screening condition, querying the pointer position of the area corresponding to the area identifier;

[0019] According to the pointer position and the length of the data to be written, each area whose capacity meets the length requirement is selected as the area to be written.

[0020] In one of the embodiments, when there are multiple type identifiers corresponding to the write request, selecting the QoS information associated with the write request and determining the area to be written according to the selected associated QoS information further includes:

[0021] parsing the second screening condition carried by the write request and the importance of each type identifier corresponding to the write request;

[0022] Selecting, from the quality parameters meeting the first screening condition, a quality parameter meeting the second screening condition as the associated QoS information;

[0023] Determining the area to be written according to the area identifier corresponding to the selected quality parameter that meets the second screening condition;

[0024] If the type identifier of a quality parameter that meets the first screening condition has the highest importance and the value of the quality parameter satisfies the second threshold range, it is considered that the second screening condition is met.

[0025] In one embodiment, the responding to the write request sent by the requester includes:

[0026] When the scheduler on the host side receives write requests sent by multiple requesters, it obtains the priority carried in each of the write requests;

[0027] The requesting parties are responded to in descending order of priority.

[0028] In one embodiment, before the scheduler on the host side responds to the write request sent by the requester, it includes:

[0029] After receiving the operation request sent by the requester, the scheduler confirms whether the operation request is a write request; wherein the operation request includes a read request and a write request;

[0030] When the operation request is a write request, respond to the write request.

[0031] In a second aspect, the present application also provides a data storage device. The device comprises:

[0032] A scheduler, arranged in the host, for storing service information in the memory; wherein the service information includes QoS information of each area on the SSD side, and is obtained by a monitor in a controller arranged on the SSD side and provided to the scheduler through an interface;

[0033] The scheduler is also used to respond to a write request sent by the requesting party, receive the data to be written, select QoS information associated with the write request from the pre-stored service information, and determine the area to be written based on the selected associated QoS information; send a write instruction carrying the data to be written and the area to be written to the SSD side, so that the SSD side executes the write instruction and stores the data to be written in the area to be written.

[0034] In a third aspect, the present application also provides a data storage method based on ZNS-SSD, which is applied to the SSD side. The method includes:

[0035] A monitor in the controller on the SSD side obtains service information of each area on the SSD side at a preset interval, and transmits the service information to the scheduler on the host side through an interface so that the scheduler stores it in a memory;

[0036] The controller receives a write instruction sent by the scheduler and carrying the data to be written and the area to be written, executes the write instruction, and stores the data to be written in the area to be written.

[0037] In one of the embodiments, the service information further includes area identifiers of each area on the SSD side, and the method further includes:

[0038] The ZNS controller on the SSD side monitors the working status of the SSD side, and when a preset condition is met, rebuilds the mapping between the logical address of each area and the physical address;

[0039] Update the area identification of each area after the reconstruction mapping;

[0040] Among them, if a garbage collection mechanism and / or a region reset occurs, it is considered that the preset condition is met.

[0041] In a fourth aspect, the present application further provides a data storage device. The device comprises:

[0042] A controller is provided on the SSD side, and is used to execute the write instruction carrying the data to be written and the area to be written sent by the scheduler on the host side, and store the data to be written in the area to be written;

[0043] The monitor is arranged in the ZNS controller, and is used to obtain the service information of each area on the SSD side at a preset time interval, and transmit the service information to the scheduler on the host side through an interface, so that the scheduler stores it in the memory.

[0044] In a fifth aspect, the present application also provides a data storage method based on ZNS-SSD. The method comprises:

[0045] The monitor in the controller on the SSD side obtains the service information of each area on the SSD side at a preset interval, and transmits the service information to the scheduler on the host side through an interface; wherein the service information includes QoS information of each area on the SSD side;

[0046] The scheduler saves the service information into a memory;

[0047] The scheduler selects QoS information associated with the write request from pre-stored service information in response to the write request sent by the requester, and determines the area to be written according to the selected associated QoS information; and sends a write instruction carrying the data to be written and the area to be written to the SSD side;

[0048] The controller executes the write instruction and stores the data to be written into the area to be written.

[0049] In a sixth aspect, the present application also provides a data storage system. The system comprises:

[0050] A scheduler, arranged in the host, for storing service information in the memory of the host; wherein the service information includes QoS information of each area on the SSD side;

[0051] The scheduler is further configured to, in response to a write request sent by the requester, select QoS information associated with the write request from the service information, and determine the area to be written according to the selected associated QoS information; and send a write instruction carrying the data to be written and the area to be written to the SSD side;

[0052] A controller, disposed on the SSD side, configured to execute the write instruction after receiving the write instruction, and store the data to be written into the area to be written;

[0053] The monitor is arranged in the controller, and is used for obtaining the service information of each area on the SSD side at preset intervals, and transmitting the service information to the scheduler through an interface.

[0054] In a seventh aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method steps described in any one of the first aspect, the method steps described in the third aspect, or the method steps described in the fifth aspect when executing the computer program.

[0055] In an eighth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the method steps described in any one of the first aspect, the method steps described in the third aspect, or the method steps described in the fifth aspect are implemented.

[0056] The above-mentioned data storage method, device, system and equipment based on ZNS-SSD have at least the following advantages:

[0057] The present application responds to a write request sent by the requester, receives the data to be written, selects the QoS information of each area associated with the write request from the pre-stored service information, determines the area to be written according to the associated QoS information, and writes the data to be written into the area to be written. The present application can obtain the service information of each area based on the monitor in the controller, and provide the user with an area that meets the storage requirements based on the service information according to the write request sent, providing a reliable basis for the application to develop a customized data placement strategy. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0060] Figure 1 is a structural block diagram of a data storage system in one embodiment;

[0061] Figure 2 is a structural block diagram of a data storage system in another embodiment;

[0062] Figure 3 A schematic diagram of a data storage method based on ZNS-SSD in one embodiment;

[0063] Figure 4 A schematic diagram of sending multiple write requests to a host in one embodiment;

[0064] Figure 5 A schematic diagram of a process for determining a to-be-written area in one embodiment;

[0065] Figure 6 A schematic diagram of a flow chart for determining a region to be written in another embodiment;

[0066] Figure 7 A schematic diagram of a flow chart for determining a region to be written in another embodiment;

[0067] Figure 8 A schematic diagram of a flow chart of a data storage method based on ZNS-SSD in another embodiment;

[0068] Fig. 9 A schematic diagram of a flow chart of a data storage method based on ZNS-SSD in another embodiment;

[0069] Fig.10 A schematic diagram of a flow chart of a data storage method based on ZNS-SSD in another embodiment;

[0070] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0071] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0072] While some exemplary embodiments of the present invention have been described for the purpose of illustration, it should be understood that the present invention may be implemented in other ways not specifically shown in the drawings.

[0073] See also Figure 1, an embodiment of the present application provides a data storage system, which includes a scheduler arranged on the host side, a controller arranged on the solid-state hard disk (SSD) side, and a monitor arranged in the controller. It should be understood that the SSD is a hard disk made of a solid-state electronic storage chip array, which is composed of a control unit and a storage unit (FLASH chip, DRAM chip). Storage devices enable users to store and retrieve data. Examples of storage devices include non-volatile memory devices. An example of a non-volatile memory is a flash memory (NAND). NAND flash memory needs to be erased in blocks. New data can be written to the erased blocks, and each block has a limit on the number of erases. In a storage device using NAND flash memory, due to the physical property constraints of NAND, a flash translation layer (FTL) is provided inside the control unit. The FTL inside the controller is responsible for converting the logical addresses of each area to the SSD physical address to achieve the purpose of balancing NAND wear. Furthermore, ZNS is an SSD namespace architecture. The non-volatile memory in the SSD is divided into fixed-size groups of logical addresses or zones by ZNS. Each zone can be used for specific applications, such as Figure 1 It is divided into area 0, area 1...area N. Since the composition method of each area is determined by the manufacturer, the QoS information of different areas may be different. In order to obtain accurate QoS information during the application development process and provide a basis for customizing the data placement rules of the application, the data storage system of the embodiment of the present application specifically includes:

[0074] The monitor is set in the controller and is used to obtain the service information of each area on the SSD side at preset intervals, and transmit the service information to the scheduler through the interface. The service information includes the QoS information of each area on the SSD side. It should be understood that in the partition namespace command set specification of the NVMe standard, there is a definition of a zone descriptor, which allows the controller to add additional fields to describe the performance of each area, such as IOPS (Input / Output Operations Per Second) average performance test, and average read / write latency, etc.

[0075] The scheduler is set in the host and is used to store the service information in the memory of the host. Furthermore, the scheduler is also used to respond to the write request sent by the requester, select the QoS information associated with the write request from the service information, and determine the area to be written according to the selected associated QoS information; and send a write instruction carrying the data to be written and the area to be written to the SSD side. It should be understood that the scheduler in this embodiment is a software program running on the host side, which belongs to the system software on the host side. For the convenience of explanation, it is recorded as a scheduler.

[0076] The controller is arranged on the SSD side, and is used for executing the write instruction after receiving the write instruction, and storing the data to be written into the area to be written.

[0077] See also Figure 2 , a hardware interface is provided between the host and the SSD, or a network cluster with a hardware interface, through which the host can communicate with the SSD and realize data transmission, for example, the host can respond to the service request of the requester and perform a read or write operation on the SSD; wherein the service request includes a write request and a read request. Exemplarily, when the service request is a write request, the host responds to the write request and sends a write instruction carrying the data to be written and the area to be written to the controller of the SSD through the hardware interface, so that the controller stores the data to be written in the area to be written; further, the host can obtain the measurement description of QoS for each area in the SSD through the interface, so that each area of ​​the ZNS can be used indiscriminately, providing a basis for users to develop customized data placement strategies.

[0078] In the above data storage system, the controller obtains the service information of each area in advance, and transmits the service information to the scheduler on the host side through the interface. The scheduler responds to the write request sent by the requester, receives the data to be written, and selects the QoS information of each area associated with the write request from the pre-stored service information, determines the area to be written according to the associated QoS information, and the controller writes the data to be written into the area to be written. The present application can obtain the service information of each area based on the monitor in the controller, and according to the write request sent, provide the user with an area that meets the storage requirements based on the service information, providing a reliable basis for the application to develop customized data placement strategies.

[0079] See also Figure 3 In a feasible embodiment, the present application embodiment provides a data storage method based on ZNS-SSD, which is applied to the host side and specifically includes the following steps:

[0080] Step S302: The scheduler on the host side responds to the write request sent by the requester, receives the data to be written, selects QoS information associated with the write request from the pre-stored service information, and determines the area to be written according to the selected associated QoS information.

[0081] Step S304, sending a write instruction carrying the data to be written and the area to be written to the SSD side, so that the SSD side executes the write instruction and stores the data to be written in the area to be written.

[0082] Specifically, IP networks have transformed from traditional single data networks to multi-service networks that integrate data, voice, video, and games. The data carried in the network has increased exponentially, and these services have extremely high requirements for network bandwidth and latency. Due to the difficulty, long cycle, and high cost of hardware chip research and development, bandwidth has gradually become a bottleneck for the development of the Internet, resulting in network congestion, packet loss, and reduced service quality. In severe cases, the service is even unavailable. In order to solve the above problems, QoS (Quality of Service) is usually used to allocate bandwidth to various services in a balanced manner under limited bandwidth resources, and to provide end-to-end service quality assurance for various services according to different requirements. Generally speaking, QoS information includes multiple types of quality parameters, and each type of quality parameter corresponds to a unique type identifier. For example, quality parameters include transmission bandwidth, transmission latency, transmission jitter, data packet loss rate, service life cycle of each area, and usage time of each area. In actual applications, a type identifier can be assigned to each type of quality parameter in advance according to the agreement. When a write request is received, the quality parameter required for the write request can be obtained according to the type identifier corresponding to the write request.

[0083] Specifically in this embodiment, the monitor set in the controller monitors the service information of each area in the solid state drive in real time, and transmits the service information of each area to the scheduler of the host through the interface. The scheduler stores the service information in the memory, and the service information can be stored in a variety of forms according to the memory structure, such as a zone table (Zone scheduler), a list or a tree, etc. Among them, the service information includes the QoS information of each area, the pointer position of each area, and the area identification of each area.

[0084] Exemplarily, the host can obtain the QoS information of each area from the monitor according to preset rules, such as obtaining the QoS information of all areas at preset time intervals. In another example, when the application needs to write multiple types of data at the same time, such as bandwidth and latency, the importance of bandwidth and latency can be sorted. If the importance of latency is higher than bandwidth, the latency data of each area is obtained at a first preset time interval, and the bandwidth data of each area is obtained at a second preset time interval, and the length of the first preset time is less than the length of the second preset time. It should be understood that in addition to pre-storing QoS information according to preset rules, the monitor can also obtain QoS information within a preset time after receiving a write request in real time according to host instructions, and store it in the memory on the host side.

[0085] See also Figure 4 , based on the development needs, the application sends an operation request to the system software of the host, wherein the application can run on the host, or can run on the terminal and communicate with the host through the network. Specifically in this embodiment, the application sends an operation request to the scheduler on the host side. Exemplarily, the operation request includes a write request and a read request. In the case where the operation request is a write request, when the scheduler on the host side receives the write request and the data to be written, it selects the QoS information of each area associated with the write request from the pre-stored service information to determine the area to be written, and sends a write instruction carrying the data to be written and the area to be written to the controller on the SSD side, so that the controller responds to the write instruction and stores the data to be written transmitted by the application in the corresponding area to be written; wherein the above-mentioned write instruction carries the area identifier of the area to be written. Exemplarily, in the case where the operation request is a read request, the scheduler on the host side sends a read instruction to the controller on the SSD side according to the read request, so that the controller retrieves the corresponding data and feeds it back to the application through the interface.

[0086] Optionally, when multiple applications interact with the host at the same time, each application should set a priority in advance according to the project development requirements. When multiple applications act as requesters at the same time and send multiple write requests to the host, the host obtains the priority carried in each write request and responds to each requester in order from high to low priority.

[0087] The above-mentioned data storage method based on ZNS-SSD responds to the write request sent by the requester, receives the data to be written, selects the QoS information of each area associated with the write request from the pre-stored service information, determines the area to be written according to the associated QoS information, and writes the data to be written into the area to be written. The present application can obtain the service information of each area based on the monitor in the controller, and according to the write request sent, provides the user with an area that meets the storage requirements based on the service information, providing a reliable basis for the application to develop customized data placement strategies.

[0088] See also Figure 5 Optionally, selecting QoS information associated with the write request from pre-stored service information, and determining the area to be written according to the selected associated QoS information, including:

[0089] Step S502: parsing the first screening condition carried in the write request.

[0090] Step S504: Selecting a quality parameter that meets the first screening condition from the service information as associated QoS information.

[0091] Step S506, determining the area to be written according to the area identifier corresponding to the selected quality parameter that meets the first screening condition.

[0092] Specifically, due to different development requirements, different applications use different types of data during the development process. Furthermore, at different development stages of an application, the types of data used are also different, and different types of data have different requirements for QoS information. To this end, when the host receives a write request, it receives the data to be written and parses the first filtering condition carried in the write request. According to the first filtering condition, it filters out appropriate QoS information from the pre-stored service information, and determines the area to be written based on the filtered QoS information. Then, it generates a write instruction based on the data to be written and the area to be written, and transmits the write instruction to the controller on the SSD side, so that the controller stores the data to be written transmitted by the requester, such as user data, XOR or parity data, device metadata, or any other suitable data to be stored in the SSD, in the corresponding area to be written according to the write instruction.

[0093] Optionally, the first screening condition is determined by: if the type identifier of a quality parameter is the same as the type identifier of the data to be written, and the value of the quality parameter satisfies a first threshold range, then the first screening condition is considered to be met. It should be understood that the first threshold range can be determined according to the type identifier of the write request and the requester's requirements.

[0094] Exemplarily, application 1 sends a write request to the scheduler on the host side, requesting to store the first data, and the first data is associated with the bandwidth, for example, the value of the required bandwidth is greater than the value a; then the scheduler retrieves the QoS information of all areas from the pre-stored service information, selects the quality parameter of the type bandwidth and the value greater than a, and the area corresponding to the quality parameter, and generates a write instruction to feed back to the controller, and the controller responds to the write instruction and stores the first data in each area with a bandwidth value greater than a. In another example, application 2 sends a write request to the scheduler on the host side, requesting to store the second data, and the value of the bandwidth associated with the second data is between a and b. The scheduler retrieves the QoS information of all areas from the pre-stored service information, selects the quality parameter of the type bandwidth and the value between the value a and the value b, and the area corresponding to the quality parameter, and generates a write instruction to feed back to the controller, and the controller responds to the write instruction and stores the second data in each area with a bandwidth value between a and b.

[0095] In the above embodiment, the scheduler on the host side parses the first filtering condition carried by the write request, and filters the appropriate area for the requester according to the first filtering condition, so that the controller on the SSD side stores the data to be written sent by the requester in the above-filtered areas to be written, providing a reliable basis for application development.

[0096] See also Figure 6 , in the case where the service information includes the pointer position of each area on the SSD side, determining the area to be written according to the area identifier corresponding to the selected quality parameter that meets the first screening condition, including:

[0097] Step S602: query the pointer position of the area corresponding to the area identifier corresponding to the selected quality parameter that meets the first screening condition.

[0098] Step S604: According to the pointer position and the length of the data to be written, each area whose capacity meets the length requirement is selected as the area to be written.

[0099] Specifically, by querying the pointer position of an area, the used space and remaining space of the area can be known, and then according to the length of the data to be written, the areas whose capacity meets the length requirement can be selected from the areas corresponding to the quality parameters that meet the first filtering condition as the areas to be written.

[0100] In the above embodiment, the remaining capacity of each area is obtained by querying the pointer position of each area, so that a suitable area to be written can be allocated to the data according to the length of the data to be written.

[0101] See also Figure 7Optionally, when there are multiple type identifiers corresponding to the write request, QoS information associated with the write request is selected, and the area to be written is determined according to the selected associated QoS information, further comprising:

[0102] Step S702: parsing the second screening condition carried in the write request and the importance of each type identifier corresponding to the write request.

[0103] Step S704: Select a quality parameter that meets the second screening condition from the quality parameters that meet the first screening condition as the associated QoS information.

[0104] Step S706, determining the area to be written according to the area identifier corresponding to the selected quality parameter that meets the second screening condition.

[0105] Specifically, if the application needs to write multiple types of data according to the needs of project development, a unique type identifier can be configured for each type of data in advance according to the agreement, and the type identifier corresponds to the type identifier of the quality parameter in the pre-stored service information, and the importance of each type identifier is set, and then a second screening is performed based on the importance. For example, application 3 sends a write request to the scheduler on the host side, requesting to store the third data, where the third data is associated with both bandwidth and latency, and the importance of bandwidth is set before latency. Then, according to the second screening condition, data that meets the second screening condition is screened out from the data screened out for the first time.

[0106] Optionally, the judgment method of the second filtering condition includes: if the type identifier of a quality parameter that meets the first filtering condition has the highest importance, and the value of the quality parameter meets the second threshold range, then it is considered to meet the second filtering condition. It should be understood that the second threshold range can be determined according to the type identifier of the write request and the requirements of the requesting party. In addition, the judgment method of the second filtering condition can also be set according to actual conditions. For example, if there are three types of data requested by the scheduler side, and two types of data are more important, then these two types can be set to the first importance and the second importance, and the first importance is higher than the second importance. In a feasible example, the second filtering condition is set to select a quality parameter with a first importance and a value greater than the second threshold range; in another feasible example, the second filtering condition can also be set to select a quality parameter with a first importance and a second importance, and a value greater than the second threshold range.

[0107] To continue the explanation, application 3 sends a write request to the scheduler on the host side, requesting to store the third data, and the bandwidth requirement associated with the third data is a value greater than a, and the requirement for the associated delay data is a value less than c. The scheduler retrieves the QoS information of all regions from the pre-stored service information, and selects the quality parameters of the type bandwidth and the value greater than a; and the quality parameters of the type delay and the value less than c. In a feasible example, if application 3 has no further requirements for bandwidth and delay, the scheduler only needs to generate a write instruction based on the above quality parameters and the area identifiers corresponding to each quality parameter, and feed it back to the controller on the SSD side, and the controller stores the third data in each area where the bandwidth value is greater than a and the delay is less than c. In another feasible example, the write request further defines that the importance of bandwidth is higher than the importance of delay, then the host further judges the quality parameter of the type bandwidth, if the second threshold range is greater than the value d, and d is greater than a, then the scheduler will filter out the quality parameters of the type bandwidth and the value greater than d to generate a write instruction, and feed back the write instruction to the controller.

[0108] In the above embodiment, if there are multiple type identifiers corresponding to the write request sent by the application, the scheduler on the host side can parse the write request to obtain the second filtering condition, and filter the appropriate area for the requester according to the second filtering condition based on the first filtering, and store the data to be written transmitted by the requester in the above-filtered areas to be written, thereby providing a reliable basis for application development.

[0109] Optionally, the host may also analyze the QoS information of each area in the pre-stored service information to obtain the changing trend of the quality parameters for system developers to view and understand the operation status of the solid state drive.

[0110] In order to enable those skilled in the art to fully understand the present application, the following Figure 1 , the steps of the data storage method of this application are described in detail:

[0111] The monitor set in the controller monitors the service information of each area in the solid-state drive in real time, and transmits the service information of each area to the scheduler of the host through the interface, and the scheduler stores the service information in the memory. The service information includes the QoS information of each area, the pointer position of each area, and the area identification of each area.

[0112] After receiving the write request sent by the requester, the scheduler on the host side receives the data to be written, selects the QoS information associated with the write request from the pre-stored service information, and determines the area to be written based on the selected associated QoS information; sends a write instruction carrying the data to be written and the area to be written to the controller on the SSD side, so that the controller executes the write instruction and stores the data to be written in the area to be written. Furthermore, when receiving write requests sent by multiple requesters at the same time, the host obtains the priority carried in each write request and responds to each requester in order from high to low priority.

[0113] Specifically, the scheduler on the host side parses the first filter condition carried by the write request, selects the quality parameter that meets the first filter condition from the pre-stored service information as the associated QoS information; and determines the area to be written according to the area identifier corresponding to the selected quality parameter that meets the first filter condition; finally, a write instruction is generated based on the above-mentioned data to be written and the area to be written, and sent to the controller on the SSD side. In response to the write instruction, the controller stores the data to be written in the area to be written. Further, the scheduler queries the pointer position of the area corresponding to the area identifier according to the selected area identifier corresponding to the quality parameter that meets the first filter condition, and then selects each area whose capacity meets the length requirement as the area to be written according to the pointer position and the length of the data to be written. Further, when there are multiple type identifiers corresponding to the write request, the scheduler parses the second filter condition carried by the write request and the importance of each type identifier corresponding to the write request, and continues to filter the quality parameter that meets the second filter condition based on the result of the first filtering as the associated QoS information, and determines the area to be written according to the area identifier corresponding to the selected quality parameter that meets the second filter condition.

[0114] Furthermore, the scheduler on the host side can analyze the QoS information of each area in the service information based on historical feedback to obtain the changing trends of various types of data in the quality parameters for system developers to view and understand the operation of the SSD.

[0115] The above-mentioned data storage method based on ZNS-SSD, in response to the write request sent by the requester, selects the QoS information of each area associated with the write request from the pre-stored service information; and writes the data transmitted by the requester into the corresponding area according to the associated QoS information. The present application can detect the QoS information of each area in the controller, and according to the sent write request, provide the user with an area that meets the user's needs based on the QoS information, providing a reliable basis for application development.

[0116] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0117] Based on the same inventive concept, the embodiment of the present application also provides a data storage device for implementing the data storage method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more data storage device embodiments provided below can refer to the limitations on the data storage method above, and will not be repeated here.

[0118] In a feasible embodiment, the embodiment of the present application provides a data storage device, including: a scheduler, wherein:

[0119] The scheduler is set in the host and is used to store service information in the memory; wherein the service information includes QoS information of each area on the SSD side, and is obtained by a monitor in the controller set on the SSD side and provided to the scheduler through an interface.

[0120] The scheduler is also used to respond to a write request sent by the requesting party, receive the data to be written, select QoS information associated with the write request from the pre-stored service information, and determine the area to be written based on the selected associated QoS information; send a write instruction carrying the data to be written and the area to be written to the SSD side, so that the SSD side executes the write instruction and stores the data to be written in the area to be written.

[0121] Optionally, when multiple applications interact with the host at the same time, each application should set a priority in advance according to the project development requirements. When multiple applications act as requesters at the same time and send multiple write requests to the host, the scheduler on the host side obtains the priority carried in each write request and responds to each requester in order from high to low priority.

[0122] Optionally, the scheduler selects QoS information associated with the write request from the pre-stored service information, and determines the area to be written based on the selected associated QoS information, including: parsing the first filtering condition carried by the write request; selecting a quality parameter that meets the first filtering condition from the service information as the associated QoS information; and determining the area to be written based on the area identifier corresponding to the selected quality parameter that meets the first filtering condition. The first filtering condition is determined by: if the type identifier of a data quality parameter is the same as the type identifier of the data to be written, and the value of the data quality parameter meets the first preset threshold range, it is considered that the first filtering condition is met.

[0123] Optionally, when the service information includes the pointer positions of each area on the SSD side, the scheduler determines the area to be written according to the area identifier corresponding to the selected quality parameter that meets the first filtering condition, including: querying the pointer position of the area corresponding to the area identifier according to the selected quality parameter that meets the first filtering condition; and selecting each area whose capacity meets the length requirement as the area to be written according to the pointer position and the length of the data to be written.

[0124] Optionally, when there are multiple type identifiers corresponding to a write request, the scheduler selects QoS information associated with the write request, and determines the area to be written based on the selected associated QoS information, and also includes: parsing the second filtering condition carried by the write request and the importance of each type identifier corresponding to the write request; selecting a quality parameter that meets the second filtering condition from the quality parameters that meet the first filtering condition as the associated QoS information; and determining the area to be written based on the area identifier corresponding to the selected quality parameter that meets the second filtering condition. Among them, the judgment method of the second filtering condition includes: if the importance of the type identifier of a quality parameter that meets the first filtering condition is the highest, and the value of the quality parameter meets the second threshold range, it is considered that the second filtering condition is met.

[0125] Optionally, the scheduler may also analyze the QoS information of each area in the pre-stored service information to obtain the changing trend of the quality parameters for system developers to view in order to understand the operation status of the solid state drive.

[0126] Each module in the data storage device acquisition system can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0127] The above-mentioned data storage device, in response to the write request sent by the requester, selects the QoS information of each area associated with the write request from the pre-stored service information; and writes the data transmitted by the requester into the corresponding area according to the associated QoS information. The present application can detect the QoS information of each area in the controller, and provide the user with an area that meets the user's needs based on the QoS information according to the sent write request, providing a reliable basis for application development.

[0128] See also Figure 8 In a feasible embodiment, the present application embodiment provides a data storage method based on ZNS-SSD, which is applied to the SSD side and specifically includes the following steps:

[0129] Step S802, the monitor in the controller on the SSD side obtains service information of each area on the SSD side at a preset interval, and transmits the service information to the scheduler on the host side through the interface, so that the scheduler stores it in the memory; wherein the service information includes QoS information of each area on the SSD side;

[0130] Step S804: The controller receives a write instruction sent by the scheduler that carries the data to be written and the area to be written, executes the write instruction, and stores the data to be written into the area to be written.

[0131] See also Fig. 9 In a feasible embodiment, the data storage method based on ZNS-SSD in the embodiment of the present application further includes:

[0132] Step S902: The controller on the SSD side monitors the working status of the SSD side, and when a preset condition is met, rebuilds the mapping between the logical address of each area and the physical address.

[0133] Step S904: updating the region identification of each region after the reconstructed mapping.

[0134] Specifically, the physical storage space of the solid-state drive includes a flash translation layer FTL and multiple areas for storing data; wherein the FTL is used to store a mapping table; the mapping table includes the area identifier, physical address, size, etc. of each area, and can establish a mapping of the logical address of each area to the physical address of the SSD. Each area implements operations such as allocation, release, management, reading, writing or deletion through the mapping table. The address mapping of the FTL regarding the area may change, resulting in deviations in the QoS information of each area obtained by the host side. Therefore, in order to provide more accurate QoS information, in this embodiment, when the preset conditions are met, the controller rebuilds the address mapping in the FTL and updates the area identifiers of each area after the reconstruction in the mapping table. When a new write instruction is received, the data is stored in each area after the area identifier is updated according to the write instruction. At the same time, when a read instruction is received, the controller returns the data in each area after the area identifier is updated to the requester.

[0135] Optionally, the method of determining the preset condition includes:

[0136] If the garbage collection mechanism and / or the area reset occurs, it is considered that the preset condition is met. It should be understood that the preset condition in this embodiment is only an example, and in actual applications, the preset condition varies according to different manufacturers.

[0137] In the above embodiment, when the preset conditions are met, the controller actively reconstructs the address mapping in the FTL and performs data writing or reading operations on each reconstructed area, further improving the reliability of data storage of the present application.

[0138] The above-mentioned data storage method based on ZNS-SSD obtains the service information of each area in advance, and transmits the service information to the scheduler on the host side through the interface, so that the scheduler stores it in the memory, and according to the write instruction sent by the scheduler, stores the data to be written sent by the requester in the area to be written, which provides a reliable basis for the application to develop customized data placement strategies. In addition, when the preset conditions are met, the application actively reconstructs the address mapping in the FTL, and performs data writing or reading operations on each reconstructed area, further improving the reliability of the data storage of the application.

[0139] In a feasible embodiment, the present application embodiment further provides a data storage device, including: a controller and a monitor, wherein:

[0140] The controller is arranged on the SSD side, and is used for executing the write instruction and storing the data to be written in the area to be written when receiving the write instruction carrying the data to be written and the area to be written sent by the scheduler on the host side.

[0141] The monitor is arranged in the controller and is used to obtain the service information of each area on the SSD side at preset intervals, and transmit the service information to the scheduler on the host side through the interface so that the scheduler stores it in the memory.

[0142] The above-mentioned data storage device obtains the service information of each area in advance, and transmits the service information to the scheduler on the host side through the interface, so that the scheduler stores it in the memory, and stores the data to be written sent by the requester in the area to be written according to the write instruction sent by the scheduler, which provides a reliable basis for the application to develop customized data placement strategies. In addition, when the preset conditions are met, the application actively reconstructs the address mapping in the FTL, and performs data writing or reading operations on each reconstructed area, further improving the reliability of the data storage of the application.

[0143] See also Fig.10 In a feasible embodiment, the present application embodiment also provides a data storage method based on ZNS-SSD, which specifically includes the following steps:

[0144] Step S1002, a monitor in a controller on the SSD side obtains service information of each area on the SSD side at a preset interval, and transmits the service information to a scheduler on the host side through an interface; wherein the service information includes QoS information of each area on the SSD side;

[0145] Step S1004, the scheduler saves the service information into the memory;

[0146] Step S1006, the scheduler selects QoS information associated with the write request from pre-stored service information in response to the write request sent by the requester, determines the area to be written according to the selected associated QoS information, and sends a write instruction carrying the data to be written and the area to be written to the SSD side;

[0147] Step S1008 : the controller executes the write instruction to store the data to be written into the area to be written.

[0148] In the above-mentioned data storage method based on ZNS-SSD, the controller obtains the service information of each area in advance, and transmits the service information to the scheduler on the host side through the interface. The scheduler responds to the write request sent by the requester, receives the data to be written, and selects the QoS information of each area associated with the write request from the pre-stored service information, determines the area to be written according to the associated QoS information, and the controller writes the data to be written into the area to be written. The present application can obtain the service information of each area based on the monitor in the controller, and according to the write request sent, provide the user with an area that meets the storage requirements based on the service information, providing a reliable basis for the application to develop customized data placement strategies.

[0149] In a feasible embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data storage method based on ZNS-SSD is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0150] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0151] In a feasible embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method steps in the data storage method based on the ZNS-SSD in the above embodiment are implemented.

[0152] In a feasible embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method steps in the data storage method based on ZNS-SSD in the above embodiment are implemented.

[0153] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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), magnetoresistive 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0154] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.

[0155] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data storage method based on ZNS-SSD, applied to the host side, characterized in that: The method comprises: The scheduler on the host side receives the data to be written in response to the write request sent by the requester, selects QoS information associated with the write request from the pre-stored service information, and determines the area to be written according to the selected associated QoS information; Sending a write instruction carrying the data to be written and the area to be written to the SSD side, so that the SSD side executes the write instruction and stores the data to be written in the area to be written; The service information includes QoS information of each area on the SSD side, and is obtained by a monitor in a controller disposed on the SSD side, and the service information is provided to the scheduler through an interface, and the scheduler stores the service information in a memory.

2. The method according to claim 1, characterized in that The service information also includes the area identifiers of each area on the SSD side, and the QoS information includes multiple types of quality parameters, each type of quality parameter corresponds to a unique type identifier; The selecting the QoS information associated with the write request from the pre-stored service information, and determining the area to be written according to the selected associated QoS information, comprises: parsing a first screening condition carried by the write request; Selecting, from the service information, a quality parameter that meets the first screening condition as the associated QoS information; Determining the area to be written according to the area identifier corresponding to the selected quality parameter that meets the first screening condition; If a type identifier of the quality parameter is the same as a type identifier corresponding to the write request, and a value of the quality parameter satisfies a first threshold range, it is considered that the quality parameter meets the first screening condition.

3. The method according to claim 2, characterized in that The service information also includes the pointer position of each area on the SSD side; The determining the area to be written according to the area identifier corresponding to the selected quality parameter meeting the first screening condition includes: According to the selected area identifier corresponding to the quality parameter meeting the first screening condition, querying the pointer position of the area corresponding to the area identifier; According to the pointer position and the length of the data to be written, each area whose capacity meets the length requirement is selected as the area to be written.

4. The method according to claim 2, characterized in that: When there are multiple type identifiers corresponding to the write request, selecting the QoS information associated with the write request, and determining the area to be written according to the selected associated QoS information, further includes: parsing the second screening condition carried by the write request and the importance of each type identifier corresponding to the write request; Selecting, from the quality parameters meeting the first screening condition, a quality parameter meeting the second screening condition as the associated QoS information; Determining the area to be written according to the area identifier corresponding to the selected quality parameter that meets the second screening condition; If the type identifier of a quality parameter that meets the first screening condition has the highest importance and the value of the quality parameter satisfies the second threshold range, it is considered that the second screening condition is met.

5. The method according to any one of claims 1 to 4, characterized in that The step of responding to a write request sent by a requesting party includes: When the scheduler on the host side receives write requests sent by multiple requesters, it obtains the priority carried in each of the write requests; The requesting parties are responded to in descending order of priority.

6. The method according to claim 5, characterized in that Before the scheduler on the host side responds to the write request sent by the requester, the scheduler includes: After receiving the operation request sent by the requester, the scheduler confirms whether the operation request is a write request; wherein the operation request includes a read request and a write request; When the operation request is a write request, respond to the write request.

7. A data storage device, characterized in that: The device comprises: A scheduler, arranged in the host, for storing service information in the memory; wherein the service information includes QoS information of each area on the SSD side, and is obtained by a monitor in a controller arranged on the SSD side and provided to the scheduler through an interface; The scheduler is also used to respond to a write request sent by the requesting party, receive the data to be written, select QoS information associated with the write request from the pre-stored service information, and determine the area to be written based on the selected associated QoS information; send a write instruction carrying the data to be written and the area to be written to the SSD side, so that the SSD side executes the write instruction and stores the data to be written in the area to be written.

8. A data storage method based on ZNS-SSD, applied to the SSD side, characterized in that: The method comprises: The monitor in the controller on the SSD side obtains the service information of each area on the SSD side at a preset interval, and transmits the service information to the scheduler on the host side through the interface so that the scheduler stores it in the memory; wherein the service information includes the QoS information of each area on the SSD side; The controller receives a write instruction sent by the scheduler and carrying the data to be written and the area to be written, executes the write instruction, and stores the data to be written in the area to be written.

9. The method according to claim 8, characterized in that The service information also includes area identifiers of each area on the SSD side, and the method further includes: The controller on the SSD side monitors the working status of the SSD side, and when a preset condition is met, rebuilds the mapping between the logical address of each area and the physical address; Update the area identification of each area after the reconstruction mapping; Among them, if a garbage collection mechanism and / or a region reset occurs, it is considered that the preset condition is met.

10. A data storage device, characterized in that: The device comprises: A controller is provided on the SSD side, and is used to execute the write instruction carrying the data to be written and the area to be written sent by the scheduler on the host side, and store the data to be written in the area to be written; The monitor is arranged in the controller, and is used to obtain the service information of each area of ​​the SSD side at a preset time interval, and transmit the service information to the scheduler of the host side through the interface, so that the scheduler stores it in the memory.

11. A data storage method based on ZNS-SSD, characterized in that: The method comprises: The monitor in the controller on the SSD side obtains the service information of each area on the SSD side at a preset interval, and transmits the service information to the scheduler on the host side through an interface; wherein the service information includes QoS information of each area on the SSD side; The scheduler saves the service information into a memory; The scheduler selects QoS information associated with the write request from pre-stored service information in response to the write request sent by the requester, determines the area to be written according to the selected associated QoS information, and sends a write instruction carrying the data to be written and the area to be written to the SSD side; The controller executes the write instruction and stores the data to be written into the area to be written.

12. A data storage system, characterized in that: include: A scheduler, arranged in the host, for storing service information in the memory of the host; wherein the service information includes QoS information of each area on the SSD side; The scheduler is further configured to, in response to a write request sent by the requester, select QoS information associated with the write request from the service information, and determine the area to be written according to the selected associated QoS information; and send a write instruction carrying the data to be written and the area to be written to the SSD side; A controller, disposed on the SSD side, configured to execute the write instruction after receiving the write instruction, and store the data to be written into the area to be written; The monitor is arranged in the controller, and is used for obtaining the service information of each area on the SSD side at preset intervals, and transmitting the service information to the scheduler through an interface.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the processor implements the steps of the method according to any one of claims 1 to 6, or the steps of the method according to any one of claims 8 to 9, or the steps of the method according to claim 11.

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