Method, device and equipment for improving FDP function accuracy through SSD and medium

By receiving and processing host query commands, the identification and quantity of reclaimed units within the logical block address range of the solid-state drive are determined, solving the problem that the host cannot obtain physical distribution information and improving the accuracy and reliability of the FDP function.

CN122044486APending Publication Date: 2026-05-15成都芯忆联信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
成都芯忆联信息技术有限公司
Filing Date
2026-01-30
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, the host cannot actively and reliably obtain the actual physical distribution information of the written data in the solid-state drive, making it difficult to verify and ensure that the execution of the FDP function meets expectations.

Method used

By receiving query commands sent by the host, the identification of the recycling units corresponding to the logical block address range is determined, and their number is counted and returned to the host to achieve direct perception of the physical distribution of data.

Benefits of technology

This enables the host to accurately verify whether data is placed as expected according to the FDP policy and adjust the write policy in a timely manner, thereby improving the accuracy and reliability of the FDP function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122044486A_ABST
    Figure CN122044486A_ABST
Patent Text Reader

Abstract

The invention discloses a method, device and equipment for improving FDP function accuracy of an SSD, and a medium, and relates to the field of solid state disks, and the method comprises the following steps: receiving a query command sent by a host; executing the query command, and determining identities of one or more recovery units corresponding to the logic block address range; counting the number of the recovery units occupied by the logic block address range based on the identity labels of the one or more recovery units; and returning the quantity information of the recovery units to the host. In the invention, the host can accurately verify whether the data is expected to be placed according to the FDP strategy, and the write strategy can be adjusted in time once the deviation is found, so that the problem of function failure caused by information asymmetry is fundamentally solved, and the technical span from passive dependency event recording to active accurate management and control is realized; and the accuracy and the reliability of the FDP function are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of solid-state drive technology, and in particular to a method, apparatus, device, and medium for improving the accuracy of FDP (Fulfilled Display Processing) function in SSDs. Background Technology

[0002] In the current solid-state drive (SSD) technology field, the Flexible Data Placement (FDP) feature supported by the NVMe protocol has been incorporated into the standard specification. Its core objective is to optimize data layout by associating host-written data with specific physical recycling units (RUs), thereby reducing write amplification and improving storage device performance and lifespan. Existing technical solutions mainly rely on the SSD controller to record FDP-related event information to monitor and provide feedback on data placement behavior.

[0003] Specifically, in the existing mechanism, when the host issues a write command, if the specified placement identifier is invalid, the SSD controller will be unable to map it to a valid physical RU. In this case, the controller will record the exception and automatically select another valid identifier to continue the write operation. Similarly, if the amount of data requested by the host exceeds the available capacity of the target RU, the controller may implicitly switch to another RU to perform the write operation without actively notifying the host. Furthermore, when the reclaimed unit handle is configured in initial isolation mode, data in the original RU may be migrated due to internal management operations such as garbage collection, resulting in a discrepancy between the actual physical location and the host's expectations.

[0004] While the aforementioned mechanism can record data placement anomalies in some scenarios, its effectiveness is highly dependent on whether the host has enabled the corresponding event reporting function. In actual operation, there are situations where some anomalies are not fully recorded by the controller, or the host is not configured to receive relevant event notifications. Once such situations occur, the host will be unable to perceive whether the data has been correctly written to the expected physical location, making it difficult to accurately evaluate the execution effect of the FDP policy. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and medium for improving the accuracy of FDP (Fulfilled Data Display) function in SSDs, aiming to solve the problem that the host cannot actively and reliably obtain the actual physical distribution information of written data in the solid-state drive, making it difficult to verify and ensure that the execution of the FDP function meets expectations.

[0006] In a first aspect, embodiments of the present invention provide a method for improving the accuracy of FDP (Fault-Device Performance) function in an SSD, comprising: Receive a query command sent by the host, wherein the query command is used to request information on the number of recycling units corresponding to a specified logical block address range within the solid-state drive; Execute the query command to determine the identity of one or more recycling units corresponding to the logical block address range; Based on the identity identifiers of the one or more recycling units, count the number of recycling units occupied by the logical block address range; The quantity information of the recycling units is returned to the host.

[0007] A further technical solution is that the command parameters of the query command include the starting logical block address, the number of logical block addresses, and the segment count.

[0008] A further technical solution is that if the value of the segment count is zero, the range of the logical block address is a single continuous range, which is determined by the starting logical block address and the number of logical block addresses.

[0009] A further technical solution is that if the segment count is greater than zero, the logical block address range includes multiple consecutive address segments, the number of address segments is the segment count plus one, and the range of each address segment is calculated based on the starting logical block address, the number of logical block addresses, and the segment count.

[0010] A further technical solution is that, by executing the query command to determine the identity of one or more reclaim units corresponding to the logical block address range, the following steps are included: Parse the query command and perform a validity check on the command parameters; After the legality verification is passed, the mapping table from logical address to physical address is queried according to the logical block address range to obtain the corresponding physical page number as the identity identifier of the recycling unit.

[0011] A further technical solution is that, based on the identity identifiers of the one or more reclaim units, counting the number of reclaim units occupied by the logical block address range includes: Traverse all logical block addresses within the specified logical block address range; By querying the mapping table from logical address to physical address, the identity identifier of the recycling unit corresponding to each logical block address can be obtained; The total number of different reclaim unit identifiers appearing within the address range of the logical block is counted.

[0012] A further technical solution is that returning the quantity information of the recycling units to the host includes: For queries involving a single logical block address range, the quantity information is returned directly through the result field of the completed queue entries; When querying multiple logical block address ranges, the number of successfully processed address ranges is returned through the result field of the completed queue entry, while the number of reclaimable units corresponding to each address range is written to the host memory region specified by the query command.

[0013] Secondly, embodiments of the present invention also provide an apparatus for improving the accuracy of FDP function in SSDs, which includes a unit for performing the above-described method.

[0014] Thirdly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0016] This invention provides a method, apparatus, device, and medium for improving the accuracy of FDP (Fulfilled Data Distribution) functionality in SSDs. The method includes: receiving a query command sent by a host, wherein the query command requests information on the number of reclaimable units corresponding to a specified logical block address range within the SSD; executing the query command to determine the identifiers of one or more reclaimable units corresponding to the logical block address range; counting the number of reclaimable units occupied by the logical block address range based on the identifiers of the one or more reclaimable units; and returning the number of reclaimable units to the host. By enabling the host to actively query the number of reclaimable units corresponding to a specified logical block address range, direct perception of the physical distribution of data is achieved. The SSD internally, by parsing commands, querying address mapping tables, and counting the number of different reclaimable unit identifiers, transforms the complex physical layout into an intuitive quantitative indicator returned to the host. This mechanism allows the host to accurately verify whether data is placed as expected according to the FDP strategy. Once a deviation is detected, the write strategy can be adjusted promptly, fundamentally solving the problem of functional failure caused by information asymmetry. This represents a technological leap from passively relying on event recording to proactive and precise control, significantly improving the accuracy and reliability of the FDP function. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1A flowchart illustrating a method for improving the accuracy of FDP function in an SSD according to an embodiment of the present invention; Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0021] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0022] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0023] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0024] Please see Figure 1 This invention provides a method for improving the accuracy of FDP (Fault-Device Performance) function in SSDs, the method comprising the following steps: S1, receive a query command sent by the host, wherein the query command is used to request information on the number of recycling units corresponding to a specified logical block address range within the solid-state drive.

[0025] In practical implementation, the system receives a query command from the host. The core purpose of this command is to request information on the number of reclaimable units corresponding to a specified logical block address range within the solid-state drive (SSD). This invention establishes a standardized information acquisition channel, enabling the host to shift from a model that passively relies on the SSD to report events to a new model that proactively initiates queries. For example, when the host has doubts about the placement strategy of a critical data segment, it no longer needs to wait for internal events that may never be recorded or reported; instead, it can directly request precise evidence of physical distribution through this command.

