A method, device and product for controlling NVMe KV SSD data processing behavior
By using the combination of the rule key interface and the storage option SO domain in the NVMe specification, the problem of limited bits in the NVMe specification is solved, diversified storage behavior control of SSD is realized, and the efficient matching needs of business systems and SSD are met. , achieving refined processing of stored data.
Patent Information
- Application Number
- CN202411025525.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing NVMe specifications reserve limited bits in the storage option SO domain, and cannot effectively control the diversified storage behaviors between business systems and SSDs, and cannot meet the requirements for high storage matching between business systems and SSDs as they continue to evolve.
By calling the rule key Key interface provided by the SSD side of the solid state drive, set the key composition rules, construct the rule key Key, and enable its matching in the NVMe storage command to achieve target processing method matching and storage processing of the data to be stored, which is flexible fully support diverse storage requirements.
It achieves refined processing of storage data, meets the requirements for efficient matching of business systems and SSDs, solves the problem of the NVMe specification constraining the number of SO domains, and improves data compression and storage efficiency.
Smart Images

Figure CN118550478B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data storage, and in particular relates to a method, device and product for controlling NVMe KV SSD data processing behavior. Background Art
[0002] NVMe (Non-Volatile Memory Express, non-volatile memory host controller interface specification) is an interface specification for storage devices and is also the latest storage device communication protocol. Like SAS (Serial Attached SCSI, an enterprise-level storage interface standard based on SATA) and SATA (Serial Advanced Technology Attachment, a hard disk interface specification jointly proposed by Intel, IBM, Dell, APT, Maxtor and Seagate), it is used to define hardware interfaces and transmission protocols.
[0003] In the Key Value Command Set of the NVMe 2.0 protocol family, the storage command store command defines the storage option SO (Store Option) domain, which has a total of 8 bits (i.e., from bit 15 to bit 8) to control the behavior of the storage command store command. Currently, 3 bits are used in the SO domain: bit 10 is set to 1, indicating a request to enable data compression; bit 9 is set to 1, indicating that the key Key exists but no data is saved; bit 8 is set to 1, indicating that the key Key does not exist and no data is saved; and bits 15 to 11 are reserved bits. It can be seen that there are only 5 bits that can be used later, which limits the scalable business control behavior.
[0004] In addition, the bits in the SO domain can only represent the enabling relationship and cannot completely control the business behavior. For example, business scenarios will generate multiple types of data to be stored. Selecting matching compression algorithms for different types of data to be stored for compression and storage will improve the data compression effect. If the solid-state drive SSD (Solid State Disk or Solid State Drive, also known as solid-state drive, is a hard disk made of solid-state electronic storage chip array) can provide multiple compression algorithms, then the business system can tell the SSD to use the specified compression algorithm to process the data in the write request according to the current data type, which can more effectively improve the space utilization efficiency of the SSD. However, the current NVMe specification only sets bit 10 to 1 to indicate that the SSD needs to compress and store the data to be stored in this write request, but there is no way to control which compression algorithm the SSD uses, so the SSD cannot be allowed to perform optimal compression on the data to be stored to achieve the purpose of efficient use of SSD space.
[0005] In summary, due to the ever-changing interactive behaviors between business systems and SSDs, the 5 bits reserved in the SO domain are insufficient to support the diverse storage requirements of business systems (such as compression requirements, encryption requirements, requirements for designated deletion of duplicate data, etc.). Therefore, how to provide a flexible and scalable data processing behavior control solution to meet the evolving requirements of highly matching business systems and SSD storage is a topic that technicians in this field need to study urgently. Summary of the invention
[0006] The purpose of the present invention is to provide a NVMe KV SSD data processing behavior control method, device, computer device, computer-readable storage product and computer program product to solve the problem that the existing NVMe specification cannot meet the ever-evolving demand for highly matched storage between business systems and SSDs, thereby achieving the purpose of refined processing of stored data.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] In a first aspect, a method for controlling NVMe KV SSD data processing behavior is provided, which is executed by a business system end that is communicatively connected to a solid state drive SSD end, and includes:
[0009] Calling an interface provided by the solid state drive SSD and used to configure a rule key, setting a key composition rule for indicating the use of a target processing method supported by the solid state drive SSD, wherein the rule key refers to a key used by the business system side to construct business data according to a key composition convention, and the key composition convention refers to an agreement made by the solid state drive SSD side on the composition of the key according to the business scenario;
[0010] When first data to be stored that needs to be stored and processed using the target processing method is obtained, a first key Key corresponding to the first data to be stored and which is a rule key Key is constructed according to the key composition rule;
[0011] Adding the first key Key to the key Key field of the first key-value KV write request, and adding the first to-be-stored data to the value Value field of the first key-value KV write request;
[0012] A first NVMe storage command carrying the first key-value KV write request and indicating in the storage option SO field that a rule key matching of the key in the key field can be enabled is sent to the solid state drive SSD end, so that after receiving the first NVMe storage command, the solid state drive SSD end first enables the rule key matching of the key in the key field according to the parsing result of the storage option SO field: extracts the first key from the key field, matches the target processing method according to the first key, and then uses the target processing method to store and process the first data to be stored extracted from the value field.
[0013] Based on the above invention content, a new scheme for controlling data processing behavior by combining key composition rules and storage option SO domain is provided, that is, first calling the interface provided by the solid state drive SSD and used to configure the rule key Key, setting the key composition rule for indicating the use of the target processing method, and then when the to-be-stored data that needs to be compressed and stored using the target processing method is obtained, a corresponding key Key that is the rule key Key is constructed for the data according to the key composition rule, and the key Key and the data are added to the key field and value field of the key-value KV write request respectively, and finally the key Key carrying the request and indicating in the storage option SO field that the data can be processed in the key Ke The key Key in the y domain is used to match the rule key Key. The storage command is sent to the SSD end to instruct the SSD end to match the target processing method according to the key Key extracted from the key domain, and use this method to store and process the data extracted from the value domain. In this way, since only the SO domain is required to indicate that the rule key Key matching can be enabled, even if the reserved bits are limited, it is sufficient to flexibly and scalably support the diversified storage requirements of the business system, solves the problem of the existing NVMe specification constraints on the number of SO domains, and can meet the ever-changing and highly matched storage requirements of the business system and SSD, and achieve the purpose of refined processing of stored data, which is convenient for practical application and promotion.
[0014] In one possible design, the method further includes:
[0015] When second data to be stored that does not need to be stored using any processing method supported by the solid state drive SSD is obtained, directly constructing a corresponding second key Key that is not a rule key Key for the second data to be stored;
[0016] Adding the second key Key to the key Key field of the second key-value KV write request, and adding the second to-be-stored data to the value Value field of the second key-value KV write request;
[0017] A second NVMe storage command carrying the second key value KV write request and indicating in the storage option SO field that rule key matching of the key in the key field is not enabled is sent to the solid state drive SSD end, so that after receiving the second NVMe storage command, the solid state drive SSD end does not enable rule key matching of the key in the key field based on the parsing result of the storage option SO field, but directly stores and processes the second data to be stored extracted from the value field of the second key value KV write request.
[0018] In a possible design, the key composition rule is a prefix form of a preset specific character, a suffix form of a preset specific character, or a regular expression matching the preset specific character.
[0019] In a possible design, the target processing method is a deduplication processing method, a lossless compression processing method, a lossy compression processing method, a symmetric encryption processing method, or an asymmetric encryption processing method.
[0020] In one possible design, indicating in the storage option SO field that the key Key in the key Key field can be matched as a rule key Key includes: setting any reserved bit in the storage option SO field to 1 to indicate that the key Key in the key Key field can be matched as a rule key Key.
[0021] In one possible design, the method further includes:
[0022] When the solid state drive SSD determines any processing method supported by the solid state drive SSD according to the failure to match the first key Key, the solid state drive SSD directly stores the first data to be stored extracted from the value Value domain.
[0023] In a second aspect, an NVMe KV SSD data processing behavior control device is provided, which is arranged in a business system end that is communication-connected to a solid-state drive SSD end, and includes a rule setting unit, a key construction unit, a request construction unit, and a command sending unit that are communication-connected in sequence;
[0024] The rule setting unit is used to call an interface provided by the solid state drive SSD side and used to configure a rule key Key, and set a key composition rule for indicating the use of a target processing method supported by the solid state drive SSD side, wherein the rule key Key refers to a key Key used by the business system side to construct business data according to a key composition convention, and the key composition convention refers to an agreement made by the solid state drive SSD side on the composition of the key Key according to a business scenario;
[0025] The key construction unit is used to construct a first key that is a rule key and corresponds to the first data to be stored according to the key composition rule when the first data to be stored that needs to be stored and processed using the target processing method is obtained;
[0026] The request construction unit is used to add the first key Key to the key Key field of the first key-value KV write request, and add the first to-be-stored data to the value Value field of the first key-value KV write request;
[0027] The command sending unit is used to send a first NVMe storage command that carries the first key-value KV write request and indicates in the storage option SO field that a rule key matching of the key in the key field can be enabled to the solid-state drive SSD end, so that after receiving the first NVMe storage command, the solid-state drive SSD end first enables the rule key matching of the key in the key field according to the parsing result of the storage option SO field: extracts the first key from the key field, matches the target processing method according to the first key, and then uses the target processing method to store the first data to be stored extracted from the value field.
[0028] In a third aspect, the present invention provides a computer device comprising a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the NVMe KVSSD data processing behavior control method as described in the first aspect or any possible design of the first aspect.
[0029] In a fourth aspect, the present invention provides a computer-readable storage product having instructions stored thereon. When the instructions are run on a computer, the NVMe KV SSD data processing behavior control method as described in the first aspect or any possible design of the first aspect is executed.
[0030] In a fifth aspect, the present invention provides a computer program product, including a computer program or instructions, which, when executed by a computer, implements the NVMe KV SSD data processing behavior control method as described in the first aspect or any possible design of the first aspect.
[0031] Beneficial effects of the above scheme:
[0032] (1) The present invention creatively provides a new solution for controlling data processing behavior by combining key composition rules and storage option SO domain, that is, first calling the interface provided by the solid state drive SSD and used to configure the rule key Key, setting the key composition rule for indicating the use of the target processing method, and then when the to-be-stored data that needs to be compressed and stored using the target processing method is obtained, constructing a corresponding key Key for the data according to the key composition rule and being the rule key Key, and adding the key Key and the data to the key field and value field of the key-value KV write request respectively, and finally carrying the request and indicating in the storage option SO field that the processing is enabled. A storage command for matching the key in the key domain with the rule key is sent to the SSD end, so as to instruct the SSD end to match the target processing method according to the key extracted from the key domain, and use this method to store and process the data extracted from the value domain. In this way, since only the SO domain is required to indicate the matching of the rule key, even if the reserved bits are limited, it is sufficient to flexibly and scalably support the diversified storage requirements of the business system, solve the problem of the existing NVMe specification's constraint on the number of SO domains, and thus meet the evolving requirements of the business system and the highly matched storage of the SSD, and achieve the purpose of refined processing of the stored data;
[0033] (2) It can also achieve the purpose of controlling data storage and processing without special processing methods, further improving practicality;
[0034] (3) It can also help the business system to flexibly select data storage functions that match the SSD according to the business type of the data, so that after the data is handed over to the SSD, the SSD will process and store the data to achieve the optimal data storage purpose, which is convenient for practical application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.
[0036] Figure 1 A flowchart of the NVMe KV SSD data processing behavior control method provided in an embodiment of the present application.
[0037] Figure 2 A schematic diagram of the structure of the NVMe KV SSD data processing behavior control device provided in an embodiment of the present application.
[0038] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structures of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these embodiments without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0040] It should be understood that although the terms first and second, etc. may be used herein to describe various objects, these objects should not be limited by these terms. These terms are only used to distinguish one object from another object. For example, a first object can be referred to as a second object, and similarly, a second object can be referred to as a first object without departing from the scope of the exemplary embodiments of the present invention.
[0041] It should be understood that the term "and / or" that may appear in this document is merely a description of the association relationship between associated objects, indicating that there may be three relationships. For example, A and / or B can indicate three situations: A exists alone, B exists alone, or A and B exist at the same time. For another example, A, B and / or C can indicate the existence of any one of A, B and C or any combination of them. The term " / and" that may appear in this document describes another type of association object relationship, indicating that there may be two relationships. For example, A / and B can indicate two situations: A exists alone or A and B exist at the same time. In addition, the character " / " that may appear in this document generally indicates that the previous and next associated objects are in an "or" relationship.
[0042] Example
[0043] like Figure 1 As shown, the NVMe KV SSD data processing behavior control method provided in the first aspect of this embodiment can be, but is not limited to, executed by a business system end that is connected to the solid state drive SSD end and has certain computing resources, such as a business system server. Figure 1 As shown, the NVMe KV SSD data processing behavior control method may include but is not limited to the following steps S1 to S4.
[0044] S1. Call the interface provided by the solid state drive SSD and used to configure the rule key Key, set the key composition rule for indicating the use of the target processing method supported by the solid state drive SSD end, wherein the rule key Key refers to the key Key used by the business system side to construct the business data according to the key composition convention, and the key composition convention refers to the convention made by the solid state drive SSD side on the composition of the key Key based on the business scenario.
[0045] In the step S1, considering that the existing NVMe KV specification defines a key-value type interface, a key-value KV (Key-Value) write request of the business system will include two fields, namely, a key field and a value field, wherein the maximum length of the key field is 16 bytes; although the key in the key field is usually customized by the business system, in fact, the solid-state drive SSD can also make certain agreements on the composition of the key according to specific segmented business scenarios, and then the business system constructs the key of the business data (i.e., the rule key) according to the agreement. Therefore, an interface for configuring the rule key can be provided on the solid-state drive SSD side for use by the business system side, so as to set the key composition rule based on the interface routinely, wherein the interface can be a custom command of the NVMe specification, or a standard command, and the specific configuration content is a certain business function of the solid-state drive SSD, corresponding to the composition mode of the key (i.e., the composition rule). In addition, the business system side refers to the side at the business system end, and the solid-state drive SSD side refers to the side at the solid-state drive SSD end.
[0046] In the step S1, considering that from the perspective of computer processing, keys are all binary character sets, so the key composition rule is specifically but not limited to a prefix form of a preset specific character (such as a binary specific character, an ASCII code specific character, or a specific string composed of ordinary characters and special characters, etc.), a suffix form of a preset specific character, or a regular expression matching the preset specific character, wherein the regular expression can be composed of ordinary characters (such as letters and numbers, etc.) and special characters (called metacharacters), which give the regular expression a special meaning so that it can perform complex text matching tasks. The target processing method needs to belong to a processing method that can be supported by the solid state drive SSD end, specifically but not limited to a deduplication processing method (i.e., deleting specified duplicate data), a lossless compression processing method (such as a processing method based on the Deflate compression algorithm, the GZIP compression algorithm, the LZO compression algorithm, the LZ4 compression algorithm, the Snappy compression algorithm), a lossy compression processing method, a symmetric encryption processing method, or an asymmetric encryption processing method, etc. In addition, the aforementioned Deflate compression algorithm (i.e., a lossless data compression algorithm that uses both the LZ77 algorithm and Huffman coding), GZIP compression algorithm (i.e., the abbreviation of GNUzip, a file compression algorithm), LZO compression algorithm (Lempel-Ziv-Oberhumer, a data compression algorithm dedicated to decompression speed, this algorithm is a lossless algorithm, and the reference implementation program is thread-safe), LZ4 compression algorithm (i.e., a dictionary-based compression algorithm that maintains a fixed-size dictionary to find repeated patterns in input data) and Snappy compression algorithm (i.e., an algorithm for quickly compressing and decompressing data) are all existing data compression algorithms, and the symmetric encryption processing method and the asymmetric encryption processing method can all be conventionally implemented based on the existing corresponding data encryption algorithms, and the specific principles are not repeated here.
[0047] S2. When the first data to be stored that needs to be stored and processed using the target processing method is obtained, a first key Key corresponding to the first data to be stored and which is a rule key Key is constructed according to the key composition rule.
[0048] In the step S2, the first data to be stored is the first business data to be written into the solid state drive SSD.
[0049] S3. Add the first key Key to the Key field of the first key-value KV write request, and add the first to-be-stored data to the Value field of the first key-value KV write request.
[0050] S4. Send the first NVMe storage command that carries the first key-value KV write request and indicates in the storage option SO field that the key in the key field can be matched with the rule key to the solid state drive SSD end, so that after receiving the first NVMe storage command, the solid state drive SSD end first enables the key in the key field to be matched with the rule key according to the parsing result of the storage option SO field: extracts the first key from the key field, matches the target processing method according to the first key, and then uses the target processing method to store the first data to be stored extracted from the value field.
[0051] In step S4, the specific method of indicating in the storage option SO field that the key in the key field is enabled to match the rule key may be, but is not limited to, a bit-based enabling relationship representation method, that is, specifically, any reserved bit in the storage option SO field is set to 1 to indicate that the rule key matching is enabled for the key in the key field. For example, the bit 11 may be set to 1 to indicate that the rule key matching is enabled for the key in the key field, so that when the solid state drive SSD finds that the bit 11 is 1 based on the analysis result of the storage option SO field, the rule key matching for the key in the key field is started. Since the first key is constructed according to the key composition rule, and the key composition rule is set by calling the interface provided by the solid state drive SSD and used to configure the rule key, the target processing method can be conventionally matched according to the first key at the solid state drive SSD end. In addition, considering that there may be a matching failure, in order to be able to store the first data to be stored, preferably, the method also includes: when the solid state drive SSD end determines any processing method supported by the solid state drive SSD end according to the first key Key not matching, the first data to be stored is directly stored and processed from the value Value domain.
[0052] Therefore, based on the NVMe KV SSD data processing behavior control method described in the aforementioned steps S1 to S4, a new scheme for controlling data processing behavior by combining key composition rules and storage option SO domain is provided, that is, first calling the interface provided by the solid state drive SSD and used to configure the rule key, setting the key composition rule for indicating the use of the target processing method, and then when the to-be-stored data that needs to be compressed and stored using the target processing method is obtained, constructing a corresponding key that is the rule key for the data according to the key composition rule, and adding the key and the data to the key domain and value domain of the key-value KV write request respectively, and finally carrying the request and indicating in the storage option SO domain that enabling is performed on the The storage command for matching the key in the key domain with the rule key is sent to the SSD end to instruct the SSD end to match the target processing method according to the key extracted from the key domain, and use this method to store and process the data extracted from the value domain. In this way, since only the SO domain indication is required to enable the matching of the rule key, even if the reserved bits are limited, it is sufficient to flexibly and scalably support the diversified storage demands of the business system, solving the problem of the number of SO domains in the existing NVMe specification, and thus meeting the ever-evolving demands for highly matched storage between the business system and the SSD, achieving the purpose of refined processing of stored data, and facilitating practical application and promotion.
[0053] Based on the technical solution of the first aspect mentioned above, this embodiment also provides a possible design of how to control data storage processing without special processing mode, that is, the method also includes but is not limited to the following steps S51 to S53.
[0054] S51. When second data to be stored that does not need to be stored using any processing method supported by the solid state drive SSD is obtained, a corresponding second key Key that is not a regular key Key is directly constructed for the second data to be stored.
[0055] In the step S51, the second data to be stored is the second business data to be written into the solid state drive SSD. In addition, the specific construction process of the second key Key can be conventionally implemented in an existing manner that is customized by the business system.
[0056] S52. Add the second key Key to the Key field of the second key-value KV write request, and add the second data to be stored to the Value field of the second key-value KV write request.
[0057] S53. Send a second NVMe storage command that carries the second key value KV write request and indicates in the storage option SO field that rule key matching of the key in the key field is not enabled to the solid state drive SSD end, so that after receiving the second NVMe storage command, the solid state drive SSD end does not enable rule key matching of the key in the key field based on the parsing result of the storage option SO field, but directly stores and processes the second data to be stored extracted from the value field of the second key value KV write request.
[0058] In the step S53, any one of the reserved bits can be set to 0 to indicate that the key in the key field cannot be matched with the rule key. For example, bit 11 can be set to 0 to indicate that the key in the key field cannot be matched with the rule key. In this way, when the solid state drive SSD finds that bit 11 is 0 based on the analysis result of the storage option SO field, the second data to be stored extracted from the value field of the second key value KV write request is directly stored.
[0059] Therefore, based on the aforementioned possible design one, it is also possible to achieve the purpose of controlling data storage and processing without special processing methods, further improving practicality.
[0060] like Figure 2 As shown, the second aspect of this embodiment provides a virtual device for implementing the NVMe KV SSD data processing behavior control method described in the first aspect or any possible design in the first aspect, which is arranged in the business system end of the solid-state hard disk SSD end that is communicatively connected, and includes a rule setting unit, a key construction unit, a request construction unit, and a command sending unit that are sequentially communicatively connected;
[0061] The rule setting unit is used to call an interface provided by the solid state drive SSD side and used to configure a rule key Key, and set a key composition rule for indicating the use of a target processing method supported by the solid state drive SSD side, wherein the rule key Key refers to a key Key used by the business system side to construct business data according to a key composition convention, and the key composition convention refers to an agreement made by the solid state drive SSD side on the composition of the key Key according to a business scenario;
[0062] The key construction unit is used to construct a first key that is a rule key and corresponds to the first data to be stored according to the key composition rule when the first data to be stored that needs to be stored and processed using the target processing method is obtained;
[0063] The request construction unit is used to add the first key Key to the key Key field of the first key-value KV write request, and add the first to-be-stored data to the value Value field of the first key-value KV write request;
[0064] The command sending unit is used to send a first NVMe storage command that carries the first key-value KV write request and indicates in the storage option SO field that a rule key matching of the key in the key field can be enabled to the solid-state drive SSD end, so that after receiving the first NVMe storage command, the solid-state drive SSD end first enables the rule key matching of the key in the key field according to the parsing result of the storage option SO field: extracts the first key from the key field, matches the target processing method according to the first key, and then uses the target processing method to store the first data to be stored extracted from the value field.
[0065] The working process, working details and technical effects of the aforementioned device provided in the second aspect of this embodiment can be referred to the NVMe KV SSD data processing behavior control method described in the first aspect or any possible design in the first aspect, and will not be repeated here.
[0066] like Figure 3 As shown, the third aspect of this embodiment provides a computer device for executing the NVMe KV SSD data processing behavior control method as described in the first aspect or any possible design in the first aspect, including a memory, a processor and a transceiver connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program, and execute the NVMe KV SSD data processing behavior control method as described in the first aspect or any possible design in the first aspect. For example, the memory may include, but is not limited to, a random access memory (Random-Access Memory, RAM), a read-only memory (Read-Only Memory, ROM), a flash memory (Flash Memory), a first-in-first-out memory (First Input First Output, FIFO) and / or a first-in-last-out memory (First Input Last Output, FILO), etc.; the processor may be, but is not limited to, a microprocessor of the STM32F105 series. In addition, the computer device may also include, but is not limited to, a power module, a display screen and other necessary components.
[0067] The working process, working details and technical effects of the aforementioned computer device provided in the third aspect of this embodiment can be referred to the first aspect or any possible design of the NVMe KV SSD data processing behavior control method described in the first aspect, and will not be repeated here.
[0068] The fourth aspect of this embodiment provides a computer-readable storage product that stores instructions including the NVMe KV SSD data processing behavior control method as described in the first aspect or any possible design in the first aspect, that is, the computer-readable storage product stores instructions, and when the instructions are run on a computer, the NVMe KV SSD data processing behavior control method as described in the first aspect or any possible design in the first aspect is executed. Wherein, the computer-readable storage product refers to a carrier for storing data, which may include but is not limited to computer-readable storage products such as floppy disks, optical disks, hard disks, flash memories, USB flash drives and / or memory sticks (Memory Stick), and the computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices.
[0069] The working process, working details and technical effects of the aforementioned computer-readable storage product provided in the fourth aspect of this embodiment can be referred to the NVMe KV SSD data processing behavior control method described in the first aspect or any possible design in the first aspect, and will not be repeated here.
[0070] A fifth aspect of the present embodiment provides a computer program product, including a computer program or an instruction, wherein the computer program or the instruction, when executed by a computer, implements the NVMe KV SSD data processing behavior control method as described in the first aspect or any possible design in the first aspect. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0071] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for controlling NVMe KV SSD data processing behavior, characterized in that: The process is executed by the business system end that is connected to the solid state drive SSD end through communication, including: Calling an interface provided by the solid state drive SSD and used to configure a rule key, setting a key composition rule for indicating the use of a target processing method supported by the solid state drive SSD, wherein the rule key refers to a key used by the business system side to construct business data according to a key composition convention, and the key composition convention refers to an agreement made by the solid state drive SSD side on the composition of the key according to the business scenario; When first data to be stored that needs to be stored and processed using the target processing method is obtained, a first key Key corresponding to the first data to be stored and which is a rule key Key is constructed according to the key composition rule; Adding the first key Key to the key Key field of the first key-value KV write request, and adding the first to-be-stored data to the value Value field of the first key-value KV write request; A first NVMe storage command carrying the first key-value KV write request and indicating in the storage option SO field that a rule key matching of the key in the key field can be enabled is sent to the solid state drive SSD end, so that after receiving the first NVMe storage command, the solid state drive SSD end first enables the rule key matching of the key in the key field according to the parsing result of the storage option SO field: extracts the first key from the key field, matches the target processing method according to the first key, and then uses the target processing method to store and process the first data to be stored extracted from the value field.
2. The NVMe KV SSD data processing behavior control method according to claim 1, characterized in that: The method further comprises: When second data to be stored that does not need to be stored using any processing method supported by the solid state drive SSD is obtained, directly constructing a corresponding second key Key that is not a rule key Key for the second data to be stored; Adding the second key Key to the key Key field of the second key-value KV write request, and adding the second to-be-stored data to the value Value field of the second key-value KV write request; A second NVMe storage command carrying the second key value KV write request and indicating in the storage option SO field that rule key matching of the key in the key field is not enabled is sent to the solid state drive SSD end, so that after receiving the second NVMe storage command, the solid state drive SSD end does not enable rule key matching of the key in the key field based on the parsing result of the storage option SO field, but directly stores and processes the second data to be stored extracted from the value field of the second key value KV write request.
3. The NVMe KV SSD data processing behavior control method according to claim 1, characterized in that: The key composition rule is a prefix form of a preset specific character, a suffix form of a preset specific character, or a regular expression matching the preset specific character.
4. The NVMe KV SSD data processing behavior control method according to claim 1, characterized in that: The target processing method is a deduplication processing method, a lossless compression processing method, a lossy compression processing method, a symmetric encryption processing method or an asymmetric encryption processing method.
5. The NVMe KV SSD data processing behavior control method according to claim 1, characterized in that: Indicating in the storage option SO field that the key Key in the key field is enabled to match the rule key Key includes: setting any reserved bit in the storage option SO field to 1 to indicate that the key Key in the key field is enabled to match the rule key Key.
6. The NVMe KV SSD data processing behavior control method according to claim 1, characterized in that: The method further comprises: When the solid state drive SSD determines any processing method supported by the solid state drive SSD according to the failure to match the first key Key, the solid state drive SSD directly stores the first data to be stored extracted from the value Value domain.
7. An NVMe KV SSD data processing behavior control device, characterized in that: Arranged in the business system end of the communication connection solid state drive SSD end, including a rule setting unit, a key construction unit, a request construction unit and a command sending unit which are sequentially connected in communication; The rule setting unit is used to call an interface provided by the solid state drive SSD side and used to configure a rule key Key, and set a key composition rule for indicating the use of a target processing method supported by the solid state drive SSD side, wherein the rule key Key refers to a key Key used by the business system side to construct business data according to a key composition convention, and the key composition convention refers to an agreement made by the solid state drive SSD side on the composition of the key Key according to a business scenario; The key construction unit is used to construct a first key that is a rule key and corresponds to the first data to be stored according to the key composition rule when the first data to be stored that needs to be stored and processed using the target processing method is obtained; The request construction unit is used to add the first key Key to the key Key field of the first key-value KV write request, and add the first to-be-stored data to the value Value field of the first key-value KV write request; The command sending unit is used to send a first NVMe storage command that carries the first key-value KV write request and indicates in the storage option SO field that a rule key matching of the key in the key field can be enabled to the solid-state drive SSD end, so that after receiving the first NVMe storage command, the solid-state drive SSD end first enables the rule key matching of the key in the key field according to the parsing result of the storage option SO field: extracts the first key from the key field, matches the target processing method according to the first key, and then uses the target processing method to store the first data to be stored extracted from the value field.
8. A computer device, characterized in that: It includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the NVMe KV SSD data processing behavior control method as described in any one of claims 1 to 6.
9. A computer readable storage product, characterized in that The computer-readable storage product stores instructions, and when the instructions are run on a computer, the NVMe KV SSD data processing behavior control method as described in any one of claims 1 to 6 is executed.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or the instruction is executed by a computer, the NVMe KV SSD data processing behavior control method as described in any one of claims 1 to 6 is implemented.
