CN117421258A - SSD data storage optimization method, SSD data storage optimization device, computer equipment and SSD data storage optimization medium - Google Patents
SSD data storage optimization method, SSD data storage optimization device, computer equipment and SSD data storage optimization medium Download PDFInfo
- Publication number
- CN117421258A CN117421258A CN202311629473.3A CN202311629473A CN117421258A CN 117421258 A CN117421258 A CN 117421258A CN 202311629473 A CN202311629473 A CN 202311629473A CN 117421258 A CN117421258 A CN 117421258A
- Authority
- CN
- China
- Prior art keywords
- data
- physical address
- mapping
- garbage
- command
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000013500 data storage Methods 0.000 title claims abstract description 56
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000005457 optimization Methods 0.000 title claims abstract description 29
- 238000013507 mapping Methods 0.000 claims abstract description 117
- 238000012545 processing Methods 0.000 claims abstract description 44
- 238000004891 communication Methods 0.000 claims description 29
- 238000003909 pattern recognition Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 13
- 230000011218 segmentation Effects 0.000 claims description 12
- 238000012795 verification Methods 0.000 claims description 6
- 238000012937 correction Methods 0.000 claims description 5
- 238000007781 pre-processing Methods 0.000 claims description 2
- 239000007787 solid Substances 0.000 description 15
- 230000008569 process Effects 0.000 description 11
- 230000006870 function Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000009191 jumping Effects 0.000 description 3
- 238000011084 recovery Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0253—Garbage collection, i.e. reclamation of unreferenced memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/06—Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
- G06F12/0646—Configuration or reconfiguration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0877—Cache access modes
- G06F12/0882—Page mode
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides an SSD data storage optimization method, an SSD data storage optimization device, a computer device and a medium, and after a host device is started, the method and the device sequentially execute: initializing a preset data feature table, configuring the initialized data feature table into a hardware identification engine, dividing a processing command sent by a host device according to a preset dividing rule to obtain a command mapping unit, and mapping the command mapping unit containing a read command according to a preset mapping information table to obtain a corresponding mapping physical address; the background scans whether the corresponding mapping physical address in the mapping information table is a garbage physical address; if the data is present, the data is marked as garbage data, the parameter value of the mapping physical address which accords with the data characteristic of the garbage physical address is modified into a special parameter value, and the garbage data is replaced.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an optimization method and apparatus for SSD data storage, a computer device, and a medium.
Background
With the rapid development of technology, high-end computer equipment is integrated into most of technology enterprises nowadays, general high-end computer equipment is provided with a plurality of SSD solid state disks, because SSD solid state disks have excellent reading performance, in the process of data transmission, a physical address mapping table for data access needs to be established with a computer, data of the physical address mapping table needs to be rewritten, LPA is converted into LPA addresses, values of L2P need to be queried in advance so as to acquire new physical addresses, so that read-write operation is initiated on NAND, because the erasing life of NAND physical blocks is limited, and when the internal physical space of SSD solid state disks is full, an instruction for triggering data garbage recovery is needed so as to release the data space, the process can lead to the consumed excessive erasing life of the NAND physical blocks, in order to avoid frequently triggering the scene, the operating system is required to clear redundant data packets with special physical addresses in order to release the storage space, however, the conventional solid state disks cannot clear the redundant data packets from the special physical addresses, and seriously affect the storage efficiency and the daily service efficiency of SSD. Therefore, the method in the prior art has the problem that the storage space of the storage device cannot be effectively optimized in the use process of the storage device.
Disclosure of Invention
The embodiment of the invention provides an SSD data storage optimization method, an SSD data storage optimization device, computer equipment and a SSD data storage medium, and aims to solve the problem that a storage space cannot be effectively optimized in the use process of storage equipment in the existing method.
In a first aspect, an embodiment of the present invention provides a method for optimizing SSD data storage, where the method includes:
initializing a preset data feature table, and configuring the initialized data feature table into a hardware identification engine, wherein the hardware identification engine is in communication connection with a main control chip.
And dividing the processing command sent by the host equipment according to a preset dividing rule to obtain a command mapping unit.
And mapping the command mapping unit containing the read command according to a preset mapping information table to obtain a corresponding mapping physical address.
And the background scans the garbage physical address in the corresponding mapping physical address in the mapping information table.
And if the data characteristics are met, modifying the value in the mapping information table and marking the original physical address as junk data.
And modifying the parameter values of the mapping table which accords with the preset data characteristics into special parameter values, and replacing the special parameter values with the garbage data.
In a second aspect, an embodiment of the present invention further provides an SSD data storage optimization apparatus, where the apparatus includes:
the communication unit is used for initializing a preset data feature table and configuring the initialized data feature table into a hardware identification engine, and the hardware identification engine is in communication connection with the main control chip.
And the information segmentation unit is used for segmenting the processing command sent by the host equipment according to a preset segmentation rule so as to obtain the command mapping unit.
And the mapping processing unit is used for carrying out mapping processing on the command mapping unit containing the read command according to a preset mapping information table to obtain a corresponding mapping physical address.
And the background scanning unit is used for scanning whether the corresponding mapping physical address in the mapping information table is a garbage physical address or not in the background.
And the marking unit is used for judging that if the mapping physical address with the preset data characteristic exists, the original mapping physical address is marked as junk data.
And the parameter replacement unit is used for modifying the parameter value of the mapping physical address which accords with the data characteristic of the garbage physical address into a special parameter value and replacing the special parameter value with the garbage data.
In a third aspect, an embodiment of the present invention further provides a computer device, where the apparatus includes: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus.
And a memory for storing a computer program.
A processor for implementing the steps of an optimization method for SSD data storage as described in the first aspect when executing a program stored on a memory.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of an optimization method for SSD data storage as described in the first aspect.
Compared with the prior art, the invention has the following advantages:
the embodiment of the invention provides an SSD data storage optimizing method, device, computer equipment and medium, after starting host equipment, carrying out storage optimization sequentially through the following steps, initializing a preset data feature table, configuring the initialized data feature table into a hardware identification engine, carrying out communication connection between the hardware identification engine and a main control chip, dividing a processing command sent by the host equipment according to a preset dividing rule to obtain a command mapping unit, carrying out mapping processing on the command mapping unit containing a read command according to a preset mapping information table to obtain a corresponding mapping physical address, scanning whether the corresponding mapping physical address in the mapping information table is a garbage physical address in the background, marking the original mapping physical address as garbage data if the mapping physical address which accords with the preset data feature exists, modifying a parameter value of the mapping physical address which accords with the data feature of the garbage physical address into a special parameter value, and replacing the garbage data with the special parameter value.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a general flow chart of an optimization method for SSD data storage according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of an SSD data storage optimizing device according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of a computer device provided by an embodiment of the present invention;
fig. 4 is another overall flowchart of an optimization method for SSD data storage according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of 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 as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
The embodiment of the invention provides an SSD data storage optimizing method, which is applied to a main control chip of a storage device, the storage device further comprises a data storage module electrically connected with the main control chip, the data storage module is a nonvolatile storage medium, the main control chip is in communication connection with a controller in a host device, and referring to FIG. 1, as shown in the figure, the method comprises substeps S101-S107.
S101, initializing a preset data feature table, and configuring the initialized data feature table into a hardware identification engine, wherein the hardware identification engine is in communication connection with a main control chip.
The step S101 further includes the sub-steps of: the background executes a read request to perform a read operation according to a valid target physical address in the read request.
In this embodiment of the present invention, the data feature table is an address detection specification comparison table for detecting data of the SSD solid state disk, and the hardware recognition engine is a device for performing reading and writing on the storage module and comparing the data content with the user data defined in the data feature table.
Specifically, an initialization operation is performed on a preset data feature table, the initialized data feature table is configured in a hardware identification engine, the hardware identification engine is in communication connection with a main control chip, a background executes a read request to execute the read operation according to an effective target physical address in the read request, the hardware identification engine is a read-write device which is independently arranged through initializing the data feature table in advance, the read-write device is in communication connection with the main control chip, the hardware identification engine mainly receives the initialized data feature table, and is convenient for subsequent execution of the read-write operation of a storage module and the related operation of mode switching between read-write modes.
After the background execution of the read request is completed to execute the read operation according to the effective target physical address in the read request, the method further comprises the following substeps:
and identifying the data information stored in the data storage module according to the data characteristic table to obtain corresponding identification information.
And generating a corresponding execution command according to the type of the identification information, wherein the execution command is to perform data decoding and error correction on the data storage module and perform matching verification on the data characteristic table.
Specifically, before executing and receiving a command to be processed from the controller, dividing the command to be processed into command mapping units according to a preset dividing rule, a reading operation is needed, wherein the reading operation is a process of executing a reading request by a background to execute the reading operation according to an effective target physical address in the reading request, so as to execute the reading operation on a storage area in a data storage module associated with the target physical address, further execute a data feature table to identify data information stored in the data storage module, obtain corresponding identification information, further generate a corresponding execution command, and sequentially perform data decoding and error correction on the data storage module, and perform matching verification on the data feature table.
Further, in an embodiment, a data pattern recognition hardware engine and a data pattern recognition processing module are reasonably allocated before an SSD solid state disk scanning and recognition process is executed, when initialization is performed, a data feature template is preferably built in the SSD solid state disk, if a user needs to call a special data feature currently being recognized, the computer calls the special data feature through a built-in main control chip, and for a read request (a data reading instruction sent by the user), whether the data feature recognition needs to be triggered (a judgment execution flow is executed) is set according to the need: for example, for host reading (data reading operation by a computer), it is set to be unnecessary. And setting the background data processing as required, setting a data pattern recognition hardware engine, for a request marked as required to trigger data feature recognition, after the data is loaded/decoded, checking the request, outputting an indication whether any data feature in a feature template is hit, when the background data processing module receives a read completion command, checking the data feature indication on the request, if any template is hit, submitting the request to the data pattern recognition processing module, modifying a mapping table to mark the GPPA (a NAND physical address and public physical Address) as garbage data, indicating that the L2P feature value corresponding to the template index can be recovered according to the data feature template, writing the L2P (a user output feature character string) table corresponding to the LPA (a logical physical address Logic physical Address) after the request is read by a subsequent host, inquiring the corresponding L2P value by the mapping table module, and if the specific L2P value defined in the template is hit, directly constructing the corresponding feature data, and returning the corresponding feature data to the SSD (a Solid State Disk) without setting the Solid State memory to the Solid State Disk, thereby improving the storage rate of the Solid State Disk, and conveniently storing the garbage data.
S102, dividing the processing command sent by the host equipment according to a preset dividing rule to obtain a command mapping unit.
In the embodiment of the scheme, the command to be processed is that a user needs to send a read-write command (read-write detection command) to a specified SSD, the segmentation rule is specific rule information for segmenting the SSD, segmentation parameters are set in the segmentation rule, if the typical segmentation parameters are 4kB, command mapping units corresponding to the segmentation parameters can be obtained through segmentation parameters in the segmentation rule, and the command mapping units obtained through segmentation are single miniature mapping units.
S103, mapping the command mapping unit containing the read command according to a preset mapping information table to obtain a corresponding mapping physical address.
In this embodiment of the present disclosure, the mapping process is to associate the corresponding command mapping unit with the spare storage space in the data storage module, so that the connection is established by establishing a storage address, and the mapped physical address is the address (such as the number of DIE/Block/Page) of the NAND where data is actually stored.
Specifically, the mapping processing process in the embodiment of the scheme is to establish data connection with the command mapping unit through the preset mapping information table, and then to perform association between the data storage address and the corresponding nonvolatile storage medium (sector storage area) of the data storage module after importing the storage address, so that a user can perform a series of processing operations on the read-write operation of the subsequent data conveniently.
Further, in one embodiment, the identification information is used to identify whether the physical address is converted into a corresponding execution signal (used to convert the GPPA value or the special value), if the physical address is converted into the corresponding execution signal (used to convert the GPPA value or the special value), the physical address is converted into the GPPA value (a NAND physical address) if the physical address is valid, the host data associated with the corresponding index (LPA) is represented in the storage location on the NAND, if the physical address is converted into the special value, the host data associated with the corresponding index (LPA) is represented in the storage location, the corresponding physical address Block X Page 255 and Block Y Page 3 are converted into invalid data, and the invalid data represents that the stored data is old data at the host (the same LPA is rewritten). For file deletion operation, the operating system marks file deletion as available for new data, and then sends TRIM command to the data storage module (SSD solid state disk). After the command is executed, when new data is written into the flash memory page, the SSD does not retain any content of the block, so that less write amplification (less writing) and higher write throughput (no need of reading, erasing and modifying) are realized, and the invalid data (invalid redundant data) of command marks are increased.
Further, in one embodiment, physical pages containing invalid data may be freed up in subsequent garbage collection to provide more physical space for subsequent writes. The more invalid data (the less valid data) in the SSD, the more available space is, and the lower the garbage recovery cost is, so that the storage space utilization rate of the data storage module (SSD solid state disk or other read-write hard disk) is improved, and the optimization performance of the data storage module is improved.
S104, the background scans whether the corresponding mapping physical address in the mapping information table is a garbage physical address.
Specifically, the background scans the garbage physical address, which is used for distinguishing whether the garbage physical address is an effective physical address or a garbage physical address, so that the garbage data can be conveniently and subsequently processed, and the overall space recovery efficiency of the solid state disk is improved.
Further, in one embodiment, since the physical page data within the SSD physical block includes two branches, split into valid data and invalid data, valid data: to represent that the currently stored data is the last data written by the host and the subsequent host needs to return the content, the data is invalid: the data stored is the host-side old data (after which the same LPA is overwritten). Or the host directly issues the invalid data of the TRIM command mark, and two different parameter values are built in an L2P (user output characteristic character string) table, one type is GPPA value and NAND physical address, which represent the storage position of the host data associated with the corresponding index (LPA) on the NAND, and the other type is nomap parameter value.
S105, if the mapping physical address of the preset data feature exists, the original mapping physical address is marked as junk data.
In this embodiment of the present invention, the mapping physical address of the preset data feature is a garbage physical address, the original mapping physical address is address information in the mapping information table to be modified, and the marking process is to mark the modified address mapped data (including a large amount of garbage data) as garbage data.
Specifically, if the mapping physical address which accords with the data characteristic of the garbage physical address exists, the original mapping physical address is marked as garbage data, and the storage space matched with the garbage physical address is conveniently and subsequently identified, so that the storage space containing the garbage physical address is effectively cleaned, the space occupation of redundant data is reduced, the read-write speed of an SSD hard disk is further increased, and the overall service life of the SSD solid state hard disk is prolonged.
S106, modifying the parameter value of the mapping physical address which accords with the data characteristic of the garbage physical address into a special parameter value, and replacing the garbage data with the special parameter value.
In this embodiment of the present invention, the storage space corresponding to the garbage physical address in the mapping information table is garbage data, and the replacing process is to replace the garbage data matched with the garbage physical address by the parameter value matched with the special mapping physical table.
The step S106 further includes: and identifying a physical storage space matched with the garbage physical address in the mapped physical address, identifying the data stored in the matched physical storage space as garbage data needing preprocessing, and calculating the data size of the garbage data.
Specifically, when the physical storage space matched with the garbage physical address in the mapping physical address is identified, the size of the storage space is calculated, so that the garbage data can be cleaned conveniently by a computer.
Before the step S105 is performed, the method further includes the following sub-steps:
the data pattern recognition processing module marks the GPPA physical address stored in the data characteristic table.
The data pattern recognition processing module modifies the corresponding L2P value in the data feature table into a special parameter value.
In this embodiment, the special parameter value is a nomap value or the programming code byte contains an invalid parameter value.
Specifically, the data pattern recognition processing module marks the parameter value containing the GPPA physical address by performing two different operations on the GPPA physical address and the L2P value in the data feature table, modifies the parameter containing the L2P value, and then the modified parameter value is a parameter value with a nomap value, and at the moment, the parameter of the nomap value is the parameter value needing to replace garbage data.
Furthermore, by carrying out corresponding parameter modification on two different parameter values in the data characteristic table, the space of the garbage data is ensured to be released quickly, so that the SSD physical storage is optimized.
Referring to fig. 2, as shown, an SSD data storage optimization device 100 includes: a communication unit 110, an information dividing unit 120, a mapping processing unit 130, a background scanning unit 140, a marking unit 150, and a parameter modifying unit 160.
The communication unit 110 performs an initializing operation on a preset data feature table, and configures the initialized data feature table into a hardware identification engine, where the hardware identification engine is in communication connection with the main control chip.
The information dividing unit 120 is configured to divide the processing command sent by the host device according to a preset dividing rule, so as to obtain a command mapping unit.
The mapping processing unit 130 is configured to perform mapping processing on the command mapping unit including the read command according to a preset mapping information table, so as to obtain a corresponding mapped physical address.
The background scanning unit 140 is configured to scan, in the background, whether the corresponding mapping physical address in the mapping information table is a garbage physical address.
And the marking unit 150 is configured to determine that if there is a mapped physical address that matches the data characteristic of the garbage physical address, the original mapped physical address is marked as garbage data.
A parameter replacing unit 160, configured to modify a parameter value of a mapped physical address that accords with a data characteristic of the garbage physical address into a special parameter value, and replace the garbage data with the special parameter value.
Specifically, the device for optimizing the SSD physical storage provided by the embodiment of the invention is applied to the method for optimizing the SSD data storage, and the method comprises the following steps: the first step is performed: initializing a preset data feature table, and configuring the initialized data feature table into a hardware identification engine, wherein the hardware identification engine is in communication connection with a main control chip; the second step is performed: the processing command processing unit is used for dividing the processing command sent by the host equipment according to a preset dividing rule to obtain a command mapping unit; the third step is performed: mapping the command mapping unit containing the read command according to a preset mapping information table to obtain a corresponding mapping physical address; the fourth step is executed: the method is used for scanning whether the corresponding mapping physical address in the mapping information table is a garbage physical address or not in the background; and fifthly, executing the judgment, if the mapping physical address conforming to the data characteristic of the garbage physical address exists, marking the original mapping physical address as garbage data, and sixthly executing: and modifying the parameter value of the mapping physical address which accords with the data characteristic of the garbage physical address into a special parameter value, and replacing the garbage data with the special parameter value.
Referring to fig. 4, as shown in the drawing, fig. 4 is a flowchart illustrating steps performed by the method, in which the following steps may be sequentially performed:
step 1: powering up the system; step 2: initializing a data characteristic table and configuring the data characteristic table to a data pattern recognition hardware engine; step 3: judging whether to trigger a background task; if not, continuing to execute the step (4); if yes, jumping to execute the step (5); step 4: and normally processing the host command, and jumping to the step 3 after finishing. Step 5: and starting the execution of the background data processing module (namely the main control chip of the scheme). Step 6: a read-write instruction is initiated to the target physical address containing valid data for the host, and the read request is marked as "data pattern recognition is required". Step 7: the back-end module initiates a read operation according to the NAND (memory) physical address; step 8: finishing NAND (memory) data loading, and finishing execution steps such as data decoding, error correction and the like; step 9: at this time, the data pattern recognition hardware engine judges whether pattern recognition is needed; step 10: performing data matching verification according to the data characteristic table; step 11: marking the matching result in the control request and returning the matching result to the background data processing module step by step; step 12: the background data processing module judges whether the specific data characteristics are matched; if not, continuing to execute the step 13; if yes, jump to step 14; step 13: processing is done along the conventional path (e.g., data is written to the new physical address …) and jumps after completion. Step 14: the LPA/GPPA/data feature index value is submitted to a data pattern recognition processing module. Step 15: and the data pattern recognition processing module marks the GPPA physical address storing the LPA as garbage data for release. Step 16: the data pattern recognition processing module modifies the L2P [ LPA ] value corresponding to the LPA into the L2P special value associated with the corresponding data feature index. Step 17: and judging whether the background data processing needs to be exited or not. If yes, continuing (step 18), if not, jumping (step 6) to step 18: exit and process the host command normally.
Referring to fig. 3, as shown in the drawing, fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device may be an execution terminal for executing an optimization method of SSD data storage.
Referring to fig. 3, as shown, the computer device 500 includes a processor 502, a memory, and a network interface 505, which are connected by a communication bus 501, wherein the memory may include a storage medium 503 and an internal memory 504.
The storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform an optimization method for SSD data storage, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a method of optimizing SSD data storage.
The network interface 505 is used for network communication, such as providing for transmission of data information, etc. It will be appreciated by those skilled in the art that the architecture shown in fig. 3 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting of the computer device 500 to which the present inventive arrangements may be implemented, and that a particular computer device 500 may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The processor 502 is configured to execute a computer program 5032 stored in a memory, so as to implement a corresponding function in the above-mentioned optimization method for SSD data storage.
It will be appreciated by those skilled in the art that referring to fig. 3, the embodiment of the computer device shown in fig. 3 is not limiting of the specific construction of the computer device, and in other embodiments, the computer device may include more or less components than those shown, or certain components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may include only a memory and a processor, and in such embodiments, the structure and function of the memory and the processor are consistent with the embodiment shown in fig. 3, and will not be described again.
It should be appreciated that in an embodiment of the invention, the processor 502 may be a central processing unit (Central Processing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a volatile or nonvolatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program when executed by a processor implements the steps included in an optimization method for SSD data storage as described above.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device and unit described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein. Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units is merely a logical function division, there may be another division manner in actual implementation, or a set of units having the same function may be packaged into one unit, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present invention.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention is essentially or part of what contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a computer-readable storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The embodiment of the invention provides an SSD data storage optimizing method, an SSD data storage optimizing device, a SSD data storage optimizing computer device and a SSD data storage optimizing medium. And dividing the processing command sent by the host equipment according to a preset dividing rule to obtain a command mapping unit. And mapping the command mapping unit containing the read command according to a preset mapping information table to obtain a corresponding mapping physical address. The background scans whether the corresponding mapping physical address in the mapping information table is a garbage physical address; if the mapping physical address which accords with the preset data characteristics exists, the original mapping physical address is marked as junk data. The setting mode reduces the occupancy rate of the garbage data in the hard disk, improves the utilization rate of a storage server and is convenient for a user to recover redundant disk space.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (10)
1. The method is characterized in that the method is applied to a main control chip of a storage device, the storage device further comprises a data storage module electrically connected with the main control chip, the data storage module is a nonvolatile storage medium, and the main control chip is in communication connection with a controller in a host device and a data pattern recognition processing module, and the method comprises the following steps:
initializing a preset data feature table, and configuring the initialized data feature table into a hardware identification engine, wherein the hardware identification engine is in communication connection with a main control chip;
dividing a processing command sent by a host device according to a preset dividing rule to obtain a command mapping unit;
mapping the command mapping unit containing the read command according to a preset mapping information table to obtain a corresponding mapping physical address;
the background scans whether the corresponding mapping physical address in the mapping information table is a garbage physical address;
if the mapping physical address which accords with the preset data characteristics exists, marking the original mapping physical address as junk data;
and modifying the parameter value of the mapping physical address which accords with the data characteristic of the garbage physical address into a special parameter value, and replacing the garbage data with the special parameter value.
2. The method of claim 1, wherein the method further comprises:
the background executes a read request to perform a read operation according to a valid target physical address in the read request.
3. The method of claim 2, wherein after the background executes the read request to perform the read operation according to the valid target physical address in the read request, further comprising:
identifying the data information stored in the data storage module according to the data characteristic table to obtain corresponding identification information;
and generating a corresponding execution command according to the type of the identification information, wherein the execution command is to perform data decoding and error correction on the data storage module and perform matching verification on the data characteristic table.
4. The method for optimizing SSD data storage of claim 1, wherein if there is a mapped physical address conforming to the data characteristic, marking the original mapped physical address as garbage data, further comprising:
identifying a physical storage space matched with the garbage physical address in the mapped physical address;
and identifying the matched data stored in the physical storage space as garbage data needing preprocessing and calculating the data size of the garbage data.
5. The method according to claim 1, wherein before the step of modifying the parameter value of the mapped physical address conforming to the data feature to a special parameter value and replacing the garbage data with the special parameter value, further comprises:
the data pattern recognition processing module marks the GPPA physical address stored in the data characteristic table;
the data pattern recognition processing module modifies the corresponding L2P value in the data characteristic table into a special parameter value.
6. An SSD physical storage optimization device, characterized in that the device is configured to perform an optimization method for SSD data storage according to any one of claims 1-5, the device comprising:
the communication unit is used for initializing a preset data feature table and configuring the initialized data feature table into a hardware identification engine, wherein the hardware identification engine is in communication connection with the main control chip;
the information segmentation unit is used for segmenting the processing command sent by the host equipment according to a preset segmentation rule to obtain a command mapping unit;
the mapping processing unit is used for carrying out mapping processing on the command mapping unit containing the read command according to a preset mapping information table to obtain a corresponding mapping physical address;
the background scanning unit is used for scanning whether the corresponding mapping physical address in the mapping information table is a garbage physical address or not in the background;
the marking unit is used for judging that if the mapping physical address which accords with the preset data characteristics exists, the original mapping physical address is marked as junk data;
and the parameter replacement unit is used for modifying the parameter value of the mapping physical address which accords with the data characteristic of the garbage physical address into a special parameter value and replacing the special parameter value with the garbage data.
7. The SSD physical storage optimization device of claim 6, further comprising a read-write execution unit;
and the read-write execution unit is used for executing the read request in the background so as to execute the read operation according to the effective target physical address in the read request.
8. The SSD data storage optimization device of claim 6, wherein the device further comprises;
the identification unit is used for identifying the data information stored in the data storage module according to the data characteristic table to obtain corresponding identification information;
and the verification unit is used for generating a corresponding execution command according to the type of the identification information, wherein the execution command is used for carrying out data decoding and error correction on the data storage module and carrying out matching verification on the data characteristic table.
9. A computer device, characterized in that the apparatus comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of an optimization method for SSD data storage as claimed in any one of claims 1-5 when executing a program stored on a memory.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of an optimization method of SSD data storage as claimed in any of the claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311629473.3A CN117421258A (en) | 2023-11-30 | 2023-11-30 | SSD data storage optimization method, SSD data storage optimization device, computer equipment and SSD data storage optimization medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311629473.3A CN117421258A (en) | 2023-11-30 | 2023-11-30 | SSD data storage optimization method, SSD data storage optimization device, computer equipment and SSD data storage optimization medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117421258A true CN117421258A (en) | 2024-01-19 |
Family
ID=89528560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311629473.3A Pending CN117421258A (en) | 2023-11-30 | 2023-11-30 | SSD data storage optimization method, SSD data storage optimization device, computer equipment and SSD data storage optimization medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117421258A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117806709A (en) * | 2024-02-29 | 2024-04-02 | 山东云海国创云计算装备产业创新中心有限公司 | System-level chip performance optimization method, device, equipment and storage medium |
-
2023
- 2023-11-30 CN CN202311629473.3A patent/CN117421258A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117806709A (en) * | 2024-02-29 | 2024-04-02 | 山东云海国创云计算装备产业创新中心有限公司 | System-level chip performance optimization method, device, equipment and storage medium |
CN117806709B (en) * | 2024-02-29 | 2024-06-07 | 山东云海国创云计算装备产业创新中心有限公司 | Performance optimization method, device, equipment and storage medium of system-level chip |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10437737B2 (en) | Data storage device | |
US9146854B2 (en) | Restoring storage devices based on flash memories and related circuit, system, and method | |
CN111694510B (en) | Data storage device and data processing method | |
US10642731B2 (en) | Memory management method and storage controller | |
US11204864B2 (en) | Data storage devices and data processing methods for improving the accessing performance of the data storage devices | |
CN107590080B (en) | Mapping table updating method, memory control circuit unit and memory storage device | |
US20130185479A1 (en) | Data protecting method, memory controller and memory storage apparatus | |
CN113885808B (en) | Mapping information recording method, memory control circuit unit and memory device | |
US11176033B2 (en) | Data storage devices and data processing methods | |
CN112925481A (en) | Memory management method, memory storage device and memory control circuit unit | |
CN117421258A (en) | SSD data storage optimization method, SSD data storage optimization device, computer equipment and SSD data storage optimization medium | |
CN113568579A (en) | Memory, data storage method and data reading method | |
TWI695263B (en) | Memory management method and storage controller | |
US11307786B2 (en) | Data storage devices and data processing methods | |
CN109273033B (en) | Memory management method, memory control circuit unit and memory storage device | |
CN110825310B (en) | Memory management method and memory controller | |
CN102467459B (en) | Data writing method, memory controller and memory storage device | |
CN114822664A (en) | Risk assessment method based on data priority, storage device and control circuit | |
CN110825653A (en) | Memory management method and memory controller | |
CN114063933A (en) | Block management method, memory controller and memory storage device | |
CN109032957A (en) | Memory management method, memory control circuit unit and memory storage device | |
CN101788970B (en) | Data string transmission method, system and controller thereof | |
TW202123016A (en) | Storage controller, memory management method, and storage device | |
CN112802512B (en) | Memory controller and memory device initializing method | |
US12242730B2 (en) | Data arrangement method based on file system, memory storage device and memory control circuit unit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |