Data storage method, storage device and computer readable storage medium
By combining the logical address list and data of randomly written data, the problem of increasing IO interaction between storage devices in random write scenarios is solved, and the writing performance is improved.
Patent Information
- Application Number
- CN202310500617.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2024-11-05
AI Technical Summary
Existing storage devices increase IO interaction in random write scenarios, resulting in large equipment overhead and affecting write performance.
By obtaining the logical address list of randomly written data, multiple random write data are merged into one merged write data, and the merged logical address list and data are sent to the storage device to perform a list-based write operation.
Reduces IO processing volume during random write data storage process and improves write performance.
Smart Images

Figure CN118897646A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage, and in particular to a data storage method, a storage device, and a computer-readable storage medium. Background Art
[0002] In existing storage devices, the performance of random write and sequential write varies greatly. This is because in sequential write, since the logical addresses are continuous, only one write command needs to be sent for the written data to complete the write. For random write, since the logical addresses of the data are not continuous, multiple write commands need to be sent to indicate that the data has been written. Therefore, the device has to process more IO in the random write scenario than in the sequential write scenario. More IO interactions of the device increase the device overhead, waste a lot of resources, and affect the write performance. Summary of the invention
[0003] The main purpose of this application is to provide a data storage method, a storage device and a computer-readable storage medium, which can improve the technical problem of device writing performance in random read scenarios.
[0004] To solve the above technical problems, the first technical solution adopted in the present application is: to provide a data storage method, the method comprising obtaining a logical address list, the logical address list comprising logical addresses of at least two random write data; merging at least two random write data into one merged write data; sending the logical address list and the merged write data to a storage device, so that the storage device writes the merged write data based on the logical address list to complete the storage of at least two random write data.
[0005] In order to solve the above technical problems, the second technical solution adopted by the present application is: to provide a data storage method. The method includes receiving a logical address list and merged write data, the logical address list includes the logical addresses of at least two random write data, and the merged write data is obtained by merging at least two random write data; completing the writing of the merged write data based on the logical address list to complete the storage of at least two random write data.
[0006] To solve the above technical problems, the third technical solution adopted by the present application is to provide a storage device, which includes a host and a storage device, wherein the host and the storage device are communicatively connected to perform the method described in the first technical solution and / or the second technical solution.
[0007] To solve the above technical problems, the fourth technical solution adopted by the present application is to provide a computer-readable storage medium. The computer-readable storage medium stores program data and can be executed by a processor to implement the method described in the first technical solution and / or the second technical solution.
[0008] The beneficial effect of the present application is: by integrating the logical addresses of at least two random write data into a logical address list, and merging the at least two random write data into a merged write data, and then sending the logical address list and the merged write data to the storage unit, so that the storage unit writes the received merged write data according to the logical address list, and completes the storage of the random write data. Since the logical addresses of the random write data are integrated into a logical address list and then sent to the storage device, the storage device can complete the parsing and processing of the merged write data based on the logical address list, distinguish each random write data to complete the writing, and further enable the random write data to be merged and packaged during the sending process and sent together as the merged write data, so as to achieve the purpose of reducing the IO processing amount during the random write data storage process and improving the data writing performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 It is a schematic diagram of the continuous writing process;
[0011] Figure 2 This is a schematic diagram of the random write process;
[0012] Figure 3 This is a flow chart of the first embodiment of the data storage method of the present application;
[0013] Figure 4 This is a flow chart of the second embodiment of the data storage method of the present application;
[0014] Figure 5 This is a flowchart of a specific embodiment of the data storage method of the present application;
[0015] Figure 6 This is a flowchart of the third embodiment of the data storage method of the present application;
[0016] Figure 7 This is a flowchart of a fourth embodiment of the data storage method of the present application;
[0017] Figure 8 This is a flowchart of the fifth embodiment of the data storage method of the present application;
[0018] Fig. 9 This is a flowchart of a sixth embodiment of the data storage method of the present application;
[0019] Fig.10 This is a flowchart of another specific embodiment of the data storage method of the present application;
[0020] Fig.11 This is a flowchart of another specific embodiment of the data storage method of the present application;
[0021] Fig.12 is a schematic structural diagram of the first embodiment of the storage device of the present application;
[0022] Fig.13 It is a structural diagram of the first embodiment of the computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] The terms "first", "second", etc. in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0025] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0026] Before introducing the technical solution of the present application, a brief introduction to the related technologies is first given.
[0027] like Figure 1 As shown, Figure 1 This is a schematic diagram of the conventional continuous writing process. In the figure, LBA is the logical block address, LEN is the address length, and STARTLBA is the starting logical block address.
[0028] In the figure, the left side is the host side, and the right side is the UFS storage device side. When there is a need to write data on the host side, four pieces of data need to be written continuously, and the size of each piece of data is 4K. The logical addresses of each piece of data are 0, 1, 2, and 3, respectively, and the address length of each piece of data is 1. Since the logical addresses of the data are continuous, each piece of data can be merged and merged into one piece of data to complete the writing. The starting logical address of the merged piece of data is 0, and the address length is 4. A write command is constructed according to the starting logical address and address length of the merged piece of data, and the write command is sent to the storage device to notify the storage device to allocate cache space. The storage device receives and parses the write command and allocates cache space according to the address length therein. After the cache space is allocated, an RTT message is sent to the host side to notify the host side to send data. The host sends the merged piece of data to the storage device. The storage device receives the merged data, returns a reply message to the host side, notifies the host that the data writing is completed, and then writes it into the storage unit to complete the storage of the data.
[0029] like Figure 2 As shown, Figure 2 Write random flow charts for common techniques.
[0030] In the figure, the left side is the host side, and the right side is the UFS storage device side. When there is a data write demand on the host side, four pieces of data need to be randomly written, and the size of each piece of data is 4K. The logical addresses of each piece of data are 0, 2, 4, and 6, respectively, and the address length of each piece of data is 1. Since the logical addresses of the data are not continuous, each piece of data will be constructed separately as a write command, and the data writing is completed according to the corresponding write commands. According to the logical address and address length of each piece of data, a corresponding write command is constructed, and the write command is sent to the storage device to notify the storage device to allocate cache space. There are four write commands corresponding to the four random data, namely, a write command with a logical address of 1 and an address length of 1, a write command with a logical address of 2 and an address length of 1, a write command with a logical address of 4 and an address length of 1, and a write command with a logical address of 6 and an address length of 1. The four write commands are sent serially to the storage device. After receiving the write command, the storage device allocates cache space according to the address length of each write command. After allocating the cache space, an RTT message is sent to the host side to notify the host side to send data. After the data of the previous command is acquired, the storage device will continue to allocate cache space for acquiring new data according to the address length of the next write command. After each piece of data is acquired, a reply message will be returned to the host to notify the host that the data writing is completed. After all four pieces of data are acquired, the storage device writes them into the storage unit.
[0031] A piece of data corresponds to an integer multiple of the minimum write unit of the storage device. In the process of data storage, the minimum write unit at the logical level is a page, and the size of the page can be determined according to the actual situation. Usually a page is 4K Byte, hereinafter referred to as 4KB. Assuming that a page of data is 4KB, the minimum size of a piece of data is 4KB, and it can also be 8KB, 12KB, and so on.
[0032] It can be seen that the above two write operations both write 16KB of data, but the processing flow in the random write scenario requires more interaction and processing than the sequential write scenario, which will introduce a lot of additional overhead, and it is still processed serially, which further reduces the write performance of the storage device in the random write scenario. If multiple random write data can be merged into one data, its write performance can be improved. Therefore, this application proposes a data storage method in a random write scenario to improve the write performance of the storage device.
[0033] Reference Figure 3 , Figure 3 This is a flow chart of the first embodiment of the data storage method of the present application. It includes the following steps:
[0034] S11: Obtain a logical address list, where the logical address list includes at least two logical addresses of random write data.
[0035] The method is applied to the host side. The logical address list includes the logical addresses of all random write data that are to be merged. For example, if three random write data need to be written, the logical address list includes the logical addresses of the three random write data. If there are four random write data, the logical address list includes the logical addresses of the four random write data. The logical address list is determined according to at least two random write data that currently need to be written. Random write data is data with discontinuous logical addresses.
[0036] S12: Merge at least two random write data into one merged write data.
[0037] The random write data corresponding to the logical address in the logical address are merged, and the merger does not destroy the random write data itself. For example, there are four random write data with logical addresses of 0, 2, 4, and 6. These four data are spliced in the order of logical addresses from small to large to obtain a merged write data. If the size of each random write data is 4K, the merged write data is 16K.
[0038] S13: Sending the logical address list and the merged write data to the storage device, so that the storage device writes the merged write data based on the logical address list, and completes the storage of at least two random write data.
[0039] After obtaining the logical address list and the merged write data, they are all sent to the storage device. The storage device can parse and process the merged write data based on the logical address list, obtain corresponding multiple random write data, and write the random write data into the storage unit to complete storage.
[0040] In this embodiment, the logical addresses of at least two random write data are integrated into a logical address list, and the at least two random write data are merged into one merged write data, and then the logical address list and the merged write data are sent to the storage unit, so that the storage unit writes the received merged write data according to the logical address list, thereby completing the storage of the random write data. Since the logical addresses of the random write data are integrated into a logical address list and then sent to the storage device, the storage device can complete the parsing of the merged write data based on the logical address list, distinguish each random write data to complete the writing, and further enable the random write data to be merged and packaged during the sending process and sent together as the merged write data, thereby achieving the purpose of reducing the IO processing amount during the random write data storage process and improving the data writing performance.
[0041] In the above embodiment, the steps of obtaining the logical address list and merging the random write data can be performed simultaneously or one after the other. The execution order is not limited as long as they are completed before being sent to the storage device.
[0042] Reference Figure 4 , Figure 4 This is a flow chart of the second embodiment of the data storage method of the present application. The method is a further extension of the above embodiment, and includes the following steps:
[0043] S21: Get a write command.
[0044] S22: Merge the logical address list, the merge write data, and the write command to obtain a merged data packet.
[0045] Before sending data, a write command is first obtained. The write command is obtained based on the obtained logical address list and the merged write data. The write command may include information such as the address length of the logical address list and the address length of the merged write data.
[0046] After receiving the write command, the write command, the logical address list and the merged write data are merged into a merged data packet, and the merged data packet is sent to the storage device, so that the storage device obtains the logical address list and the merged write data from the data packet based on the write command, and then completes the writing of the merged write data based on the logical address list. The merge can be a splicing operation that does not destroy the individual data components themselves.
[0047] like Figure 5 As shown, Figure 5 This is a flow chart of a specific embodiment of the data storage method of the present application. After obtaining at least two random write data and their corresponding logical addresses, the random write data are merged to obtain merged write data, and then a write command is generated based on the merged write data and the logical address list, and the write command, the merged write data and the logical address list are merged into a merged data packet, which is sent to the storage device. After the storage device receives the merged data packet, it separates the data based on the write command, obtains the logical address list and the merged write data, and then completes the writing of the merged write data based on the logical address list. When the write is completed, a reply message is sent to the host to notify the completion of the write.
[0048] Reference Figure 6 , Figure 6 This is a flow chart of the third embodiment of the data storage method of the present application. The method is a further extension of step S13, and includes the following steps:
[0049] S31: Merge the logical address list and the merge write data to obtain a merged data packet.
[0050] S32: Send the combined data packet to the storage device.
[0051] The logical address list is used as data and merged with the merge write data to obtain a merged data packet. The merge does not destroy the logical address list and the merge write data itself. For example, the merge may be completed in a splicing manner to obtain a merged data packet, and the logical address list may be placed at the beginning or end of the merge write data.
[0052] After the merged data packet is obtained, the merged data packet is sent to the storage device to implement the sending of the logical address list and the merged write data.
[0053] In one embodiment, the size of the logical address list written as data can be pre-set, and can be an integer multiple of the minimum write unit, that is, an integer multiple of the size of a page of data. For example, the size of a page of data is set to 4KB, and the size of the logical address list written as data can be set to 4KB, or 8KB, 12KB, and so on. When the logical address list data of the merged random write data is not enough to reach an integer multiple of the minimum write unit, useless data is added to make it an integer multiple. For example, when the size of the logical address list is only 3KB, 1KB of useless data is added to make it 4KB, so as to continue the transmission.
[0054] In one embodiment, the size of the logical address list can be determined according to the specific number of random writes to be merged. When all random write data that need to be merged are determined, their logical addresses are obtained and combined into a logical address list. When the data in the logical address list is not enough to reach an integer multiple of the minimum write unit, useless data is added to make it an integer multiple, so as to continue transmission. For example, the logical address data of all random write data adds up to 5KB, and the minimum write unit is 4KB, then 3KB of useless data is added to make it 8KB.
[0055] Reference Figure 7 , Figure 7 This is a flow chart of the fourth embodiment of the data storage method of the present application. The method is a further extension of the above embodiment, and includes the following steps:
[0056] S41: Sending a first write command to a storage device, where the first write command includes the address length of at least two random write data and the address length of a logical address list, so that the storage device allocates cache space based on the address length.
[0057] Before sending the merged data packet to the storage device, a write command needs to be sent to the storage device to notify the storage device to allocate cache space for storing data. The write command includes the address length of the data, and the storage device allocates the corresponding cache space according to the address length. Since the logical address list is sent as data together with the merged write data, the storage device needs to allocate cache space for both the logical address list and the merged write data. Therefore, the first write command sent includes the address length corresponding to the merged data packet, that is, the address length of the corresponding at least two random write data and the address length of the logical address list.
[0058] S42: Receive a response message sent by the storage device based on the first write command.
[0059] S43: In response to receiving the response message, sending the combined data packet to the storage device.
[0060] After receiving the first write command, the storage device will send a response message to prompt the host end to send data. The host end receives the response message and sends the combined data packet to the storage device.
[0061] Reference Figure 8 , Figure 8 This is a flow chart of the fifth embodiment of the data storage method of the present application. The method is a further extension of step S13, and includes the following steps:
[0062] S51: Send a second write command to the storage device, where the second write command includes a logical address list, so that the storage device allocates cache space based on the logical address list.
[0063] The logical address list is set in a write command and sent to the storage device in advance. The host sends a second write command including the logical address list to the storage device in advance to notify the storage device to allocate cache space based on the logical address list.
[0064] S52: Receive a response message sent by the storage device based on the second write command.
[0065] S53: In response to receiving the response message, sending the merged write data to the storage device.
[0066] After receiving the second write command, the storage device will send a response message to prompt the host end to send data. The host end receives the response message and sends the merged write data to the storage device.
[0067] In this embodiment, the logical addresses of at least two random write data are integrated into a logical address list, and the at least two random write data are merged into one merged write data, and then the logical address list and the merged write data are sent to the storage unit, so that the storage unit writes the received merged write data according to the logical address list, thereby completing the storage of the random write data. Since the logical addresses of the random write data are integrated into a logical address list and then sent to the storage device, the storage device can complete the parsing of the merged write data based on the logical address list, distinguish each random write data to complete the writing, and further enable the random write data to be merged and packaged during the sending process and sent together as the merged write data, thereby achieving the purpose of reducing the IO processing amount during the random write data storage process and improving the data writing performance.
[0068] In one embodiment, the logical address list also includes the address lengths of at least two random write data. One piece of data corresponds to an integer multiple of the minimum write unit of the storage device. When the data size of each piece of random write data is consistent, the logical address list may only include the logical address of the random write data. For example, when the minimum write unit is 4KB, if each piece of data is 4KB, the address length of each piece of data is 1. If each piece of data is 8KB, the address length of each piece of data is 2, and the address length does not need to be written. When the data size of each piece of random write data is inconsistent, it is necessary to write the address length in the logical address list to distinguish each piece of random write data. For example, when the minimum write unit is 4KB, if the first random write data is 4KB and the logical address is 0, the second random write data is 8KB and the logical address is 4, and the third random write data is 16KB and the logical address is 10, then it is necessary to write in the logical address list that the address length corresponding to the logical address 0 is 1, the address length corresponding to the logical address 4 is 2, and the address length corresponding to the logical address 10 is 4, so that the storage device can correctly process the merged write data and obtain each random write data.
[0069] Reference Fig. 9 , Fig. 9 This is the sixth embodiment of the data storage method of the present application. It includes the following steps:
[0070] S61: Receive a logical address list and merged write data, where the logical address list includes logical addresses of at least two random write data, and the merged write data is obtained by merging the at least two random write data.
[0071] S62: Complete writing of the merged write data based on the logical address list to complete storage of at least two random write data.
[0072] The method is applied to a storage device. After receiving the logical address list and the combined write data obtained by combining the random write data, the storage device parses the logical address list, processes the combined write data based on the logical address list, obtains each random write data, and then writes each random write data into the storage unit to complete the storage.
[0073] The received logical address list may be received in one pass combined with the combined write data to form a combined data packet, or may be received via a write command. The specific implementation method may refer to the description of similar steps in the above embodiment, which will not be repeated here.
[0074] The technical solution of the present application is described in more detail below with reference to two specific embodiments.
[0075] like Fig.10 As shown, Fig.10 The present invention is a flowchart of another specific embodiment of the data storage method of the present application. First, four random write data need to be written. The logical addresses of the four random write data are A, B, C, and D, respectively, and the address lengths are all 1. The logical addresses are obtained to obtain a logical address list. The four random write data are merged to obtain 16KB merged write data. Further, the logical address list is merged with the merged write data to obtain a 20KB merged data packet. A write command is constructed according to the address length of the merged data packet, and the write command is sent to a storage device. The storage device receives the write command, parses the write command, and configures the cache space according to the address length in the write command. After the configuration is completed, a response message is sent to the host end to notify the host end to send data. The host end sends a merged data packet to the storage device, and the storage device receives the merged data packet. The storage device parses the merged data packet to obtain merged data and a logical address list, and then processes the merged data based on the logical address list to obtain each random write data, and then writes each random write data into the storage unit to complete the storage.
[0076] The above embodiment transmits the logical address list as a data portion to the storage device based on the conventional writing specification to realize the merging of random write data.
[0077] like Fig.11 As shown, Fig.11 The present invention is a flowchart of another specific embodiment of the data storage method of the present application. In this embodiment, a new write command specification is defined to realize the merging of random write data. The host side needs to write four random write data. The logical addresses of the four random write data are A, B, C, and D, respectively, and the address length is 1. The logical address is obtained to obtain a logical address list. The four random write data are merged to obtain 16KB merged write data. Further, a write command is constructed based on the logical address list, and the write command is sent to the storage device. The storage device receives the write command, parses the write command, and configures the cache space according to the logical address list in the write command. In addition to the logical address of each random write data, the logical address list may also include its corresponding address length. When the size of each random write data is consistent, the address length does not need to be included. When the size of the random write data is inconsistent, the address length needs to be included to distinguish each random write data. The storage device can configure the cache space according to the number of logical addresses or the address length in the logical address list. After the configuration is completed, the storage device sends a response message to the host side to notify the host side to send data. The host sends 16KB of merged data to the storage device, which receives the merged data. The storage device processes the merged data based on the logical address list to obtain each random write data, and then writes each random write data into the storage unit to complete the storage.
[0078] like Fig.12 As shown, Fig.12 This is a schematic diagram of the structure of the first embodiment of the storage device of the present application.
[0079] The electronic device includes a host 110 and a storage device 120 .
[0080] The host 110 controls the operation of the storage device, and the host 110 may be provided with a processor, i.e., a CPU (Central Processing Unit). The processor may be an integrated circuit chip having the ability to process a signal sequence. The processor may also be a general-purpose processor, a digital signal sequence processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0081] The host 110 is communicatively connected with the storage device 120 to implement the method provided by any one of the first to fifth embodiments of the aforementioned data storage method of the present application and any possible combination thereof.
[0082] like Fig.13 As shown, Fig.13 This is a schematic diagram of the structure of the first embodiment of the computer-readable storage medium of the present application.
[0083] An embodiment of a readable storage medium of the present application includes a memory 210, and the memory 210 stores program data. When the program data is executed, the method provided by any one of the first to fifth embodiments and possible combinations of the data storage method of the present application is implemented.
[0084] The memory 210 may include a medium that can store program instructions, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or it may be a server that stores the program instructions. The server may send the stored program instructions to other devices for execution, or it may execute the stored program instructions itself.
[0085] In summary, the storage of random write data is completed by integrating the logical addresses of at least two random write data into a logical address list, and merging the at least two random write data into a merged write data, and then sending the logical address list and the merged write data to the storage unit, so that the storage unit writes the received merged write data according to the logical address list. Since the logical addresses of the random write data are integrated into a logical address list and then sent to the storage device, the storage device can complete the parsing of the merged write data based on the logical address list, distinguish each random write data to complete the writing, and further enable the random write data to be merged and packaged during the sending process and sent together as the merged write data, thereby achieving the purpose of reducing the IO processing amount during the random write data storage process and improving the data writing performance.
[0086] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0087] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0088] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0089] If the integrated units in the above other embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.
[0090] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data storage method, It is characterized in that The method comprises: Acquire a logical address list, where the logical address list includes at least two logical addresses of random write data; Combining the at least two random write data into one combined write data; The logical address list and the combined write data are sent to a storage device, so that the storage device writes the combined write data based on the logical address list, thereby completing the storage of the at least two random write data.
2. The method according to claim 1, It is characterized in that Before sending the logical address list and the merged write data to the storage device, the method includes: Obtaining a write command, wherein the write command is obtained based on the logical address list and the merged write data; The sending the logical address list and the merged write data to a storage device includes: Merging the logical address list, the merged write data and the write command to obtain a merged data packet; The combined data packet is sent to the storage device.
3. The method according to claim 1, It is characterized in that The sending the logical address list and the merged write data to a storage device includes: Merging the logical address list with the merged write data to obtain a merged data packet; The combined data packet is sent to the storage device.
4. The method according to claim 3, It is characterized in that After obtaining the logical address list, the method includes: A first write command is sent to the storage device, where the first write command includes the address length of the at least two random write data and the address length of the logical address list, so that the storage device allocates cache space based on the address length.
5. The method according to claim 4, It is characterized in that The sending the logical address list and the merged write data to a storage device includes: receiving a response message sent by the storage device based on the first write command; In response to receiving the response message, the merged data packet is sent to the storage device.
6. The method according to claim 1, It is characterized in that Sending the logical address list to the storage device comprises: A second write command is sent to the storage device, where the second write command includes the logical address list, so that the storage device allocates cache space based on the logical address list.
7. The method according to claim 6, It is characterized in that Sending the combined write data to the storage device includes: receiving a response message sent by the storage device based on the second write command; In response to receiving the response message, the merged write data is sent to the storage device.
8. The method according to claim 1, It is characterized in that The logical address list also includes address lengths of the at least two random write data.
9. A data storage method, It is characterized in that The method comprises: Receive a logical address list and merged write data, wherein the logical address list includes logical addresses of at least two random write data, and the merged write data is obtained by merging the at least two random write data; The writing of the combined write data is completed based on the logical address list to complete the storage of the at least two random write data.
10. A storage device, It is characterized in that The method comprises a host and a storage device, wherein the host is communicatively connected with the storage device to implement the method according to any one of claims 1 to 9.
11. A computer-readable storage medium, It is characterized in that The program data is stored and can be executed by a processor to implement the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method and device for increasing writing speed of nand flash
CN104503710A
Write request data compression method and system, terminal and storage medium
CN111857574A