[0026] In some preferred embodiments, the query command is carried by a custom input / output command, whose opcode is a preset specific value.

[0027] In practice, by implementing custom input / output commands and specific opcodes, system functionality was successfully extended while maintaining protocol compatibility. By using custom commands instead of reusing existing commands, the query function was completely isolated from standard functions, avoiding potential conflicts or interference. Setting the opcode to a preset specific value not only complies with the NVMe protocol specifications but also preserves a unique identifier for the query function. For example, selecting an opcode value not defined in the protocol ensures that the command will not be misinterpreted as other standard commands, guaranteeing accuracy and security. From a system evolution perspective, this custom command approach provides a standard implementation paradigm for functional expansion, requiring no modification to the existing protocol architecture while meeting new technical requirements. Simultaneously, the unified command interface facilitates interoperability between devices from different manufacturers; as long as the same command format and opcode conventions are followed, devices from different brands can provide consistent query functionality.

[0028] In some preferred embodiments, the command parameters of the query command include the starting logical block address, the number of logical block addresses, and the segment count.

[0029] In practice, by precisely defining the parameter structure of query commands, an optimal balance between flexibility and standardization in query functionality is achieved. The combination of three core parameters—starting logical block address, number of logical block addresses, and segment count—forms a complete syntax system describing query requirements. The starting logical block address determines the query baseline, the number of logical block addresses defines the coverage of a single query, and the segment count controls the complexity and mode selection of the query. This parameterized design allows the host to precisely control query behavior according to actual needs. For example, a smaller number of logical block addresses can be used for local data verification, while batch queries can be achieved by adjusting the segment count during global spatial scanning. This flexibility greatly expands the applicability of the method, enabling it to meet both real-time, high-precision fixed-point detection requirements and periodic, large-scale spatial scanning tasks.

[0030] In some preferred embodiments, if the value of the segment count is zero, the logical block address range is a single continuous range, determined by the starting logical block address and the number of logical block addresses.

[0031] In practice, when the host only needs to verify the physical distribution of a specific data segment, by setting the segment count to zero, the system will automatically enter single-segment query mode. In this mode, the logical block address range is explicitly defined as a single, continuous interval starting from the initial logical block address and extending for a specified number of logical block addresses. This design eliminates the overhead of multi-segment processing logic, making the query process more direct and efficient. For example, when the host detects abnormal write performance of a critical data segment, it can quickly locate the actual physical distribution of that data segment through single-segment query without initiating a complex multi-segment processing flow.

[0032] In some preferred embodiments, if the segment count is greater than zero, the logical block address range includes multiple consecutive address segments, the number of address segments is the segment count plus one, and the range of each address segment is calculated based on the starting logical block address, the number of logical block addresses, and the segment count.

[0033] In practical implementation, a breakthrough in efficiency is achieved in large-scale space scanning scenarios by introducing a multi-segment contiguous address query mechanism. When the segment count is greater than zero, the system automatically calculates multiple contiguous address segments based on the starting logical block address, the number of logical block addresses, and the segment count, and completes the processing of all address segments in a single query command. This batch processing mechanism significantly reduces the number of command interactions between the host and the solid-state drive, thereby greatly reducing communication overhead. For example, when the host needs to perform FDP compliance checks on the entire namespace, the traditional method requires sending hundreds of individual query commands, while this method only requires a single multi-segment query to complete the same task.

[0034] Specifically, in one embodiment, the range of each address segment is calculated based on the starting logical block address, the number of logical block addresses, and the segment count. The specific implementation is as follows: the starting logical block address of the i-th address segment is the starting logical block address plus an offset of (i-1) times, where i is an integer starting from 1 up to the segment count plus one; the number of logical block addresses in each address segment remains the number of logical block addresses specified in the command parameters; correspondingly, the ending logical block address of the i-th address segment is the starting logical block address of that address segment plus the number of logical block addresses minus one. Specifically, the range of the first address segment is [starting logical block address, starting logical block address + number of logical block addresses - 1]; the range of the second address segment is [starting logical block address + number of logical block addresses + 1, starting logical block address + 2 * number of logical block addresses + 1]; subsequent address segments follow the same pattern, with each address segment isolated from the others by a logical block address interval and arranged continuously. This calculation method ensures efficient coverage of multiple non-overlapping contiguous address spaces in a single query command, while maintaining the accuracy and consistency of address segment definitions through parameterized calculation.

[0035] S2, execute the query command to determine the identity of one or more recycling units corresponding to the logical block address range.

[0036] In practice, the core processing step of this method is executing the query command and determining the identity of the reclaimed unit corresponding to the logical block address range, transforming the abstract logical address request into a specific physical storage unit identifier. This step is based on the inherent logical address-to-physical address mapping table within the solid-state drive (SSD). By querying this mapping table, the corresponding physical page number is obtained and attributed to the identity of the reclaimed unit. In principle, this is equivalent to providing the host with a "translator" that can accurately translate the linear logical address space understood by the host into a physical storage view organized by reclaimed units within the SSD. This translation process is reliable and efficient because it is built upon the core data structures used for data management within the SSD itself, ensuring that the query results accurately reflect the actual location of the data on the physical medium.

[0037] In some preferred embodiments, the above step "execute the query command to determine the identity identifier of one or more reclaim units corresponding to the logical block address range" specifically includes the following steps: parsing the query command and performing a validity check on the command parameters; after the validity check is passed, querying the mapping table from logical address to physical address according to the logical block address range to obtain the corresponding physical page number as the identity identifier of the reclaim unit.

[0038] In practical implementation, a complete command processing flow is introduced to ensure the reliability and security of query operations. Parsing the query command and validating its parameters constitutes the system's first line of defense, effectively identifying and intercepting various abnormal inputs. For example, when the starting logical block address transmitted by the host exceeds the valid address range of the solid-state drive, or when the number of logical block addresses causes the address range to exceed the limit, the validity check can promptly detect these problems and return an error response, preventing system anomalies caused by illegal parameters. The core technology of the entire method lies in querying the mapping table from logical address to physical address after passing the validity check to obtain the physical page number as the identifier of the recycling unit. This step fully utilizes the inherent address management mechanism within the solid-state drive, obtaining accurate physical location information through a mature L2P mapping table, ensuring the authenticity and reliability of the query results. The design of using the physical page number as the identifier of the recycling unit cleverly establishes a bridge between the physical storage unit and the logical query result, allowing complex physical layout information to be presented in a concise numerical form. The entire processing flow embodies the principles of defensive programming, fully considering the robustness and stability of the system while pursuing functional implementation.

[0039] S3, based on the identity identifiers of the one or more recycling units, count the number of recycling units occupied by the logical block address range.

[0040] In practice, based on the obtained identifiers of one or more reclaim units, the number of reclaim units occupied by the logical block address range is counted. This step generates a crucial quantitative indicator, transforming complex physical layout information into a single, intuitive, and easily processed number. For example, if the host expects a segment of continuously written data to be compactly placed within a single reclaim unit, but the statistical results show that it occupies multiple reclaim units, this numerical discrepancy immediately reveals a deviation in the execution of the FDP policy. This statistical method, by traversing all logical block addresses within a specified range and accurately counting the number of different reclaim unit identifiers they map to, avoids any sampling-based uncertainty and provides an authoritative measure of the completeness and concentration of data distribution. This value provides previously unavailable, objective data support for the host's decision-making.

