Data processing method and data storage device

By setting the detection interval between the host and the data storage device and updating the detection interval according to the data length, the problem of difficult to set the detection cycle in open commands is solved, and data transmission performance is improved.

CN119088735AActive Publication Date: 2024-12-06合肥康芯威存储技术有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411587012.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2024-12-06
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

In data transmission between the host and the data storage device, the detection cycle of open commands is difficult to set, resulting in the inability to take into account both the redundant operation and the number of detections, affecting the data transmission performance.

Method used

By setting the detection interval and updating the detection interval according to the data length between the host and the data storage device, the redundant operation and detection times are reduced.

Benefits of technology

The detection interval and data length are adapted, which reduces redundant operations and detection times, and improves data transmission performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088735A_ABST
    Figure CN119088735A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and data storage equipment, and belongs to the technical field of storage. The data processing method comprises the following steps: when a data storage device receives an open command sent by a host, setting a detection interval; transmitting data between the host and the data storage device by taking the detection interval as a unit; when the data storage equipment receives an ending command sent by the host, ending the data transmission between the host and the data storage equipment; and acquiring the length of data transmitted between the host and the data storage device at this time, and updating the detection interval according to the data length. By means of the data processing method and the data storage device, the data transmission performance can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of storage technology, and in particular relates to a data processing method and a data storage device. Background Art

[0002] When a host transfers data between data storage devices, it sends various read and write commands. One such command is an open-end command. When a host sends an open-end command, the command length is not specified. Instead, the host sends a stop command after completing the read or write operation, completing the open-end command.

[0003] When a data storage device executes an open command, it checks for a stop command after each data unit read or write operation. If no stop command is received, the device will continue to read or write the next data unit until a stop command is received. This approach can lead to poor read and write performance. However, if the stop command detection period is set to a longer data length, it will generate longer redundant operations. Therefore, when setting the stop command detection period, it is difficult to balance the redundant operations generated and the number of detections, which in turn affects data transmission performance. Summary of the Invention

[0004] The object of the present invention is to provide a data processing method and a data storage device, which can solve the problem that it is difficult to set the detection cycle, resulting in redundant operations and the inability to take into account the number of detections at the same time.

[0005] To achieve the above object, the present invention provides a data processing method and a data storage device, wherein the data processing method comprises at least the following steps: When the data storage device receives an open command sent by the host, a detection interval is set; transmitting data between the host and the data storage device in units of the detection interval; When the data storage device receives the end command sent by the host, the data transmission between the host and the data storage device ends; and The length of data transmitted between the host and the data storage device is obtained, and the detection interval is updated according to the data length.

[0006] In one embodiment of the present invention, the data processing method further includes the following steps: It is determined whether the command received by the data storage device is an open command, and if the command received by the data storage device is not an open command, the detection interval is cleared.

[0007] In one embodiment of the present invention, setting the detection interval includes the following steps: determining whether the detection interval exists, and if the detection interval does not exist, presetting the detection interval; and If the detection interval exists, the existing detection interval is used.

[0008] In one embodiment of the present invention, the preset detection interval is a first preset detection interval, and the first preset detection interval is the length of data read or written at one time during random reading or writing.

[0009] In one embodiment of the present invention, updating the detection interval according to the data length includes the following steps: Obtaining the relationship between the length of data transmitted between the host and the data storage device and the detection interval; and The detection interval is updated according to the relationship between the length of the data transmitted between the host and the data storage device this time and the detection interval.

[0010] In one embodiment of the present invention, when the length of data transmitted between the host and the data storage device is less than the detection interval, the length of data transmitted between the host and the data storage device is used as the updated detection interval.

[0011] In one embodiment of the present invention, when the length of data transmitted between the host and the data storage device is equal to the detection interval, the detection interval is kept unchanged.

[0012] In one embodiment of the present invention, when the length of data transmitted between the host and the data storage device is greater than the detection interval, and the detection interval is equal to the first preset detection interval, the detection interval is updated to the second preset detection interval, wherein the first preset detection interval is the length of data read or written at one time during random reading and writing, and the second preset detection interval is the length of data read or written at one time during sequential reading and writing.

[0013] In one embodiment of the present invention, when the length of data transmitted between the host and the data storage device is greater than the detection interval, and the detection interval is not equal to the first preset detection interval, the length of data transmitted between the host and the data storage device is used as the updated detection interval, wherein the first preset detection interval is the length of data read or written at one time during random reading and writing.

[0014] The present invention further provides a data storage device, wherein the data storage device comprises: a memory storing program commands; and A processor runs the program command to implement any one of the data processing methods described above.

[0015] In summary, the present invention provides a data processing method and data storage device, which updates the detection interval in the next cycle with the length of the data transmitted between the current host and the data storage device. Since the read and write commands between the host and the data storage device have a certain continuity, the length of the data transmitted by the host to the data storage device next time is likely to be equal to the length of the data transmitted by the host to the data storage device this time. Except when the read and write status between the host and the data storage device changes, the detection interval and the length of the data transmitted between the host and the data storage device are too large. Through the update of the detection interval in this application, the detection interval and the length of the data transmitted between the data storage device are usually in an adaptive state, thereby reducing the redundant operations generated and reducing the number of detections to the maximum length. At the same time, when the length of the data transmitted between the secondary host and the data storage device is greater than or equal to the detection interval, by setting a first preset detection interval and a second preset detection interval, it is verified whether the data transmission between the host and the data storage device is a common data transmission method such as random read and write or sequential read and write, thereby further increasing the accuracy of the detection interval estimation, thereby further reducing the redundant operations generated and reducing the number of detections to the maximum length. Therefore, through the data processing method provided in this application, the detection interval adapted to the current reading and writing program can be obtained to the maximum extent, thereby balancing the requirements for the redundant operations generated and the number of detections, thereby improving data transmission performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing 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.

[0017] Figure 1 It is a structural diagram of a data storage device in one embodiment of the present application.

[0018] Figure 2 This is a flow chart of a data processing method in one embodiment of the present application.

[0019] Figure 3 This is a flow chart of a method for updating a detection interval in one embodiment of the present application.

[0020] Figure 4 It is a structural diagram of a data storage device in one embodiment of the present application. DETAILED DESCRIPTION

[0021] To facilitate understanding of the present application, a more comprehensive description of the present application will be provided below with reference to the accompanying drawings. The accompanying drawings illustrate preferred embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the disclosure of the present application.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0023] In the description of the present invention, it should be understood that the orientations or positional relationships indicated by terms such as "center," "up," "down," "front," "back," "left," and "right" are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or components referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention. The degrees indicated by terms such as "high" and "low" are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or components referred to must have high or low, and therefore should not be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance.

[0024] See also Figure 1 As shown, the host 100 is electrically connected to the data storage device 200, and the host 100 can send commands such as write, read and erase to the data storage device 200. A controller 201 and a non-volatile storage unit 202 are provided in the data storage device 200. The controller 201 can execute multiple logic gates or control commands implemented in hardware or firmware, and perform operations such as writing, reading and erasing data in the non-volatile storage unit 202 according to the commands of the host 100. Among them, the host 100 and the data storage device 200 can be implemented as separate chips, modules, or devices, or can be included in a single device. For example, the data storage device 200 can be an integrated single storage device, which is then connected to the host 100. However, the present disclosure is not limited to this example. That is, in another example, the host 100 and the data storage device 200 can be integrated into a single device.

[0025] See also Figure 1As shown, in one embodiment of the present invention, the non-volatile storage unit 202 of the data storage device 200 includes multiple flash memory blocks 203. The flash memory blocks 203 may belong to the same memory die or to different memory dies. Each flash memory block 203 has multiple physical pages, and each physical page has at least one physical sector. The physical pages belonging to the same flash memory block 203 can be written independently and erased simultaneously. For example, each flash memory block 203 is composed of 128 physical pages, and each physical page has 8 physical sectors. That is, in the example where each physical sector is 512 bytes, the capacity of each physical page is 4 kilobytes (K). However, in one embodiment, each flash memory block 203 can be composed of 64 physical pages, 256 physical pages, or any other number of physical pages.

[0026] See also Figure 1 As shown, in one embodiment of the present invention, a flash memory block 203 is the minimum unit of erasure. That is, each flash memory block 203 contains the minimum number of memory cells that are erased together. A physical page is the minimum unit of programmability. In other words, a physical page is the minimum unit of data writing. However, in some embodiments, the minimum unit of data writing may be a physical sector or other size. Each physical page typically includes a data bit area and a redundant bit area. The data bit area is used to store user data, while the redundant bit area is used to store system data (e.g., error checking and correction code).

[0027] See also Figure 1As shown, in one embodiment of the present invention, a data storage device 200 using NAND flash memory as its storage medium offers advantages over traditional magnetic disks, such as non-volatility, fast read / write speeds, shock resistance, low power consumption, and compact size. It is currently widely used in embedded systems, consumer electronics, aerospace, and other fields. Depending on the communication protocol between the data storage device 200 and the host 100, it can be categorized into embedded Multi Media Card (eMMC), Universal Flash Storage (UFS), Serial ATA (SATA), and Peripheral Component Interconnect Express (PCIe). eMMC, with its low price, holds a significant advantage in the embedded market. However, its maximum protocol speed is HS400, meaning it can reach no more than 400 MB / s, with actual peak performance around 200-300 MB / s. Consequently, various eMMC manufacturers have adopted various solutions to maximize product performance, such as increasing cache space and adding hardware acceleration. In the eMMC protocol, the read and write commands sent by the host 100 to the data storage device 200 take various forms. One type of read and write command is a command queue, which allows multiple commands to be executed concurrently. There are also two types of commands that are non-command queues. One type of non-command queue is a pre-defined command. Before sending a pre-defined command, the length of the operation data is set, i.e., a read and write command with a known operation length. The other type of non-command queue is an open command. When the host 100 sends an open command, the command length is not set in the open command. Instead, a stop command is sent after the host 100 has read or written the command, completing the open command.

[0028] See also Figure 1As shown, in one embodiment of the present invention, when the command sent by the host 100 is an open command, the data storage device 200 only knows the starting address during operation, but not the data length. After the host 100 completes the operations in response to the open command, it sends a stop command to the data storage device 200, causing the data storage device 200 to cease operations. Upon receiving the open command, the data storage device 200 will treat the open command as an infinitely long read or write command. In this case, the data storage device 200 will perform many preparatory operations in its firmware, such as preparing tasks, querying mapping relationships, and preparing cache space. It may even perform many preparatory operations on the flash memory side, such as pre-generating read and write operations in the flash memory. When the data storage device 200 receives the stop command, for random read or write commands, if the data storage device 200 firmware stores data outside the command range, it will need to clear redundant data in the firmware, significantly wasting firmware runtime. For sequential read or write commands, less redundant data needs to be cleared, but this will also affect the performance of sequential reads and writes.

[0029] In the application, if Figure 1 As shown, when an open command is received, if accurate reading and writing is required, each read and write operation of a data unit (a physical sector) is stopped to check whether a stop command has been received. If a stop command is not received, the next data unit is read and written. However, this operation method will lead to poor performance. This is because if the set detection interval is too long and the data in each command is too short relative to the length of the data transmitted between the host 100 and the data storage device 200, a large amount of redundant data will be generated in the firmware. If the set detection interval is too short and the data in each command is too long, a large number of unnecessary detection times will be generated. For transformed commands, it is difficult to set a suitable detection interval that is consistent with the transmission of open commands between the host 100 and the data storage device 200 at each stage.

[0030] See also Figure 1 and Figure 2 As shown, the present invention provides a data storage method for a data storage device. The method uses the data range of the current command as the detection interval for the next stop command, thereby adaptively adjusting the detection interval for the stop command corresponding to each open command, thereby achieving a balance between the detection period and redundant data. Specifically, the data storage method includes steps S101 to S107.

[0031] Step S101: When the data storage device receives a command from the host, it determines whether the received command is an open command. If the received command is not an open command, step S102 is executed and the process ends. If the received command is an open command, step S103 is executed.

[0032] Step S102: Clear the detection interval.

[0033] Step S103: Determine whether a detection interval exists. If a detection interval exists, proceed to step S105. If no detection interval exists, proceed to step S104, and then to step S105.

[0034] Step S104: preset a detection interval.

[0035] Step S105: Data is transmitted between the host and the data storage device in units of detection intervals.

[0036] Step S106: When the data storage device receives the end command sent by the host, the data transmission between the host and the data storage device ends.

[0037] Step S107 : Obtain the length of the data transmitted between the host and the data storage device, and update the detection interval according to the data length, and then return to step S101 .

[0038] See also Figure 1 and Figure 2 As shown, in one embodiment of the present invention, in step S101, since the command transmitted by the host 100 to the data storage device 200 may be a command queue, a predefined command, or an open command. Therefore, when the host 100 receives a command sent by the data storage device 200, it is first necessary to determine whether the received command is an open command. Specifically, whether the command sent by the host 100 is an open command can be determined by querying whether the command received by the data storage device 200 has a data length. If the received command has a data length, the command received by the data storage device 200 is not an open command. If the received command does not have a data length, the command received by the data storage device 200 is an open command.

[0039] See also Figure 1 and Figure 2 As shown, in one embodiment of the present invention, in steps S101 and S102, when it is determined that the command received by the data storage device 200 is not an open command, regardless of whether the command is a command queue or a predefined command, the detection interval is cleared. In this case, since the command sent by the host 100 contains the data length, it is not necessary to detect whether a stop command has been received, and therefore, there is no need to set a detection interval. If a detection interval is present, it will affect the efficiency of data transmission.

[0040] See also Figure 1 and Figure 2As shown, in one embodiment of the present invention, in steps S101 to S104, after determining that the command received by the data storage device 200 is an open command, a check interval needs to be set. At this point, it is uncertain whether the check interval exists in the firmware. If the command previously transmitted by the host 100 to the data storage device 200 was an open command, the firmware will store the previously set check interval. In this case, the existing check interval is directly used. If the command previously transmitted by the host 100 to the data storage device 200 was a non-open command or this is the first execution of the data processing method described herein, the firmware will not store the previously set check interval. Therefore, step S103 is required to determine whether a check interval exists. If the firmware does not store a check interval, a preset check interval is required. In this embodiment, in step S104, the preset check interval is a first preset check interval. The first preset check interval is, for example, 4KB, which is the capacity of a physical page and the length of data read or written at a time during random reads or writes. In other embodiments, the preset check interval is, for example, 8KB, 16KB, or 32KB.

[0041] See also Figure 1 and Figure 2 As shown, in one embodiment of the present invention, in step S105, after setting the detection interval by using an existing detection interval or a preset detection interval, data is transmitted between the host 100 and the data storage device 200 in units of the detection interval. Specifically, when the host 100 and the data storage device 200 are performing data transmission, at each detection interval, the data storage device 200 will detect whether a stop command has been received. When the data storage device 200 receives the stop command, the data transmission between the host 100 and the data storage device 200 will be stopped. When the data storage device 200 does not receive the stop command, the host 100 and the data storage device 200 will continue to perform data transmission and calculate the detection interval from zero until the data storage device 200 detects the stop command, thereby ending the data transmission between the host 100 and the data storage device 200.

[0042] See also Figure 1 and Figure 2As shown, in one embodiment of the present invention, after the data transfer between the host 100 and the data storage device 200 is completed, the detection interval can be updated based on the length of the data transferred between the host 100 and the data storage device 200. The updated detection interval is used as the detection interval for the next open command. Except for test scenarios such as software testing, read and write commands between the host 100 and the data storage device 200 have a certain degree of continuity. For example, they remain in the same read and write state for a long period of time. This read and write state can be sequential read, sequential write, random read, or random write. For example, when downloading or watching a movie, sequential read / write operations are mostly used, and random read and write commands are rarely involved. For example, when operating application software, random read / write operations are mostly used, and sequential read and write commands are rarely involved. Therefore, over a long period of time, the length of data transferred between the host 100 and the data storage device 200 is fixed. Therefore, when the detection interval is updated using the length of the data transferred between the host 100 and the data storage device 200, the length of the data transferred by the host 100 to the data storage device 200 next time is likely to be equal to the length of the data transferred by the host 100 to the data storage device 200 this time. During data transmission between the host 100 and the data storage device 200, except when the read and write status between the host 100 and the data storage device 200 changes, the detection interval and the length of data transmitted between the host 100 and the data storage device 200 are too large, through the update of the detection interval in this application, the length of data transmitted between the detection interval and the data storage device 200 is usually in an adapted state.

[0043] Please combine Figure 1 、 Figure 2 and Figure 3 As shown, in one embodiment of the present invention, in step S107, the length of data transmitted between the host and the data storage device is obtained, and the detection interval is updated according to the data length, including steps S201 to S206.

[0044] Step S201: Determine whether the length of the data currently transmitted between the host and the data storage device is less than the detection interval. If the length of the data currently transmitted between the host and the data storage device is less than the detection interval, proceed to step S206. If the length of the data currently transmitted between the host and the data storage device is not greater than the detection interval, proceed to step S202.

[0045] Step S202: Determine whether the length of the data currently transmitted between the host and the data storage device is equal to the detection interval. If the length of the data currently transmitted between the host and the data storage device is equal to the detection interval, proceed to step S203. If the length of the data currently transmitted between the host and the data storage device is not equal to the detection interval, proceed to step S204.

