Solid state disk data reading method and device, computer device and storage medium
By storing and filtering data in the solid-state drive controller unit, the problems of data transmission bandwidth consumption and host load pressure in existing technologies are solved, and efficient data acquisition is achieved.
Patent Information
- Application Number
- CN202211041856.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-08-29
AI Technical Summary
In existing technologies, solid-state drives (SSDs) need to transfer all data to the host and filter it during data reading, which leads to increased bandwidth usage and increased host load.
After receiving a data read command in the solid-state drive controller unit, the data is stored in the subsystem memory and filtered in memory. Only data that meets the command requirements is returned to the host, reducing the transmission of unnecessary data.
This effectively reduces the amount of data transfer and bandwidth usage between the host and the solid-state drive, lowers the load on the host, and improves data acquisition efficiency.
Smart Images

Figure CN115454334B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer data processing technology, and in particular to a solid-state drive data reading method, apparatus, computer device, and storage medium. Background Technology
[0002] In existing technologies, solid-state drive (SSD) data reading and filtering generally includes the following process: Step A: The host sends an SSD data reading command to the SSD controller unit; Step B: The SSD controller unit reads the corresponding data from the SSD based on the SSD data reading command and returns the data to the host; Step C: The host reads and filters the data returned by the SSD controller unit.
[0003] Based on existing solid-state drive (SSD) data reading solutions, when acquiring SSD data, all data needs to be read from the SSD and transferred to the host, which then filters the read data. The SSD data transferred to the host contains a lot of data that the host does not need, which increases bandwidth usage during data transfer and increases the load on the host during data filtering.
[0004] Therefore, there is an urgent need to propose a method, device, computer equipment, and storage medium for reading solid-state drives (SSDs) that can effectively reduce the amount of data transfer between SSDs and the host, reduce data transfer bandwidth usage, and reduce the load on the host. Summary of the Invention
[0005] Therefore, it is necessary to provide a solid-state drive (SSD) data acquisition method, apparatus, computer equipment, and storage medium that can effectively reduce the amount of data transfer between the SSD and the host, reduce the data transfer bandwidth usage, and effectively improve the data acquisition efficiency of the SSD, in response to the above-mentioned technical problems.
[0006] On the one hand, a method for acquiring data from a solid-state drive (SSD) is provided, the method being applied to a SSD controller unit, the method comprising:
[0007] Step A: Receive data read command from SSD;
[0008] Step B: Read the solid-state drive data according to the solid-state drive data read instruction, and store the solid-state drive data in the subsystem memory;
[0009] Step C: Based on the solid-state drive data read instruction, filter the solid-state drive data in the subsystem memory to obtain solid-state drive data that meets the requirements of the solid-state drive data read instruction.
[0010] In one embodiment, before receiving a solid-state drive (SSD) data read instruction, the method further includes: the host generating an SSD data read instruction, the SSD data read instruction including a data read range and data filtering conditions; and the host sending the SSD data read instruction to the SSD main control unit.
[0011] In one embodiment, after receiving a solid-state drive (SSD) data read instruction, the method further includes: parsing the SSD data read instruction to obtain the data read range and the data filtering conditions; reading SSD data according to the data read range and storing the SSD data in the subsystem memory; filtering the SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions; returning the SSD data to the host and clearing the SSD data in the subsystem memory.
[0012] In one embodiment, when reading solid-state drive (SSD) data according to the data reading range, the method further includes: determining whether the data reading range involves multiple SSDs based on the data reading range; if the data reading range involves multiple SSDs, partitioning the subsystem memory based on the SSDs to obtain subsystem memory blocks; storing each SSD data into the subsystem memory block, with each SSD corresponding to a subsystem memory block; and, according to the data filtering conditions, starting multiple threads to simultaneously filter the SSD data in the subsystem memory block to obtain SSD data that meets the data filtering conditions.
[0013] In one embodiment, before filtering the solid-state drive (SSD) data in the subsystem memory according to the data filtering conditions, the method further includes: determining whether the SSD data in the subsystem memory is encrypted; if so, obtaining a decryption function based on the SSD data and decrypting the SSD data in the subsystem memory; filtering the decrypted SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions; if not, filtering the SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions.
[0014] In one embodiment, before returning the solid-state drive (SSD) data to the host, the method further includes: parsing whether the SSD data read instruction contains a return SSD data format requirement; if the SSD data read instruction contains the return SSD data format requirement, then performing format conversion on the SSD data until the return SSD data format requirement is met.
[0015] In one embodiment, before clearing the solid-state drive (SSD) data in the subsystem memory, the method further includes: filtering out frequently read data ranges on the SSD based on the data read range; accumulating the frequency of the frequently read data ranges on the SSD; if the frequency of the data read ranges exceeds a preset first threshold, then the SSD data is not cleared, and SSD data storage information is returned to the SSD main control unit; otherwise, the SSD data is cleared.
[0016] On the other hand, a solid-state drive (SSD) data acquisition device is provided, the device being disposed in the SSD main control unit, the device comprising:
[0017] Command receiving module, used to receive solid-state drive data read commands;
[0018] A data transmission module is used to read solid-state drive data according to the solid-state drive data read instruction and store the solid-state drive data in the subsystem memory;
[0019] The data filtering module is used to filter the solid-state drive data in the subsystem memory according to the solid-state drive data read instruction, and obtain solid-state drive data that meets the requirements of the solid-state drive data read instruction.
[0020] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0021] Step A: Receive data read command from SSD;
[0022] Step B: Read the solid-state drive data according to the solid-state drive data read instruction, and store the solid-state drive data in the subsystem memory;
[0023] Step C: Based on the solid-state drive data read instruction, filter the solid-state drive data in the subsystem memory to obtain solid-state drive data that meets the requirements of the solid-state drive data read instruction.
[0024] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0025] Step A: Receive data read command from SSD;
[0026] Step B: Read the solid-state drive data according to the solid-state drive data read instruction, and store the solid-state drive data in the subsystem memory;
[0027] Step C: Based on the solid-state drive data read instruction, filter the solid-state drive data in the subsystem memory to obtain solid-state drive data that meets the requirements of the solid-state drive data read instruction.
[0028] The aforementioned solid-state drive (SSD) data acquisition method, apparatus, computer equipment, and storage medium involve an SSD main control unit receiving an SSD data read instruction; reading SSD data according to the instruction and storing the SSD data in a subsystem memory; filtering the SSD data in the subsystem memory based on the instruction to obtain SSD data that meets the requirements of the instruction. After receiving the SSD data read instruction from the host, the SSD main control unit processes the relevant SSD data based on the instruction, only selecting the SSD data that meets the host's requirements and returning it to the host. This eliminates the need for the host to receive SSD data that does not meet its needs, effectively reducing the amount of data transfer and bandwidth usage between the host and the SSD.
[0029] The aforementioned solid-state drive (SSD) data acquisition method, apparatus, computer equipment, and storage medium, wherein when the SSD main control unit reads SSD data according to the data reading range contained in the SSD data read instruction, it determines whether the data reading range involves multiple SSDs; if the data reading range involves multiple SSDs, it partitions the subsystem memory based on the SSDs to obtain subsystem memory blocks; each SSD data is stored in the subsystem memory block, with each SSD corresponding one-to-one with the subsystem memory block; according to the data filtering conditions, multiple threads are started to simultaneously filter the SSD data in the subsystem memory blocks to obtain SSD data that meets the data filtering conditions. By dividing the SSD data requested by the host into units based on the SSDs and starting multiple threads to process the SSD data based on the SSD data read instruction, the efficiency of SSD data acquisition is improved.
[0030] It should be understood that not all products of this invention need to possess all of the above-mentioned technical effects. Attached Figure Description
[0031] Figure 1 This is an application environment diagram of a solid-state drive data acquisition method in one embodiment;
[0032] Figure 2 This is a flowchart illustrating a solid-state drive data acquisition method in one embodiment;
[0033] Figure 3 This is a flowchart illustrating a solid-state drive data acquisition method in one embodiment;
[0034] Figure 4 This is a block diagram of a solid-state drive data acquisition system in one embodiment;
[0035] Figure 5 This is a structural block diagram of a solid-state drive data acquisition device in one embodiment;
[0036] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0038] The solid-state drive data acquisition method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. The solid-state drive (SSD) controller unit is located within server 104, and the host sends SSD data retrieval commands to the SSD controller unit within server 104 via terminal 102. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be a standalone server or a server cluster consisting of multiple servers.
[0039] In one embodiment, such as Figure 2 As shown, a method for acquiring data from a solid-state drive is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:
[0040] Step A: Receive data read command from SSD;
[0041] Step B: Read the solid-state drive data according to the solid-state drive data read instruction, and store the solid-state drive data in the subsystem memory;
[0042] Step C: Based on the solid-state drive data read instruction, filter the solid-state drive data in the subsystem memory to obtain solid-state drive data that meets the requirements of the solid-state drive data read instruction.
[0043] In the aforementioned solid-state drive (SSD) data reading method, the SSD controller unit processes the relevant SSD data within the SSD based on the SSD data reading command sent by the host. Only after the processed SSD data meets the requirements of the SSD data reading command is the SSD data sent to the host. In contrast, in existing technologies, when the host acquires SSD data, it needs to receive a large amount of SSD data that it does not need. After receiving a large amount of SSD data, it then filters out the SSD data that it needs. The aforementioned SSD data acquisition method not only effectively avoids the technical drawback of the host needing to receive a large amount of SSD data that it does not need, reducing the host's load pressure, but also effectively reduces the amount of data transfer and the data transfer bandwidth occupancy between the host and the SSD.
[0044] In one embodiment, before receiving a solid-state drive (SSD) data read instruction, the method further includes: the host generating an SSD data read instruction, the SSD data read instruction including a data read range and data filtering conditions; and the host sending the SSD data read instruction to the SSD main control unit.
[0045] Specifically, the solid-state drive (SSD) data read command can be encrypted using a key to ensure that it is not tampered with before being transmitted to the SSD controller unit. The key used to encrypt and decrypt the SSD data read command includes a public key and a private key, which are respectively kept by the host and the SSD controller unit to enable encryption and decryption of the SSD data read command.
[0046] In one embodiment, such as Figure 3 As shown, after receiving the solid-state drive data read command, the method further includes:
[0047] The system parses the solid-state drive (SSD) data read command to obtain the data read range and the data filtering conditions; reads SSD data according to the data read range and stores the SSD data in the subsystem memory; filters the SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions; returns the SSD data to the host and clears the SSD data in the subsystem memory.
[0048] It should be understood that the data reading range includes: the solid-state drives (SSDs) involved in the SSD data requested by the host, and also the range of SSD data requested by the host to read within each SSD. Specifically, the range of SSD data requested by the host to read within each SSD can be from one byte address to another; when the SSD data is structured data, the range of SSD data requested by the host to read within each SSD can also be a segment or segments of the structured data.
[0049] In one embodiment, when reading solid-state drive data according to the data reading range, the method further includes:
[0050] Based on the data reading range, determine whether the data reading range involves multiple solid-state drives (SSDs); if the data reading range involves multiple SSDs, then partition the subsystem memory based on the SSDs to obtain subsystem memory blocks; store the data of each SSD into the subsystem memory block, with each SSD corresponding to a subsystem memory block; according to the data filtering conditions, start multiple threads to simultaneously filter the SSD data in the subsystem memory block to obtain SSD data that meets the data filtering conditions.
[0051] In one embodiment, before filtering the solid-state drive data in the subsystem memory according to the data filtering conditions, the method further includes:
[0052] Determine whether the solid-state drive (SSD) data in the subsystem memory is encrypted; if so, obtain a decryption function based on the SSD data and decrypt the SSD data in the subsystem memory; filter the decrypted SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions; if not, filter the SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions.
[0053] Specifically, the method further includes: pre-generating a decryption function set; specifically, generating the decryption function set includes: when encrypting solid-state drive data in advance, obtaining the encryption function that encrypts the solid-state drive data; generating decryption functions based on the encryption functions, wherein the decryption functions correspond one-to-one with the solid-state drive data; establishing an index relationship based on the encryption functions, decryption functions, and the solid-state drive data to generate a data model; naming the mathematical model based on the solid-state drive data, and generating a decryption function set based on the mathematical model.
[0054] In one embodiment, based on the solid-state drive (SSD) data, a decryption function is obtained to decrypt the SSD data in the subsystem memory, including: obtaining the SSD data information; obtaining a mathematical model from a set of decryption functions based on the SSD data information; obtaining a decryption function based on the mathematical model; and decrypting the SSD data in the subsystem memory based on the decryption function.
[0055] In one embodiment, before returning the solid-state drive data to the host, the method further includes:
[0056] The system analyzes whether the solid-state drive (SSD) data read instruction contains a return SSD data format requirement; if the SSD data read instruction contains the return SSD data format requirement, the system performs format conversion on the SSD data until the return SSD data format requirement is met.
[0057] In one embodiment, before clearing the solid-state drive data in the subsystem memory, the method further includes:
[0058] Based on the data read range, the frequently read data range on the solid-state drive (SSD) is selected. The frequency of each frequently read data range on the SSD is accumulated. If the frequency of reading this data range exceeds a preset first threshold, the SSD data is not cleared, and SSD data storage information is returned to the SSD controller unit. Otherwise, the SSD data is cleared. When the host requests access to SSD data within this data read range again, the SSD controller unit does not need to send the SSD data within this data read range to the subsystem memory, reducing data transfer between the SSD and the subsystem memory.
[0059] It should be understood that, although Figure 2-3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2-3 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0060] In one embodiment, such as Figure 4As shown, a solid-state drive (SSD) data acquisition system is provided, the system including an SSD data acquisition device and an SSD data acquisition instruction generation device.
[0061] In one embodiment, the solid-state drive (SSD) data acquisition device is located in the SSD main control unit, such as... Figure 5 As shown, the solid-state drive data acquisition device includes: an instruction receiving module, a data transmission module, and a data filtering module, wherein:
[0062] Command receiving module, used to receive solid-state drive data read commands;
[0063] A data transmission module is used to read solid-state drive data according to the solid-state drive data read instruction and store the solid-state drive data in the subsystem memory;
[0064] The data filtering module is used to filter the solid-state drive data in the subsystem memory according to the solid-state drive data read instruction, and obtain solid-state drive data that meets the requirements of the solid-state drive data read instruction.
[0065] In one embodiment, the solid-state drive data acquisition instruction generation device is disposed within the host computer, and the solid-state drive data acquisition instruction generation device further includes: an instruction generation module and an instruction sending module, wherein:
[0066] The instruction generation module is used to generate solid-state drive data reading instructions, which include data reading range and data filtering conditions.
[0067] The instruction sending module is used to send the solid-state drive data read instruction to the solid-state drive main control unit.
[0068] In one embodiment, the solid-state drive data acquisition device further includes: an instruction parsing module and a data return module, wherein:
[0069] The instruction parsing module is used to parse the solid-state drive data read instruction and obtain the data read range and the data filtering conditions;
[0070] The data transmission module is used to read solid-state drive data according to the data reading range and store the solid-state drive data in the subsystem memory;
[0071] The data filtering module is used to filter the solid-state drive data in the subsystem memory according to the data filtering conditions, and obtain solid-state drive data that meets the data filtering conditions.
[0072] The data return module is used to return the solid-state drive data to the host and clear the solid-state drive data in the subsystem memory.
[0073] In one embodiment, the solid-state drive data acquisition device further includes a subsystem memory partitioning module;
[0074] The instruction parsing module is used to determine whether the data reading range involves multiple solid-state drives based on the data reading range;
[0075] The subsystem memory partitioning module, if the data reading range involves multiple solid-state drives, is used to partition the subsystem memory based on the solid-state drives to obtain subsystem memory blocks;
[0076] The data transmission module is used to store each solid-state drive data into the subsystem memory block, and the solid-state drive corresponds one-to-one with the subsystem memory block;
[0077] The data filtering module is used to initiate multiple threads to simultaneously filter solid-state drive data in the subsystem memory block according to the data filtering conditions, and obtain solid-state drive data that meets the data filtering conditions.
[0078] In one embodiment, the solid-state drive (SSD) data acquisition unit further includes: a data encryption / decryption module, used to determine whether the SSD data in the subsystem memory is encrypted; if so, it is further used to obtain a decryption function based on the SSD data and decrypt the SSD data in the subsystem memory; according to the data filtering conditions, it filters the decrypted SSD data in the subsystem memory to obtain SSD data that meets the data filtering conditions; if not, it is further used to filter the SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions.
[0079] In one embodiment, the instruction parsing module is further configured to parse whether the solid-state drive data read instruction contains a return solid-state drive data format requirement; if the solid-state drive data read instruction contains the return solid-state drive data format requirement, then the solid-state drive data is format converted until the return solid-state drive data format requirement is met.
[0080] In one embodiment, the data filtering unit is further configured to filter out the frequently read data range on the solid-state drive based on the data reading range; and to accumulate the frequency of the frequently read data range on the solid-state drive. If the frequency of the data reading range being read exceeds a preset first threshold, the solid-state drive data is not cleared, and solid-state drive data storage information is returned to the solid-state drive main control unit; otherwise, the solid-state drive data is cleared.
[0081] Specific limitations regarding the solid-state drive (SSD) data acquisition device can be found in the limitations of the SSD data acquisition method described above, and will not be repeated here. Each module in the aforementioned SSD data acquisition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0082] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a solid-state drive data acquisition method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0083] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0084] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0085] Step A: Receive data read command from SSD;
[0086] Step B: Read the solid-state drive data according to the solid-state drive data read instruction, and store the solid-state drive data in the subsystem memory;
[0087] Step C: Based on the solid-state drive data read instruction, filter the solid-state drive data in the subsystem memory to obtain solid-state drive data that meets the requirements of the solid-state drive data read instruction.
[0088] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0089] The host generates a solid-state drive (SSD) data read instruction, which includes a data read range and data filtering conditions; the host sends the SSD data read instruction to the SSD main control unit.
[0090] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0091] The system parses the solid-state drive (SSD) data read command to obtain the data read range and the data filtering conditions; reads SSD data according to the data read range and stores the SSD data in the subsystem memory; filters the SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions; returns the SSD data to the host and clears the SSD data in the subsystem memory.
[0092] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0093] Based on the data reading range, determine whether the data reading range involves multiple solid-state drives (SSDs); if the data reading range involves multiple SSDs, then partition the subsystem memory based on the SSDs to obtain subsystem memory blocks; store the data of each SSD into the subsystem memory block, with each SSD corresponding to a subsystem memory block; according to the data filtering conditions, start multiple threads to simultaneously filter the SSD data in the subsystem memory block to obtain SSD data that meets the data filtering conditions.
[0094] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0095] Determine whether the solid-state drive (SSD) data in the subsystem memory is encrypted; if so, obtain a decryption function based on the SSD data and decrypt the SSD data in the subsystem memory; filter the decrypted SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions; if not, filter the SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions.
[0096] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0097] The system analyzes whether the solid-state drive (SSD) data read instruction contains a return SSD data format requirement; if the SSD data read instruction contains the return SSD data format requirement, the system performs format conversion on the SSD data until the return SSD data format requirement is met.
[0098] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0099] Based on the data reading range, the frequently read data range on the solid-state drive is selected; the frequency of the frequently read data range on the solid-state drive is accumulated. If the frequency of the data reading range exceeds a preset first threshold, the solid-state drive data is not cleared, and solid-state drive data storage information is returned to the solid-state drive main control unit; otherwise, the solid-state drive data is cleared.
[0100] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0101] Step A: Receive data read command from SSD;
[0102] Step B: Read the solid-state drive data according to the solid-state drive data read instruction, and store the solid-state drive data in the subsystem memory;
[0103] Step C: Based on the solid-state drive data read instruction, filter the solid-state drive data in the subsystem memory to obtain solid-state drive data that meets the requirements of the solid-state drive data read instruction.
[0104] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0105] The host generates a solid-state drive (SSD) data read instruction, which includes a data read range and data filtering conditions; the host sends the SSD data read instruction to the SSD main control unit.
[0106] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0107] The system parses the solid-state drive (SSD) data read command to obtain the data read range and the data filtering conditions; reads SSD data according to the data read range and stores the SSD data in the subsystem memory; filters the SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions; returns the SSD data to the host and clears the SSD data in the subsystem memory.
[0108] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0109] Based on the data reading range, determine whether the data reading range involves multiple solid-state drives (SSDs); if the data reading range involves multiple SSDs, then partition the subsystem memory based on the SSDs to obtain subsystem memory blocks; store the data of each SSD into the subsystem memory block, with each SSD corresponding to a subsystem memory block; according to the data filtering conditions, start multiple threads to simultaneously filter the SSD data in the subsystem memory block to obtain SSD data that meets the data filtering conditions.
[0110] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0111] Determine whether the solid-state drive (SSD) data in the subsystem memory is encrypted; if so, obtain a decryption function based on the SSD data and decrypt the SSD data in the subsystem memory; filter the decrypted SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions; if not, filter the SSD data in the subsystem memory according to the data filtering conditions to obtain SSD data that meets the data filtering conditions.
[0112] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0113] The system analyzes whether the solid-state drive (SSD) data read instruction contains a return SSD data format requirement; if the SSD data read instruction contains the return SSD data format requirement, the system performs format conversion on the SSD data until the return SSD data format requirement is met.
[0114] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0115] Based on the data reading range, the frequently read data range on the solid-state drive is selected; the frequency of the frequently read data range on the solid-state drive is accumulated. If the frequency of the data reading range exceeds a preset first threshold, the solid-state drive data is not cleared, and solid-state drive data storage information is returned to the solid-state drive main control unit; otherwise, the solid-state drive data is cleared.
[0116] Those skilled in the art will understand 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 can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0118] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for acquiring data from a solid-state drive, characterized in that, The method is applied to the solid-state drive controller unit, and the method includes: Receive solid-state drive (SSD) data read command, wherein the SSD data read command includes data read range and data filtering conditions; Parse the solid-state drive data read command to obtain the data read range and the data filtering conditions; Read solid-state drive data according to the data reading range, and store the solid-state drive data in the subsystem memory; Based on the data filtering criteria, the solid-state drive data in the subsystem memory is filtered to obtain solid-state drive data that meets the data filtering criteria; The process of reading solid-state drive (SSD) data according to the data reading range and storing the SSD data in the subsystem memory includes: Based on the data reading range, determine whether the data reading range involves multiple solid-state drives; If the data reading range involves multiple solid-state drives (SSDs), then the subsystem memory is partitioned based on the SSDs to obtain subsystem memory blocks; Each solid-state drive (SSD) data is stored in the subsystem memory block, and the SSD corresponds one-to-one with the subsystem memory block; Based on the data filtering criteria, the solid-state drive (SSD) data in the subsystem memory is filtered to obtain SSD data that meets the data filtering criteria, including: Based on the data filtering criteria, multiple threads are started to simultaneously filter the solid-state drive data in the subsystem memory block to obtain solid-state drive data that meets the data filtering criteria.
2. The solid-state drive data acquisition method according to claim 1, characterized in that, Before receiving a solid-state drive data read command, the method further includes: The host generates a data read command from the solid-state drive; The host sends a data read command from the solid-state drive to the solid-state drive controller unit.
3. The solid-state drive data acquisition method according to claim 2, characterized in that, After obtaining solid-state drive data that meets the data filtering criteria, the method further includes: Return the solid-state drive data to the host and clear the solid-state drive data from the subsystem memory.
4. The solid-state drive data acquisition method according to claim 1, characterized in that, Before filtering the solid-state drive data in the subsystem memory according to the data filtering conditions, the method further includes: Determine whether the solid-state drive data in the subsystem memory is encrypted; If so, based on the solid-state drive data, a decryption function is obtained to decrypt the solid-state drive data in the subsystem memory; according to the data filtering conditions, the decrypted solid-state drive data in the subsystem memory is filtered to obtain solid-state drive data that meets the data filtering conditions; If not, then according to the data filtering conditions, the solid-state drive data in the subsystem memory is filtered to obtain solid-state drive data that meets the data filtering conditions.
5. The solid-state drive data acquisition method according to claim 3, characterized in that, Before returning the solid-state drive data to the host, the method further includes: Analyze whether the solid-state drive data read command contains the required solid-state drive data format. If the solid-state drive data read instruction includes the return solid-state drive data format requirement, then the solid-state drive data is format converted until the return solid-state drive data format requirement is met.
6. The solid-state drive data acquisition method according to claim 5, characterized in that, Before clearing the solid-state drive data in the subsystem memory, the method further includes: Based on the data reading range, the range of data that is frequently read on the solid-state drive is selected; The frequency of frequently read data ranges on the solid-state drive is accumulated. If the frequency of reading the data range exceeds a preset first threshold, the solid-state drive data is not cleared, and solid-state drive data saving information is returned to the solid-state drive main control unit; otherwise, the solid-state drive data is cleared.
7. A solid-state drive data reading device for implementing the solid-state drive data acquisition method according to any one of claims 1-6, characterized in that, The device is disposed in the solid-state drive main control unit, and the device includes: Command receiving module, used to receive solid-state drive data read commands; A data transmission module is used to read solid-state drive data according to the solid-state drive data read instruction and store the solid-state drive data in the subsystem memory; The data filtering module is used to filter the solid-state drive data in the subsystem memory according to the solid-state drive data read instruction, and obtain solid-state drive data that meets the requirements of the solid-state drive data read instruction.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for improving sequential reading flow performance in solid state disk, and solid state disk
CN107274923A
Data dispersion-based memory management
US20220066646A1