[0041] In some preferred embodiments, the above step "based on the identity identifiers of the one or more recycling units, count the number of recycling units occupied by the logical block address range" specifically includes the following steps: traversing all logical block addresses within the logical block address range; obtaining the recycling unit identity identifier corresponding to each logical block address by querying the mapping table from logical address to physical address; and counting the total number of different recycling unit identity identifiers appearing within the logical block address range.

[0042] In practice, a systematic traversal and statistical mechanism enables precise quantification of physical distribution information. Traversing all logical block addresses within the logical block address range ensures query completeness, guaranteeing no data unit is missed. By querying the mapping table from logical address to physical address to obtain the reclaimable unit identifier corresponding to each logical block address, the abstract address is transformed into a concrete physical storage unit identifier. The essence of the entire process lies in counting the total number of different reclaimable unit identifiers appearing within the logical block address range. This step transforms complex physical distribution characteristics into intuitive numerical indicators. For example, when all logical block addresses of a data segment map to the same reclaimable unit identifier, the statistical result is 1, clearly indicating centralized data storage; when mapped to multiple different reclaimable unit identifiers, the statistical result is greater than 1, accurately reflecting the degree of data dispersion. This statistical method avoids errors from subjective judgment, providing the host with an absolutely objective evaluation basis. From an algorithmic perspective, although this traversal and statistical method involves relatively large computational loads, it provides the most accurate distribution information, making it particularly suitable for applications with high accuracy requirements. Meanwhile, the statistical method based on the total number of different identity identifiers also has good universality and is not limited by the size or number of specific recycling units.

[0043] S4, return the quantity information of the recycling units to the host.

[0044] In practice, the number of reclaimed units is returned to the host, completing the information transfer from the physical layer to the host, enabling the host to make decisions based on this information. After obtaining this quantity information, the host can accurately evaluate the effectiveness of its flexible data placement strategy. If the actual number of reclaimed units differs from the expected number, the host can take corrective measures, such as adjusting the placement identifiers for subsequent write operations or modifying the data grouping strategy, thereby dynamically optimizing the data layout and ensuring that the design goals of the FDP function are achieved.

[0045] Accordingly, the host receives the number of recycling units returned by the solid-state drive; based on the number information, the host determines whether the data written to the logical block address range is placed in the expected recycling unit; and if it is not expected, the host adjusts its flexible data placement strategy.

[0046] In practice, a complete host-side processing flow was established, enabling dynamic optimization and continuous improvement of the FDP (Fulfilled Data Placement) function. The step of the host receiving the number of reclaimed units returned by the SSD initiates the entire feedback loop, allowing the host to access physical layer information that was previously inaccessible. Determining whether written data is placed in the expected reclaimed units based on this quantity information is the key step in transforming raw data into a decision-making basis. For example, if the host expects a data segment to be stored in a single reclaimed unit, but the query results show it scattered across multiple reclaimed units, the system can automatically identify this policy execution deviation. If the judgment result does not meet expectations, the step of the host adjusting its flexible data placement strategy completes the entire control loop, allowing the system to dynamically optimize the data placement strategy based on actual execution. This continuous self-adjustment mechanism transforms the FDP function from a static configuration to a dynamic optimization process, adapting to constantly changing data access patterns and storage device states. From a system optimization perspective, this closed-loop control allows the storage system to gradually approach its optimal operating state, minimizing write amplification and maximizing performance through continuous adjustments.

[0047] In some preferred embodiments, the above step "returning the quantity information of the recycling units to the host" specifically includes the following steps: for querying a single logical block address range, the quantity information is directly returned through the result field of the completed queue entry; for querying multiple logical block address ranges, the number of successfully processed address segments is returned through the result field of the completed queue entry, while the number of recycling units corresponding to each address segment is written to the host memory area specified by the query command.