[0046] Step S203: Keep the detection interval unchanged.

[0047] Step S204: Determine whether the detection interval is equal to the first preset detection interval. If the detection interval is equal to the first preset detection interval, execute step S205; if the detection interval is not equal to the first preset detection interval, execute step S206.

[0048] Step S205: Update the detection interval to a second preset detection interval.

[0049] Step S206: Use the length of the data transmitted between the host and the data storage device as an updated detection interval.

[0050] Please combine Figure 1 、 Figure 2 and Figure 3 As shown, in one embodiment of the present invention, when updating the detection interval based on the data length, it is necessary to first obtain the relationship between the data length transmitted between the current host 100 and the data storage device 200 and the detection interval, and update the detection interval based on the relationship between the data length transmitted between the current host 100 and the data storage device 200 and the detection interval.

[0051] See also Figure 1 and Figure 3 As shown, in one embodiment of the present invention, according to step S201 and step S202, it can be determined whether the length of the data transmitted between the host 100 and the data storage device 200 is greater than, less than, or equal to the detection interval. When the length of the data transmitted between the host 100 and the data storage device 200 is less than the detection interval, step S206 is executed, that is, the length of the data transmitted between the host 100 and the data storage device 200 is used as the updated detection interval. When the length of the data transmitted between the host 100 and the data storage device 200 is equal to the detection interval, step S203 is executed, that is, the detection interval remains unchanged. When the length of the data transmitted between the host 100 and the data storage device 200 is greater than the detection interval, steps S204 to S206 are executed.

[0052] See also Figure 1 and Figure 3As shown, in one embodiment of the present invention, in steps S204 to S206, the first preset detection interval is 4KB, which is also the length of data read at a time during random reads and writes. The second preset detection interval is 128KB, which is also the length of data read at a time during sequential reads and writes. Therefore, through steps S204 and S205, when executing the data processing method provided by this application, in the first loop, the first preset detection interval is used as the actual detection interval. This is equivalent to verifying whether the data transmission between the host 100 and the data storage device 200 is random reads and writes. In the first loop, if the length of the data transmitted between the host 100 and the data storage device 200 is greater than the first pre-detection interval, that is, the transmission between the host 100 and the data storage device 200 is not random reads and writes, the detection interval is updated to the second preset detection interval. In the second loop, the second preset detection interval is used as the actual detection interval. This is equivalent to verifying whether the data transmission between the host 100 and the data storage device 200 is sequential reads and writes. If the length of the data transmitted between the host 100 and the data storage device 200 is greater than the second pre-detection interval, that is, the data transmission between the host 100 and the data storage device 200 is not sequential reading and writing, the length of the data transmitted between the host 100 and the data storage device 200 will be used as the updated detection interval.

[0053] See also Figure 1 and Figure 3 As shown, in one embodiment of the present invention, using the data processing method provided by the present application, when data is transmitted between the host 100 and the data storage device 200, the length of data read at one time during common random reading and writing, and the length of data read at one time during sequential reading and writing are first used as the preset detection interval. The length of data currently transmitted between the host 100 and the data storage device 200 can be obtained with the highest probability. When the transmission method between the host 100 and the data storage device 200 changes, the current detection interval can be updated based on the length of data previously transmitted between the host 100 and the data storage device 200, so that the detection interval can be quickly updated based on the data transmission method between the host 100 and the data storage device 200. In addition, a stop command can be received during the subsequent detection interval, thereby reducing the redundant operations generated and the number of detections.

[0054] See also Figure 4 As shown, an embodiment of the present application provides a data storage device, which also includes a memory 302, a processor 301 and a program stored in the memory and executable on the processor, and the processor executes and implements the above-mentioned data processing method.

[0055] See also Figure 4As shown, the memory 302 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory may be an internal storage unit of a data storage device, such as a mobile hard disk of the data storage device. In other embodiments, the memory may also be an external storage device of the data storage device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped with the data storage device. Furthermore, the memory may include both an internal storage unit of the data storage device and an external storage device. The memory can be used not only to store application software installed in the data storage device and various types of data, but also to temporarily store data that has been output or is about to be output.