[0048] In practical implementation, an intelligent result return mechanism achieves an optimal balance between query efficiency and information richness. For queries involving a single logical block address range, quantity information is directly returned through the result field of the completed queue entry. This design simplifies the response process to the greatest extent possible, achieving near real-time result feedback. For example, in scenarios requiring rapid verification of the placement status of a single data segment, the host can immediately obtain the result and make corresponding decisions with almost no additional latency.

[0049] Furthermore, for queries involving multiple logical block address ranges, the number of successfully processed address segments is returned via the result field of the completed queue entry. Simultaneously, the number of reclaimable units corresponding to each address segment is written to the host memory area specified by the query command. This hierarchical return strategy cleverly solves the challenge of large-scale data transmission. The host first obtains the processing progress and overall status through the result field, and then reads detailed result data from the specified memory area as needed. This asynchronous processing method avoids the blocking of communication channels by large amounts of data. From a system design perspective, this differentiated return strategy reflects deep optimization for different application scenarios, satisfying both the pursuit of real-time performance and ensuring the feasibility of large-capacity data transmission. In addition, the explicit result location mechanism simplifies the host-side processing logic and improves the overall system's collaborative efficiency.

[0050] This invention proposes a method for improving the accuracy of FDP (Fulfilled Data Distribution) functionality in SSDs. The method includes: receiving a query command sent by a host, wherein the query command requests the number of reclaimable units corresponding to a specified logical block address range within the SSD; executing the query command to determine the identity of one or more reclaimable units corresponding to the logical block address range; based on the identity of the one or more reclaimable units, counting the number of reclaimable units occupied by the logical block address range; and returning the number of reclaimable units to the host. By enabling the host to actively query the number of reclaimable units corresponding to a specified logical block address range, direct perception of the physical distribution of data is achieved. The SSD internally, by parsing commands, querying address mapping tables, and counting the number of different reclaimable unit identity identifiers, transforms the complex physical layout into an intuitive quantitative indicator returned to the host. This mechanism allows the host to accurately verify whether data is placed as expected according to the FDP strategy. Once a deviation is detected, the write strategy can be adjusted promptly, fundamentally solving the problem of functional failure caused by information asymmetry. This represents a technological leap from passively relying on event recording to proactive and precise control, significantly improving the accuracy and reliability of the FDP function.

[0051] Corresponding to the above method for improving the accuracy of FDP function in SSDs, the present invention also provides an apparatus for improving the accuracy of FDP function in SSDs. This apparatus includes a unit for performing the above method for improving the accuracy of FDP function in SSDs, and can be configured in terminals such as desktop computers, tablet computers, and laptops. Specifically, the apparatus for improving the accuracy of FDP function in SSDs includes: A receiving unit is used to receive a query command sent by the host, wherein the query command is used to request information on the number of recycling units corresponding to a specified logical block address range within the solid-state drive; An execution unit is used to execute the query command and determine the identity of one or more recycling units corresponding to the logical block address range; A statistics unit is used to count the number of reclaimed units occupied by the logical block address range based on the identity identifiers of the one or more reclaimed units. The return unit is used to return the quantity information of the recycling units to the host.

[0052] In some preferred embodiments, the command parameters of the query command include the starting logical block address, the number of logical block addresses, and the segment count.

[0053] In some preferred embodiments, if the value of the segment count is zero, the logical block address range is a single continuous range, determined by the starting logical block address and the number of logical block addresses.

[0054] In some preferred embodiments, if the segment count is greater than zero, the logical block address range includes multiple consecutive address segments, the number of address segments is the segment count plus one, and the range of each address segment is calculated based on the starting logical block address, the number of logical block addresses, and the segment count.

[0055] In some preferred embodiments, executing the query command to determine the identity of one or more reclaim units corresponding to the logical block address range includes: Parse the query command and perform a validity check on the command parameters; After the legality verification is passed, the mapping table from logical address to physical address is queried according to the logical block address range to obtain the corresponding physical page number as the identity identifier of the recycling unit.

[0056] In some preferred embodiments, the step of counting the number of reclaimed units occupied by the logical block address range based on the identity identifiers of the one or more reclaimed units includes: Traverse all logical block addresses within the specified logical block address range; By querying the mapping table from logical address to physical address, the identity identifier of the recycling unit corresponding to each logical block address can be obtained; The total number of different reclaim unit identifiers appearing within the address range of the logical block is counted.

[0057] In some preferred embodiments, returning the quantity information of the recycling units to the host includes: For queries involving a single logical block address range, the quantity information is returned directly through the result field of the completed queue entries; When querying multiple logical block address ranges, the number of successfully processed address ranges is returned through the result field of the completed queue entry, while the number of reclaimable units corresponding to each address range is written to the host memory region specified by the query command.

[0058] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned SSD device for improving the accuracy of FDP function and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.

[0059] The aforementioned device for improving the accuracy of FDP function in SSDs can be implemented as a computer program, which can, for example... Figure 2 It runs on the computer device shown.

[0060] Please see Figure 2 , Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.

[0061] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.

[0062] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to perform a method for improving the accuracy of the SSD's FDP function.

[0063] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.

[0064] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for improving the accuracy of the SSD FDP function.

[0065] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure 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 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.

[0066] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps: Receive a query command sent by the host, wherein the query command is used to request information on the number of recycling units corresponding to a specified logical block address range within the solid-state drive; Execute the query command to determine the identity of one or more recycling units corresponding to the logical block address range; Based on the identity identifiers of the one or more recycling units, count the number of recycling units occupied by the logical block address range; The quantity information of the recycling units is returned to the host.

[0067] In some preferred embodiments, the command parameters of the query command include the starting logical block address, the number of logical block addresses, and the segment count.

[0068] In some preferred embodiments, if the value of the segment count is zero, the logical block address range is a single continuous range, determined by the starting logical block address and the number of logical block addresses.

[0069] In some preferred embodiments, if the segment count is greater than zero, the logical block address range includes multiple consecutive address segments, the number of address segments is the segment count plus one, and the range of each address segment is calculated based on the starting logical block address, the number of logical block addresses, and the segment count.

[0070] In some preferred embodiments, executing the query command to determine the identity of one or more reclaim units corresponding to the logical block address range includes: Parse the query command and perform a validity check on the command parameters; After the legality verification is passed, the mapping table from logical address to physical address is queried according to the logical block address range to obtain the corresponding physical page number as the identity identifier of the recycling unit.

[0071] In some preferred embodiments, the step of counting the number of reclaimed units occupied by the logical block address range based on the identity identifiers of the one or more reclaimed units includes: Traverse all logical block addresses within the specified logical block address range; By querying the mapping table from logical address to physical address, the identity identifier of the recycling unit corresponding to each logical block address can be obtained; The total number of different reclaim unit identifiers appearing within the address range of the logical block is counted.

[0072] In some preferred embodiments, returning the quantity information of the recycling units to the host includes: For queries involving a single logical block address range, the quantity information is returned directly through the result field of the completed queue entries; When querying multiple logical block address ranges, the number of successfully processed address ranges is returned through the result field of the completed queue entry, while the number of reclaimable units corresponding to each address range is written to the host memory region specified by the query command.

[0073] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0074] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0075] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the following steps: Receive a query command sent by the host, wherein the query command is used to request information on the number of recycling units corresponding to a specified logical block address range within the solid-state drive; Execute the query command to determine the identity of one or more recycling units corresponding to the logical block address range; Based on the identity identifiers of the one or more recycling units, count the number of recycling units occupied by the logical block address range; The quantity information of the recycling units is returned to the host.

[0076] In some preferred embodiments, the command parameters of the query command include the starting logical block address, the number of logical block addresses, and the segment count.

[0077] In some preferred embodiments, if the value of the segment count is zero, the logical block address range is a single continuous range, determined by the starting logical block address and the number of logical block addresses.