[0056] See also Figure 4 As shown, in some embodiments, the processor 301 may be comprised of an integrated circuit, such as a single packaged integrated circuit or multiple packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor is the control core (Control Unit) of the vehicle-mounted device, connecting the various components of the vehicle-mounted device via various interfaces and circuits. It executes programs or modules stored in the memory and accesses data stored in the memory to perform various functions of the vehicle-mounted device and process data.

[0057] The processor executes the operating system of the vehicle-mounted device and various installed application programs. The processor executes the application programs to implement the steps in the above method embodiment.

[0058] Exemplarily, the program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules may be a series of program command segments capable of performing specific functions, and the command segments are used to describe the execution process of the program in the in-vehicle device.

[0059] The above-mentioned integrated unit implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module stored in a storage medium includes a number of commands for causing a computer device (which can be a personal computer, computer equipment, or network equipment, etc.) or a processor to perform some functions of the lithium battery cold solder joint detection method according to various embodiments of the present invention.

[0060] In summary, the present invention provides a data processing method and a data storage device, which includes determining whether a command received by the data storage device is an open command. When the command received by the data storage device is a non-open command, the detection interval is cleared. When the data storage device receives an open command sent by the host, the existing detection interval or the preset detection interval is maintained. Data is transmitted between the host and the data storage device in units of the detection interval. When the data storage device receives an end command sent by the host, the data transmission between the host and the data storage device is ended. The length of the data transmitted between the host and the data storage device is obtained, and the detection interval is updated based on the data length. Through the data processing method and data storage device provided by the present application, the requirements for the redundant operations generated and the number of detection times can be balanced, thereby improving data transmission performance.

[0061] The embodiments of the present invention disclosed above are intended only to illustrate the present invention. They do not describe all details in detail, nor do they limit the present invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the content of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A data processing method, characterized in that: At least the following steps are included: When the data storage device receives an open command sent by the host, a detection interval is set; transmitting data between the host and the data storage device in units of the detection interval; When the data storage device receives the end command sent by the host, the data transmission between the host and the data storage device ends; as well as The length of data transmitted between the host and the data storage device is obtained, and the detection interval is updated according to the data length.

2. A data processing method according to claim 1, characterized in that: The data processing method further comprises the following steps: It is determined whether the command received by the data storage device is an open command, and if the command received by the data storage device is not an open command, the detection interval is cleared.

3. A data processing method according to claim 1, characterized in that: Setting the detection interval includes the following steps: Determining whether the detection interval exists, and if the detection interval does not exist, presetting the detection interval; and If the detection interval exists, the existing detection interval is used.

4. A data processing method according to claim 3, characterized in that: The preset detection interval is a first preset detection interval, and the first preset detection interval is the length of data read or written at one time during random reading and writing.

5. A data processing method according to claim 1, characterized in that: Updating the detection interval according to the data length comprises the following steps: Obtaining the relationship between the length of data transmitted between the host and the data storage device and the detection interval; and The detection interval is updated according to the relationship between the length of data transmitted between the host and the data storage device this time and the detection interval.

6. A data processing method according to claim 1, characterized in that: When the length of data transmitted between the host and the data storage device this time is less than the detection interval, the length of data transmitted between the host and the data storage device this time is used as the updated detection interval.

7. A data processing method according to claim 1, characterized in that: When the length of data transmitted between the host and the data storage device this time is equal to the detection interval, the detection interval is kept unchanged.

8. A data processing method according to claim 1, characterized in that: When the length of data transmitted between the host and the data storage device is greater than the detection interval, and the detection interval is equal to the first preset detection interval, the detection interval is updated to the second preset detection interval, wherein the first preset detection interval is the length of data read or written at one time during random reading and writing, and the second preset detection interval is the length of data read or written at one time during sequential reading and writing.

9. A data processing method according to claim 1, characterized in that: When the length of data transmitted between the host and the data storage device is greater than the detection interval, and the detection interval is not equal to the first preset detection interval, the length of data transmitted between the host and the data storage device is used as the updated detection interval, wherein the first preset detection interval is the length of data read or written at one time during random reading and writing.

10. A data storage device, characterized in that: The data storage device comprises: a memory storing program commands; and A processor runs the program command to implement the data processing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment, storage medium and program product

    CN112882661A

  • Memory, memory control method and memory system

    CN114641762A

  • Variable-length data storing method and variable-length data storing device

    US20100241897A1

  • Apparatus for memory control

    US20200066322A1

  • Asynchronous access system for multiprocessor system and processor module used in the asynchronous access system

    US5708795A