[0078] In some preferred embodiments, if the segment count is greater than zero, the logical block address range includes multiple consecutive address segments, the number of address segments is the segment count plus one, and the range of each address segment is calculated based on the starting logical block address, the number of logical block addresses, and the segment count.

[0079] In some preferred embodiments, executing the query command to determine the identity of one or more reclaim units corresponding to the logical block address range includes: Parse the query command and perform a validity check on the command parameters; After the legality verification is passed, the mapping table from logical address to physical address is queried according to the logical block address range to obtain the corresponding physical page number as the identity identifier of the recycling unit.

[0080] In some preferred embodiments, the step of counting the number of reclaimed units occupied by the logical block address range based on the identity identifiers of the one or more reclaimed units includes: Traverse all logical block addresses within the specified logical block address range; By querying the mapping table from logical address to physical address, the identity identifier of the recycling unit corresponding to each logical block address can be obtained; The total number of different reclaim unit identifiers appearing within the address range of the logical block is counted.

[0081] In some preferred embodiments, returning the quantity information of the recycling units to the host includes: For queries involving a single logical block address range, the quantity information is returned directly through the result field of the completed queue entries; When querying multiple logical block address ranges, the number of successfully processed address ranges is returned through the result field of the completed queue entry, while the number of reclaimable units corresponding to each address range is written to the host memory region specified by the query command.

[0082] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0083] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0084] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0085] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0086] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0087] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0088] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.

[0089] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for improving the accuracy of an SSD FDP function, comprising: Applied to solid-state drives, the method includes: Receive a query command sent by the host, wherein the query command is used to request information on the number of recycling units corresponding to a specified logical block address range within the solid-state drive; Execute the query command to determine the identity of one or more recycling units corresponding to the logical block address range; Based on the identity identifiers of the one or more recycling units, count the number of recycling units occupied by the logical block address range; The quantity information of the recycling units is returned to the host.

2. The method of claim 1, wherein the SSD promotion FDP function accuracy is improved by, The command parameters of the query command include the starting logical block address, the number of logical block addresses, and the segment count.

3. The method of claim 2, wherein the SSD promotion FDP function accuracy is improved by, If the value of the segment count is zero, the logical block address range is a single continuous range, determined by the starting logical block address and the number of logical block addresses.

4. The method of claim 3, wherein the FDP function accuracy of the SSD is improved. If the segment count is greater than zero, the logical block address range includes multiple consecutive address segments. The number of address segments is the segment count plus one, and the range of each address segment is calculated based on the starting logical block address, the number of logical block addresses, and the segment count.

5. The method of claim 1, wherein the SSD promotion FDP function accuracy is improved by, The execution of the query command to determine the identity of one or more reclaim units corresponding to the logical block address range includes: Parse the query command and perform a validity check on the command parameters; After the legality verification is passed, the mapping table from logical address to physical address is queried according to the logical block address range to obtain the corresponding physical page number as the identity identifier of the recycling unit.

6. The method for improving the accuracy of FDP function in SSDs according to claim 5, characterized in that, The step of counting the number of reclaimed units occupied by the logical block address range based on the identity identifiers of the one or more reclaimed units includes: Traverse all logical block addresses within the specified logical block address range; By querying the mapping table from logical address to physical address, the identity identifier of the recycling unit corresponding to each logical block address can be obtained; The total number of different reclaim unit identifiers appearing within the address range of the logical block is counted.

7. The method for improving the accuracy of FDP function in SSDs according to claim 4, characterized in that, The step of returning the quantity information of the recycling units to the host includes: For queries involving a single logical block address range, the quantity information is returned directly through the result field of the completed queue entries; When querying multiple logical block address ranges, the number of successfully processed address ranges is returned through the result field of the completed queue entry, while the number of reclaimable units corresponding to each address range is written to the host memory region specified by the query command.

8. A device for improving the accuracy of FDP function in SSDs, characterized in that, Includes a unit for performing the method as described in any one of claims 1-7.

9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.