Data processing method, apparatus, and electronic device

CN117396859BActive Publication Date: 2026-10-09HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202280038208.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-30
Publication Date
2026-10-09
Estimated Expiration
2042-01-30

AI Technical Summary

Benefits of technology

[0063] It should be understood that the third to twelfth aspects of this application are consistent with the technical solutions of the first to second aspects of this application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation are similar, so they will not be repeated here.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117396859B_ABST
    Figure CN117396859B_ABST
Patent Text Reader

Abstract

The application provides a data processing method, device and electronic equipment. The data processing method comprises: generating a first universal flash storage (UFS) protocol information unit (UPIU), wherein the first UPIU comprises prompt type information and description information of the first UPIU, the prompt type information comprises a first type, a second type or a third type, the first type is used for indicating that a second UPIU is ready, the second type is used for indicating that the second UPIU is not ready, the third type is used for indicating to delete at least one of a physical area descriptor of a UPIU indicated by the first type or a physical area descriptor of a UPIU indicated by the second type in a high-speed memory of a host, and the description information of the first UPIU comprises identification information of the first UPIU and data cache offset of the first UPIU; and sending the first UPIU. The application can improve the UFS data throughput rate and is beneficial to improving the data read-write performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and in particular to a data processing method, apparatus, and electronic device. Background Technology

[0002] Universal flash storage (UFS) is a flash memory system defined by the Joint Electronic Equipment Committee (JEDEC) standard, designed for applications requiring high data transfer rates and low power consumption. UFS is suitable for applications with high data transfer rates and low power consumption, such as mobile and automotive applications. Mobile applications can include smartphones, laptops, tablets, etc. UFS's high-speed serial interface and optimized protocols significantly improve throughput and system performance.

[0003] A UFS system can include a UFS host and a UFS device. Figure 1 This is a schematic diagram of the structure of a UFS system, such as... Figure 1 As shown, a UFS device may include a UFS device controller and multiple flash memory chips. These flash memory chips store data in a non-volatile manner; for example, the multiple flash memory chips may be such as... Figure 1 The diagram shows multiple NAND flash memory chips. The UFS device controller controls these chips via the open NAND Flash interface (ONFI). The UFS host and UFS device can connect via various interface standards to perform data processing operations such as read and write operations.

[0004] With the development of electronic, multimedia, and internet technologies, there is a growing need for more storage space and faster data storage or retrieval speeds. Therefore, improving the data read / write performance of UFS systems has become an urgent technical challenge. Summary of the Invention

[0005] This application provides a data processing method, apparatus, and electronic device that can improve UFS data throughput and enhance data read / write performance.

[0006] The following sections introduce this application from several aspects, and the implementation methods and beneficial effects of these aspects can be used for mutual reference.

[0007] In a first aspect, this application provides a data processing method, which may include: generating a first Universal Flash Storage UFS Protocol Information Unit (UPIU), the first UPIU including prompt type information and description information of the first UPIU, the prompt type information including a first type, a second type, or a third type; the first type is used to indicate that a second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate the deletion of at least one of the physical region descriptors of the UPIU indicated by the first type or the physical region descriptors of the UPIU indicated by the second type from the host's high-speed memory; the physical region descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; the description information of the first UPIU includes identification information of the first UPIU and a data cache offset of the first UPIU; a plurality of UPIUs for responding to a command including the first UPIU and the second UPIU, the command being used to request writing data or reading data, the data cache offset of the first UPIU being used to indicate the position of the first UPIU among the plurality of UPIUs for responding to the command; and sending the first UPIU.

[0008] The second UPIU is sent after the first UPIU, for example, some time after the first UPIU is sent.

[0009] Therefore, the first UPIU sent carries a prompt type information, which instructs the host to adjust the physical region descriptor in the host's high-speed memory. This makes the adjusted physical region descriptor more likely to be hit by the second UPIU received later, thereby improving the hit rate of the host's high-speed memory and achieving a better UFS data throughput, which is beneficial to improving data read and write performance.

[0010] For example, if the prompt type information is type 1 or type 2, before receiving the second UPIU, the host can prefetch the physical region descriptor of the second UPIU based on the prompt type information carried by the first UPIU and store it in the host's high-speed memory. Subsequently, if the host receives the second UPIU, it can quickly retrieve the physical region descriptor of the second UPIU from the high-speed memory, and then retrieve or write data to the host's first memory based on the physical region descriptor of the second UPIU. In this way, by prefetching the corresponding physical region descriptor before the host receives the second UPIU, the processing speed of the second UPIU can be improved, thereby enhancing data read and write performance.

[0011] This primary memory is typically a power-loss volatile memory, which loses its stored contents when power is off; it can also be called main memory or RAM.

[0012] The prefetching in this application refers to fetching in advance or beforehand. That is, the physical region descriptor of the second UPIU is fetched before the host receives it, rather than being fetched only upon receiving the second UPIU. In other words, the physical region descriptor is fetched earlier than the arrival of the second UPIU at the host.

[0013] In one possible design, generating a first Universal Flash Storage UFS Protocol Information Unit (UPIU) includes: acquiring a first data volume and the status information of the second UPIU; and determining the prompt type information of the first UPIU based on the first data volume and the status information of the second UPIU.

[0014] The first data volume can also be referred to as the data volume of currently incomplete hints (hint outstanding).

[0015] The amount of data in a currently outstanding hint refers to the amount of data for the UPIU indicated by the currently sent hint message that has not yet been sent. In some scenarios, the amount of data in a currently outstanding hint is 0KB. In other scenarios, the amount of data in a currently outstanding hint is greater than 0KB. For example, the amount of data in a currently outstanding hint may include the amount of data for a fourth UPIU indicated by at least one third UPIU of a first or second type, i.e., the amount of data for at least one fourth UPIU. At least one third UPIU was sent before the first UPIU was sent, and at least one fourth UPIU is an unsent UPIU.

[0016] Therefore, by obtaining the data volume corresponding to the currently incomplete prompt and the status information of the second UPIU, the prompt type information of the first UPIU is determined based on the data volume of the currently incomplete prompt and the status information of the second UPIU. This prompt type information includes a first type, a second type, or a third type. In this way, differentiated prompt type information is provided for different scenarios, thereby adapting to the data transmission needs of different scenarios.

[0017] In one possible design, the prompt type information of the first UPIU is determined based on the status information of the first data volume and the second UPIU, including: determining whether the first data volume is less than a first threshold; when the first data volume is less than the first threshold, the prompt type information of the first UPIU is determined based on the status information of the second UPIU, and the prompt type information includes a first type or a second type.

[0018] Therefore, when the first data volume is less than the first threshold, it indicates that the UFS device's incomplete hints (hint outstandings) have not been exhausted. The first UPIU can carry either a first type or a second type, allowing the host to prefetch the physical region descriptor of the second UPIU based on the hint type information carried by the first UPIU before receiving it, and store it in the host's high-speed memory. Subsequently, if the host receives the second UPIU, it can quickly retrieve its physical region descriptor from the high-speed memory, improving the processing speed of the second UPIU and thus enhancing data read / write performance.

[0019] In one possible design, the prompt type information of the first UPIU is determined based on the status information of the second UPIU. This prompt type information includes either a first type or a second type, including:

[0020] Determine whether the status information of the second UPIU indicates that the second UPIU is ready; when the status information of the second UPIU indicates that the second UPIU is ready, determine that the prompt type information is of the first type; when the status information of the second UPIU indicates that the second UPIU is not ready, determine that the prompt type information is of the second type.

[0021] Therefore, when the first data volume is less than the first threshold, different prompt types are determined based on the status information of the second UPIU. When the status information of the second UPIU indicates that the second UPIU is ready, the prompt type is determined to be of the first type; when the status information of the second UPIU indicates that the second UPIU is not ready, the prompt type is determined to be of the second type. This allows the host to adjust the physical region descriptors in its high-speed memory based on the different prompt types, so that the adjusted physical region descriptors are hit by subsequently received second UPIUs with a higher probability. For example, the physical region descriptor prefetched by the host based on the first type has a higher priority in the high-speed memory than the physical region descriptor prefetched by the host based on the second type.

[0022] In one possible design, the method further includes: when the first data volume equals a first threshold, determining that the prompt type information is a third type.

[0023] Therefore, when the first data volume equals the first threshold, it indicates that the UFS device's hints outstanding have been exhausted. The hint message type is determined to be the third type, and at least one of the physical region descriptors of the UPIU indicated by the first type or the second type, is deleted from the host's high-speed memory. This avoids the problem of subsequent hint messages being unable to be sent due to the limitation of hints outstanding.

[0024] In one possible design, determining the prompt type information as a third type includes: determining the prompt type information as a third type when the status information of the second UPIU indicates that the second UPIU is ready.

[0025] Therefore, when the first data volume equals the first threshold, and the status information of the second UPIU indicates that the second UPIU is ready, the prompt message type is determined to be the third type. The third type instructs the deletion of at least one of the physical region descriptors of the UPIU indicated by the first type or the physical region descriptors of the UPIU indicated by the second type from the host's high-speed memory. This avoids the problem of prompt messages indicating a ready second UPIU being unable to be sent due to limitations on hints that are not yet available.

[0026] In one possible design, the first UPIU includes either a Transmission Ready (RTT) UPIU or a Read In Data UPIU.

[0027] When the command is used to request to write data, the first UPIU is the Transmission Ready (RTT) UPIU; when the command is used to request to read data, the first UPIU is the data to be read UPIU.

[0028] Therefore, the Transmission Ready (RTT) UPIU in response to a read data command or the read data UPIU in response to a read data command carries the hint type information of the second UPIU to be sent later. By informing the host in advance through the hint type information, the host adjusts the physical region descriptor in the host's high-speed memory, so that the adjusted physical region descriptor is hit by the second UPIU received later with a higher probability. This can improve the hit rate of the host's high-speed memory, thereby achieving a better UFS data throughput and improving data read and write performance.

[0029] In one possible design, this prompt type information is located in a reserved field of the prompt information for Transmission Ready RTT UPIU or Read Data UPIU.

[0030] Therefore, by using reserved fields for transmitting ready-to-transmit RTT UPIUs or read-in data UPIUs, the prompt type information can be carried without adding new fields. This makes the format of the UPIU carrying the prompt type information the same as the UPIU format defined by the existing UFS protocol standard, which is beneficial to improving the compatibility and feasibility of data processing methods.

[0031] In one possible design, the method further includes: receiving a command UPIU; and generating a first UPIU in response to the command UPIU.

[0032] Therefore, for the UPIU command used to request writing or reading data, the prompt type information is carried in the first UPIU of the response command to improve the speed of data writing or reading.

[0033] Secondly, this application provides a data processing method, which may include: receiving a first Universal Flash Storage UFS Protocol Information Unit (UFS protocol information). The first UPIU includes prompt type information and description information of the first UPIU. The prompt type information includes a first type, a second type, or a third type. The first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate the deletion of at least one of the physical region descriptors of the UPIU indicated by the first type or the physical region descriptors of the UPIU indicated by the second type from the host's high-speed memory. The physical region descriptor is used to indicate the location of the host's first memory corresponding to the UPIU. The description information of the first UPIU includes identification information of the first UPIU and data cache offset of the first UPIU. A plurality of UPIUs for responding to a command include the first UPIU and the second UPIU. The command is used to request to write or read data. The data cache offset of the first UPIU is used to indicate the position of the first UPIU among the plurality of UPIUs for responding to the command. The physical region descriptors in the host's high-speed memory are adjusted according to the prompt type information.

[0034] In one possible design, the physical region descriptor in the host's high-speed memory is adjusted based on the prompt type information, including:

[0035] When the prompt type information is of the first type, the physical region descriptor corresponding to the prompt type information of the first UPIU is prefetched and saved to the host's high-speed memory with the first priority;

[0036] When the prompt type information is of the second type, the physical region descriptor corresponding to the prompt type information of the first UPIU is prefetched and saved to the host's high-speed memory with the second priority; the second priority is lower than the first priority.

[0037] When the prompt type information is type 3, delete at least one of the physical region descriptors of the UPIU indicated by type 1 or type 2 in the host's high-speed memory.

[0038] In one possible design, before receiving the first UPIU, the method further includes: receiving at least one third UPIU, each of the at least one third UPIU including a first type or a second type for indicating whether its corresponding fourth UPIU is ready or not, wherein the physical region descriptor in the host's high-speed memory includes the physical region descriptor of the fourth UPIU corresponding to each of the at least one third UPIU.

[0039] In one possible design, the first UPIU includes either a Transmission Ready (RTT) UPIU or a Read In Data UPIU.

[0040] In one possible design, this prompt type information is located in a reserved field of the prompt information for Transmission Ready RTT UPIU or Read Data UPIU.

[0041] Thirdly, this application provides a data processing apparatus, comprising: a controller and a transmission interface; the controller is configured to generate a first Universal Flash Memory Protocol Information Unit (UPIU), the first UPIU including prompt type information and description information of the first UPIU, the prompt type information including a first type, a second type, or a third type; the first type is used to indicate that a second UPIU is ready, the second type is used to indicate that a second UPIU is not ready, and the third type is used to indicate the deletion of the physical region descriptor of the UPIU indicated by the first type or the one indicated by the second type from the host's high-speed memory. The controller is configured to include at least one of the physical region descriptors of the UPIU; the physical region descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; the plurality of UPIUs used to respond to a command includes the first UPIU and the second UPIU, the command is used to request to write data or read data, and the data cache offset of the first UPIU is used to indicate the location of the first UPIU among the plurality of UPIUs used to respond to the command; the controller is also configured to send the first UPIU through the transmission interface.

[0042] In one possible design, the controller is used to: acquire a first data volume and the status information of the second UPIU; the first data volume is the data volume of the UPIU that has currently sent a prompt message but has not yet sent the prompt message indicated by the UPIU; and determine the prompt type information of the first UPIU based on the first data volume and the status information of the second UPIU.

[0043] In one possible design, the controller is used to: determine whether the first data volume is less than a first threshold; when the first data volume is less than the first threshold, determine the prompt type information of the first UPIU based on the status information of the second UPIU, the prompt type information including a first type or a second type.

[0044] In one possible design, the controller is used to: determine whether the status information of the second UPIU indicates that the second UPIU is ready; when the status information of the second UPIU indicates that the second UPIU is ready, determine that the prompt type information is of the first type; when the status information of the second UPIU indicates that the second UPIU is not ready, determine that the prompt type information is of the second type.

[0045] In one possible design, the controller is also used to: determine the prompt type information as a third type when the first data volume is equal to the first threshold.

[0046] In one possible design, the controller is used to: determine the prompt type information as a third type when the status information of the second UPIU indicates that the second UPIU is ready.

[0047] In one possible design, the first UPIU includes either a Transmission Ready (RTT) UPIU or a Read In Data UPIU.

[0048] In one possible design, the prompt type information is located in a reserved field of the prompt information for the Transmission Ready RTT UPIU or Read Data UPIU.

[0049] In one possible design, the controller is also used to: receive a command UPIU through the transmission interface; and generate the first UPIU in response to the command UPIU.

[0050] Fourthly, this application provides a data processing apparatus, comprising: a transmission interface, a controller, a high-speed memory, and a first memory; the controller is configured to receive a first Universal Flash Memory (UFS) Protocol Information Unit (UPIU), the first UPIU including prompt type information and description information of the first UPIU, the prompt type information including a first type, a second type, or a third type; the first type is used to indicate that a second UPIU is ready, the second type is used to indicate that a second UPIU is not ready, and the third type is used to indicate the deletion of the physical region descriptor of the UPIU indicated by the first type or the one indicated by the second type from the host's high-speed memory. The controller includes at least one of the physical region descriptors of the UPIU; the physical region descriptor is used to indicate the location of the first memory corresponding to the UPIU; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; the plurality of UPIUs used to respond to the command includes the first UPIU and the second UPIU, the command is used to request to write data or read data, and the data cache offset of the first UPIU is used to indicate the location of the first UPIU among the plurality of UPIUs used to respond to the command; the controller is also used to adjust the physical region descriptor in the host's high-speed memory according to the prompt type information.

[0051] In one possible design, the controller is configured to: when the prompt type information is of a first type, prefetch the physical region descriptor corresponding to the prompt type information of the first UPIU, and save it to the host's high-speed memory with a first priority; when the prompt type information is of a second type, prefetch the physical region descriptor corresponding to the prompt type information of the first UPIU, and save it to the host's high-speed memory with a second priority; the second priority is lower than the first priority; when the prompt type information is of a third type, delete at least one of the physical region descriptors of the UPIU indicated by the first type or the physical region descriptors of the UPIU indicated by the second type from the host's high-speed memory.

[0052] In one possible design, the controller is further configured to receive at least one third UPIU via a transmission interface before receiving the first UPIU, wherein each of the at least one third UPIU includes a first type or a second type for indicating whether its corresponding fourth UPIU is ready or not, and the physical region descriptor in the high-speed memory includes the physical region descriptor of the fourth UPIU corresponding to each of the at least one third UPIU.

[0053] In one possible design, the first UPIU includes either a Transmission Ready (RTT) UPIU or a Read In Data UPIU.

[0054] In one possible design, the prompt type information is located in a reserved field of the prompt information for the Transmission Ready RTT UPIU or Read Data UPIU.

[0055] Fifthly, this application provides a data processing apparatus, which serves as a storage device, such as a UFS device. The data processing apparatus can be an electronic device, a chip or system-on-a-chip within an electronic device, or a functional module within an electronic device for implementing the first aspect or any possible design of the first aspect. The data processing apparatus can implement the functions of the first aspect or any possible design of the first aspect, and these functions can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions. For example, the data processing apparatus may include a UPIU generation module and a transceiver module.

[0056] Sixthly, this application provides a data processing apparatus, which serves as a host, such as a UFS host. The data processing apparatus can be an electronic device, a chip or system-on-a-chip within an electronic device, or a functional module within an electronic device for implementing the second aspect or any possible design of the second aspect. The data processing apparatus can implement the functions of the aforementioned second aspect or various possible designs of the second aspect, and these functions can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions. For example, the data processing apparatus may include a UPIU processing module and a transceiver module.

[0057] In a seventh aspect, this application provides a storage system comprising a storage device and a host; the storage device is configured to perform the method as described in the first aspect or any one thereof, and the host is configured to perform the method as described in the second aspect or any one thereof.

[0058] Eighthly, this application provides an electronic device, comprising: a host and a storage device coupled to the host; the host being configured to perform the method as described in the second aspect or any one of the second aspects; and the storage device being configured to perform the method as described in the first aspect or any one of the first aspects.

[0059] Ninthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a storage device, implements the method described in any one of the first aspects above.

[0060] In a tenth aspect, this application provides a computer-readable storage medium storing a computer program that, when executed by a host, implements the method described in any one of the second aspects above.

[0061] In one aspect, this application provides a computer program product comprising a computer program that, when executed by a processor, implements the method described in any one of the first aspects above.

[0062] In a twelfth aspect, this application provides a computer program product comprising a computer program that, when executed by a processor, implements the method described in any one of the second aspects above.

[0063] It should be understood that the third to twelfth aspects of this application are consistent with the technical solutions of the first to second aspects of this application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation are similar, so they will not be repeated here. Attached Figure Description

[0064] Figure 1 This is a schematic diagram of the structure of the UFS system according to an embodiment of this application;

[0065] Figure 2 A schematic diagram of a write operation provided for an embodiment of this application;

[0066] Figure 3 A schematic diagram of a read operation provided in an embodiment of this application;

[0067] Figure 4 A schematic diagram illustrating the sequential transmission of write operations as provided in an embodiment of this application;

[0068] Figure 5 A schematic diagram illustrating out-of-order transmission of write operations provided in an embodiment of this application;

[0069] Figure 6 A schematic diagram of a UFS device 10 and a UFS host 20 provided for embodiments of this application;

[0070] Figure 7 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0071] Figure 8A This is a schematic diagram of a UPIU according to an embodiment of this application;

[0072] Figure 8B A schematic diagram illustrating the domain segment composition of a UPIU provided in an embodiment of this application;

[0073] Figure 9 A schematic diagram illustrating a data processing method provided in an embodiment of this application;

[0074] Figure 10 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0075] Figure 11 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0076] Figure 12 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0077] Figure 13 A schematic diagram of a data processing apparatus 1300 provided for an embodiment of this application;

[0078] Figure 14 A schematic diagram of a data processing apparatus 1400 provided for an embodiment of this application;

[0079] Figure 15 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0080] The following description, in conjunction with the accompanying drawings, details a data processing method, apparatus, and electronic device provided in the embodiments of this application.

[0081] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.

[0082] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.

[0083] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0084] In the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone.

[0085] First, we will explain several technical terms involved in the embodiments of this application.

[0086] The Universal Flash Storage Protocol Information Unit (UPIU) is the carrier for transmitting commands, data, and status information. UPIUs are data packets with a fixed format. UFS hosts and UFS devices can interact through UPIUs with different functionalities.

[0087] UPIUs can include command UPIUs, data transfer UPIUs, and status UPIUs. For example, a command UPIU is a write or read command sent by the host to the UFS device. Data transfer UPIUs can include ready-to-transfer UPIUs (RTT UPIUs), data-out UPIUs, and data-in UPIUs. The ready-to-transfer UPIU (RTT UPIU) is sent by the UFS device to the host when processing a write command, informing the host that it is ready to receive data. The data-out UPIU is sent by the host to the UFS device after receiving the RTT UPIU, used to write data to the UFS device. The DataIn UPIU is a UPIU sent by the UFS device to the host to transfer data. Status UPIUs can include response UPIUs. The Response UPIU is a UPIU sent by the UFS device to the host to return the execution status of a write or read command.

[0088] It should be noted that UPIU may also include UPIUs with other functions, which will not be illustrated in the embodiments of this application.

[0089] NAND flash memory is a non-volatile random access storage medium characterized by data retention after power loss. The flash memory technologies used in NAND flash memory can include Single-Level Cell (SLC) (1 bit / cell), Multi-Level Cell (MLC) (2 bits / cell), Trinary-Level Cell (TLC) (3 bits / cell), and even Quad-Level Cell (QLC) (4 bits / cell). This application uses NAND flash memory employing TLC technology as an example for illustration.

[0090] A write operation is the process of writing data to NAND flash memory. Figure 2 A schematic diagram of a write operation provided in an embodiment of this application, such as... Figure 2 As shown, write operations can be implemented using the above command UPIU, one or more RTT UPIUs, data-out UPIU, and response UPIU.

[0091] A read operation is the operation of reading data from NAND flash memory. Figure 3 A schematic diagram of a read operation provided in an embodiment of this application, as shown below. Figure 3 As shown, read operations can be performed using the command UPIU, one or more data in UPIUs, and response UPIUs.

[0092] The read and write operations described above can be implemented either in order or out of order.

[0093] In sequential execution, for write operations, the data buffer offsets of multiple RTT UPIUs are sequentially increasing, and for read operations, the data buffer offsets of multiple DataIn UPIUs are sequentially increasing.

[0094] Taking write operations as an example, Figure 4 This is a schematic diagram illustrating the sequential transmission of write operations provided in an embodiment of this application, as shown below. Figure 4As shown, the command UPIU (Command UPIU), used to request the transfer of 48 kilobytes (KB) of data (i.e., writing 48KB of data), is divided into two data outgoing UPIU (DataOut UPIU) transfers: Data Outgoing UPIU 1 and Data Outgoing UPIU 2. The data buffer offsets of RTT UPIU 1 and RTT UPIU 2 are sequentially increasing.

[0095] Read or write operations performed sequentially often require a large amount of internal caching and have a long processing latency, resulting in poor data read and write performance.

[0096] In out-of-order (OOO) execution, for write operations, the data buffer offsets of multiple RTT UPIUs are non-sequentially increasing, and for read operations, the data buffer offsets of multiple DataIn UPIUs are non-sequentially increasing.

[0097] Taking write operations as an example, Figure 5 This is a schematic diagram of out-of-order transmission of write operations provided in an embodiment of this application, as shown below. Figure 5 As shown, the command UPIU (Command UPIU), used to request the transfer of 48KB of data (i.e., writing 48KB of data), is divided into two data outgoing UPIU (DataOut UPIU) transfers: Data Outgoing UPIU 1 and Data Outgoing UPIU 2. The data buffer offsets of RTT UPIU 1 and RTT UPIU 2 are non-sequentially increasing. The data buffer offset of RTT UPIU 1 is 16KB, and the data buffer offset of RTT UPIU 2 is 0KB.

[0098] Compared to sequential execution, performing read or write operations out of order (ooo) can reduce the amount of internal cached data and command execution time, thus improving data read and write performance.

[0099] The data processing method of this application can perform read or write operations in an out-of-order (OOO) manner to further improve data read and write performance. Several embodiments are described below to illustrate the data processing method of this application in detail.

[0100] The data processing method of this application embodiment can be applied to, for example, Figure 1 The UFS system shown is an example. For instance, this UFS system could specifically be as follows: Figure 6 The structure shown, Figure 6 This is a schematic diagram of a UFS device 10 and a UFS host 20 according to an embodiment of this application, as shown below. Figure 6 As shown, the UFS device 10 can be any non-volatile memory that provides write / read data functionality to the UFS host 20. In this embodiment, the UFS device 10 can be built into the UFS host 20, or it can be independently configured, or both the UFS device 10 and the UFS host 20 can reside in the same electronic device; this application does not impose specific limitations in this regard. Specifically, the UFS host 20 or the UFS device 10 can be a chip, a chipset, or a circuit board carrying a chip or chipset, which can operate under necessary software drivers.

[0101] The UFS device 10 may include a UFS device controller 101 and non-volatile memory 102. The UFS device controller 101 manages and controls the communication between the UFS host 20 and the UFS device 10, and provides a standardized (e.g., the UFS standard of this application) interface for the communication between the UFS host 20 and the UFS device 10. Specifically, the UFS device controller 101 can respond to commands sent by the UFS host 20 (e.g., write, read, etc.), perform corresponding operations, and return a completion status to the UFS host 20. In this application embodiment, the UFS device controller 101 can generate the first UPIU, second UPIU, etc., involved in this application according to the UFS protocol supported between the UFS host 20 and the UFS device 10, and carry hint type information in the generated first UPIU to indicate the type of hint information to the UFS host 20. For details, please refer to the subsequent detailed description of the data processing method; it will not be described in detail here. The UFS device 10 may also include a transmission interface (not shown in the figure) for receiving or sending UFS standard protocol packets, such as sending the first UPIU, second UPIU, etc. involved in this application through the transmission interface.

[0102] The non-volatile memory 102 may include, but is not limited to, Flash memory (e.g., NAND flash memory, NOR flash memory, etc.). This application embodiment uses multiple NAND flash memories as an example to illustrate the non-volatile memory 102.

[0103] The UFS host 20 may include a host controller 201, high-speed memory 202, and first memory 203. Optionally, the UFS host 20 may also include a processor 204.

[0104] The host controller 201 manages and controls the communication between the UFS host 20 and the UFS device 10, and provides a standardized (e.g., the UFS standard of this application embodiment) interface for the communication between the UFS host 20 and the UFS device 10. Specifically, the host controller 201 can transmit commands (e.g., write, read, etc.) and data to the UFS device 10 according to read / write commands issued by the processor 204. The host controller 201 can convert commands or data into UFS standard protocol packets through encapsulation. For the UFS standard protocol packets received by the UFS host 20 (e.g., the first UPIU, the second UPIU, etc. involved in this application), the host controller 201 can parse them, complete the corresponding processing, and notify the processor 204 of the processing results. The UFS host 20 may also include a transmission interface (not shown in the figure), which is used to receive or send UFS standard protocol packets, for example, to receive the first UPIU, the second UPIU, etc. involved in this application through the transmission interface.

[0105] The first memory 203 is typically a power-loss volatile memory, whose contents are lost when power is off; it can also be called main memory or RAM. In this application, the first memory 203 includes readable and writable RAM, which is used to temporarily store computational data from the processor 204, command descriptors, and data exchanged with the UFS device 10 or other external storage devices. For example, data read from or written to the UFS device 10.

[0106] The first memory 203 may include one or more of the following: Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), and Synchronous Dynamic Random Access Memory (SDRAM). DRAM further includes Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), second-generation Double Data Rate Synchronous Dynamic Random Access Memory (DDR2), third-generation Double Data Rate Synchronous Dynamic Random Access Memory (DDR3), fourth-generation Low Power Double Data Rate Synchronous Dynamic Random Access Memory (Low Power Double Data Rate 4, LPDDR4), and fifth-generation Low Power Double Data Rate Synchronous Dynamic Random Access Memory (Low Power Double Data Rate 5, LPDDR5).

[0107] The high-speed memory 202 in this embodiment stores prefetched physical region descriptors, which may include a physical address and a length. The physical region descriptor may be an entry in a Physical Region Description Table (PRDT). This physical region descriptor can be used by the host to write data to or retrieve data from the first memory 203 during data read / write operations. In this embodiment, the physical region descriptor may be prefetched based on the prompt information field in the RTT UPIU or the read data UPIU, i.e., a prefetched physical region descriptor, to improve data read / write performance. In other words, the prompt information field in the RTT UPIU or the read data UPIU corresponds to the prefetched physical region descriptor. The prefetching in this embodiment can also be understood as pre-fetching or early fetching. The content stored in the high-speed memory 202 can be dynamically adjusted.

[0108] High-speed memory 202 is a memory capable of high-speed data exchange. High-speed memory 202 may include one or more of the following: cache or register.

[0109] Processor 204 can run an operating system, file system (such as the flash file system F2FS), or applications to control multiple hardware or software components connected to processor 204, and can process various data and perform operations. Processor 204 can load instructions or data stored in UFS device 10 into first memory 203, and retrieve instructions or data that need to be processed to processor 204 for processing. After the processing is completed, processor 204 temporarily stores the result in first memory 203, and stores instructions or data that need to be stored for a long time into UFS device 10 through host controller 201. Processor 204 may include one or more processing units (also called processing cores), such as: processor 204 may include one or more of the following: central processing unit (CPU), application processor (AP), modem processing unit, graphics processing unit (GPU), image signal processor (ISP), video codec unit, digital signal processor (DSP), baseband processing unit, and neural network processing unit (NPU). The different processing units can be independent devices or integrated into one or more devices. Furthermore, the processor 204 can also be implemented as a system on a chip (SoC).

[0110] The structures illustrated in this application do not constitute a specific limitation on the UFS device 10 or the UFS host 20. In other embodiments of this application, the UFS device 10 or the UFS host 20 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0111] The aforementioned UFS device 10 and UFS host 20 can be part of an electronic device (i.e., both located in the same electronic device). This electronic device may include, but is not limited to, mobile phones, tablets, laptops, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices, virtual reality (VR) devices, augmented reality (AR) devices, smart home devices, in-vehicle devices, and devices in the Internet of Things (IoT), etc., or may also include servers or service clusters. This application embodiment does not impose any limitations on this.

[0112] Figure 7 This is a flowchart illustrating a data processing method provided in an embodiment of this application. The data processing method in this embodiment involves a host and a storage device. For example, the host may be a UFS host as described in the above embodiments, and the storage device may be a UFS device as described in the above embodiments. Figure 7 As shown, the method may include:

[0113] S701, The storage device generates a first UPIU, which includes prompt type information and description information of the first UPIU.

[0114] The hint type information includes a first type, a second type, or a third type. The first type indicates that the second UPIU is ready. The second type indicates that the second UPIU is not ready. The third type indicates the deletion of at least one of the physical region descriptors of the UPIU indicated by the first type or the UPIU indicated by the second type from the host's high-speed memory. The physical region descriptor represents the location of the host's first memory corresponding to the UPIU. For example, the physical region descriptor may include a physical address and a length. The description information of the first UPIU may include the identification information of the first UPIU and the data buffer offset of the first UPIU. In this embodiment, "not ready" refers to not being ready but being predicted to be ready soon (e.g., after a period of time). The plurality of UPIUs used to respond to a command includes the first UPIU and the second UPIU, the command being used to request writing or reading data, and the data buffer offset of the first UPIU representing the position of the first UPIU among the plurality of UPIUs used to respond to the command.

[0115] For example, the first UPIU is generated after the storage device receives a command UPIU sent by the host. This command UPIU can be used to request to write or read data, i.e., a write command or a read command. The first UPIU can be any one of multiple RTT UPIUs responding to the command UPIU or any one of multiple data-in UPIUs. For example, with... Figure 5 Taking the application scenario shown as an example, the command UPIU (Command UPIU) can be as follows: Figure 5The command UPIU shown can have either RTT UPIU 1 or RTT UPIU 2 as the first UPIU. Taking RTT UPIU 1 as an example, its description can include its identifier and data buffer offset. This data buffer offset is 16KB. In other words, for a command UPIU sent by the host, the storage device responds with two RTT UPIUs (RTT UPIU 1 and RTT UPIU 2), each with a different data buffer offset.

[0116] The first UPIU can be an RTT UPIU or a DataIn UPIU. The first UPIU can include multiple fields to carry different information. For example, the first UPIU can include a hint field and a description field. The description field carries relevant information about the current UPIU (i.e., the first UPIU). For example, the description information carried in the description field includes, but is not limited to, the identification information of the first UPIU and the data buffer offset of the first UPIU. The identification information of the first UPIU can represent the command to which the first UPIU belongs. The identification information of the first UPIU can include, but is not limited to, an information identifier (IID), a logical unit number (LUN), and a task tag. Optionally, the description information of the first UPIU can also include the data transfer count, etc. The data transfer count represents the continuous data or space starting from the data buffer offset. The unit of the data transfer count can be 4KB. The description field may include multiple segments, each carrying one of the information items included in the description information of the first UPIU. For example, Figure 8A This is a schematic diagram of a UPIU according to an embodiment of this application, as shown below. Figure 8AAs shown, the UPIU may include a header field and a data payload field. The header field may include the aforementioned hint field and description field. The data payload field may carry the transmitted data. Figure 8B This is a schematic diagram of the domain segment composition of a UPIU according to an embodiment of this application, as shown below. Figure 8B As shown, the description field may include an IID field segment, a LUN field segment, a task tag field segment, a data buffer offset field segment, a data transfer count field segment, etc. This hint field is used to carry relevant information about the UPIU following the current UPIU (i.e., the first UPIU), i.e., the second UPIU). In this embodiment, the hint field may carry the aforementioned hint type information. For example, the hint type information can be carried using the reserved field included in the hint field. Exemplarily, the hint type information may be two bits. It is understood that the hint type information may also be more bits, and this embodiment does not specifically limit this. The hint field may also carry hint control information, the identifier information of the hint UPIU, and the hint data buffer offset of the hint UPIU, etc. The hint control information is used to indicate whether the hint field carried by the current UPIU is valid. The UPIU's identification information may include, but is not limited to, the hint information identifier (hint IID), the hint logical unit number (hint LUN), and the hint task tag. The hint field may also carry the hint data transfer count. Optionally, the hint data transfer count represents a contiguous block of data or space starting at the hint data buffer offset of the UPIU. Its unit may be 4KB. The hint field may include multiple segments, each carrying one of the information included in the hint field. Figure 8B Taking the UPIU domain segment composition shown as an example, further illustration is given, such as... Figure 8BAs shown, the hint field can include the hint control field, hint type field, hint IID field, hint LUN field, hint task tag field, hint data buffer offset field, and hint data transfer count field.

[0117] The first type can also be called a confirmation hint. The second type can also be called a normal hint. The third type can also be called a delete hint. It should also be noted that the first type, the second type, and the names of the three types are just examples and do not limit the function of the hint type information. They can also be other names, and this application embodiment does not specifically limit them.

[0118] It should also be noted that the hints in the embodiments of this application may also be referred to as suggestions, advance instructions, etc., and the embodiments of this application do not specifically limit them.

[0119] For example, the storage device can determine the hint information carried by the first UPIU based on the data or space of the subsequent UPIU to be sent that is ready, or based on the data or space of the predicted UPIU to be ready (i.e., the second UPIU). Hint information includes, but is not limited to, the hint type information mentioned above.

[0120] S702, The storage device sends the first UPIU to the host.

[0121] Accordingly, the host receives the first UPIU sent by the storage device.

[0122] S703. The host adjusts the physical region descriptor in the host's high-speed memory according to the prompt type information.

[0123] The host parses the first received UPIU and obtains a hint message. Based on the hint type information in the hint message, the host adjusts the physical region descriptors in the host's high-speed memory.

[0124] For example, when the prompt type information is of type 1, the host can prefetch the physical region descriptor corresponding to the prompt type information of the first UPIU and save it to the host's high-speed memory with a first priority. It should also be noted that the host can also search in the high-speed memory for a physical region descriptor corresponding to the information carried in the descriptor field of the first UPIU. If not, the host can directly read the corresponding physical region descriptor from the main memory based on the information carried in the descriptor field of the first UPIU. This application embodiment does not specifically limit the operations performed by the host based on the information carried in the descriptor field of the first UPIU.

[0125] When the prompt type information is type two, the host can prefetch the physical region descriptor corresponding to the prompt type information of the first UPIU and save it to the host's high-speed memory with a second priority. The second priority is lower than the first priority.

[0126] The physical region descriptor corresponding to the prompt type information of the first UPIU refers to the physical region descriptor of the UPIU (i.e., the second UPIU) indicated by the prompt type information of the first UPIU. Before receiving the second UPIU, the host prefetches the physical region descriptor of the second UPIU based on the prompt type information carried by the first UPIU and stores it in the host's high-speed memory. Subsequently, if the host receives the second UPIU, it can quickly retrieve the physical region descriptor of the second UPIU from the high-speed memory, and then retrieve data from the host's first memory or write data to the host's first memory according to the physical region descriptor of the second UPIU. In this way, the corresponding physical region descriptor is prefetched before the host receives the second UPIU, which can improve the processing speed of the second UPIU and thus improve data read and write performance.

[0127] The physical region descriptor of the UPIU indicated by the first type (i.e., the second UPIU) has a higher priority in the host's high-speed memory than the physical region descriptor of the UPIU indicated by the second type (i.e., the second UPIU). This improves the high-speed memory hit rate, thereby achieving better data transfer performance. The high-speed memory hit rate measures whether a prefetched physical region descriptor in the high-speed memory is the physical region descriptor of a subsequently received UPIU. In other words, it measures whether the physical region descriptor of the received RTT UPIU or DataIn UPIU exists in the high-speed memory.

[0128] When the hint type information is type three, the host can delete at least one of the physical region descriptors of the UPIU indicated by type one or type two from the host's high-speed memory. By deleting at least one of the physical region descriptors of the UPIU indicated by type one or type two from the host's high-speed memory, i.e., deleting the prefetched physical region descriptors from the host's high-speed memory, the high-speed memory resources are freed up. This allows the host to prefetch new physical region descriptors based on new hint information sent by the storage device. This reduces the problem of new hint information generated by the storage device failing to be sent normally due to the exhaustion of high-speed memory resources. This is because exceeding the maximum hint outstanding will cause host performance degradation, preventing it from processing read or write commands in an optimal manner.

[0129] In this embodiment, a first UPIU is generated by a storage device. This first UPIU includes prompt type information. The prompt type information includes a first type, a second type, or a third type. The first type indicates that a second UPIU is ready. The second type indicates that a second UPIU is not ready. The third type indicates that at least one of the physical region descriptors of the UPIU indicated by the first type or the UPIU indicated by the second type should be deleted from the host's high-speed memory. The storage device sends the first UPIU to the host, and the host adjusts the physical region descriptors in its high-speed memory according to the prompt type information. By instructing the host to adjust the physical region descriptors in its high-speed memory through the prompt type information, the adjusted physical region descriptors have a higher probability of being hit by subsequently received second UPIUs, thereby improving the hit rate of the host's high-speed memory, achieving better UFS data throughput, and improving data read / write performance.

[0130] Figure 9 This is a schematic diagram of a data processing method provided in an embodiment of this application. The data processing method in this embodiment involves the UFS host and the UFS device described in the above embodiments. Figure 9As shown, the method may include: (1) The UFS host performs command scheduling. That is, when the UFS host obtains a read / write command from the upper-layer application, it triggers command scheduling and converts the command into a command UPIU (Command UPIU) through encapsulation. Then, (2) The UFS host sends the command UPIU (Command UPIU) to the UFS device. (3) The UFS device executes the command and prepares the data or space for the UPIU. Specifically, if the command UPIU (Command UPIU) is used to request writing data, the UFS device prepares the space for the UPIU in order to receive the UPIU sent by the UFS host for writing data. If the command UPIU (Command UPIU) is used to request reading data, the UFS device prepares the data for the UPIU in order to send the data-in UPIU (DataIn UPIU) to the UFS host. The UFS device's preparation of UPIU data may include data transfer. That is, the UFS device retrieves data from the NAND flash memory so that it can be converted into DataIn UPIU through encapsulation and sent to the UFS host. (4) The UFS device generates differentiated prompt information based on the data or space preparation status of the UPIU. This prompt information is sent to the UFS host along with the UPIU (i.e., DataIn UPIU or RTT UPIU). For example, if the UFS device has prepared the data or space of the current UPIU (e.g., the first UPIU mentioned above) and has prepared the data or space of a candidate UPIU to be sent (e.g., the second UPIU mentioned above), then the prompt information generated includes the prompt type information of the first type. For example, if the UFS device has prepared the data or space for the current UPIU (e.g., the first UPIU mentioned above) and predicts that the data or space for a candidate UPIU to be sent (e.g., the second UPIU mentioned above) will be prepared soon, then the prompt information included in the generated prompt message will be of the second type. (5) The UFS host parses the prompt message according to the received UPIU (i.e., DataIn UPIU or RTT UPIU) and adjusts the physical region descriptor in the high-speed memory according to the prompt message. (6) The UFS host performs data transfer according to the received UPIU (i.e., DataIn UPIU or RTT UPIU). For example, the UFS host transfers the data to the first memory according to the received DataIn UPIU.For example, the UFS host retrieves the data from the first memory based on the received RTT UPIU, and then encapsulates the data into write data UPIU (DataOut UPIU) and sends it to the UFS device. (7) After the UFS device completes the command, it receives all write data UPIUs (DataOut UPIU) corresponding to the command UPIU, or sends all read data (DataIn UPIU) corresponding to the command UPIU, and replies with a response UPIU (Response UPIU) to the UFS host.

[0131] In this embodiment, command scheduling is performed by the UFS host, and the UFS device executes the commands to prepare data or space for the UPIU. Based on the data or space preparation status of the UPIU, the UFS device generates differentiated prompt information, including prompt type information. This prompt information is sent to the UFS host along with the UPIU (i.e., DataIn UPIU or RTT UPIU). The UFS host parses the prompt information based on the received UPIU (i.e., DataIn UPIU or RTT UPIU) and adjusts the physical region descriptors in the high-speed memory according to the prompt type information. By adjusting the physical region descriptors in the host's high-speed memory based on the prompt type information, the adjusted physical region descriptors have a higher probability of being hit by subsequently received UPIUs, thereby improving the hit rate of the host's high-speed memory and achieving a better UFS data throughput, which is beneficial for improving data read and write performance.

[0132] Figure 10 This is a flowchart illustrating a data processing method provided in an embodiment of this application. The data processing method in this embodiment can be executed by a storage device. For example, the storage device can be the UFS device described in the above embodiment, such as... Figure 10 As shown, the method may include:

[0133] S1001. Obtain the amount of data for the currently incomplete prompts and the status information of the second UPIU.

[0134] The amount of data for the currently outstanding hint can also be referred to as the first data amount. The currently outstanding hint data amount refers to the amount of data for which a hint message has been sent, but the UPIU indicated by that message has not yet been sent. In some scenarios, the currently outstanding hint data amount is 0KB. For example, if no UPIU carrying the hint message has been sent before sending the first UPIU, the currently outstanding hint data amount is 0KB. Another example is if all UPIUs corresponding to previously sent hint messages have been sent before sending the first UPIU, the currently outstanding hint data amount is 0KB. In other scenarios, the currently outstanding hint data amount is greater than 0KB. For example, the currently outstanding hint data amount may include the data amount of a fourth UPIU indicated by at least one third UPIU of its first or second type, i.e., the data amount of at least one fourth UPIU. At least one fourth UPIU may include one or more fourth UPIUs. In this context, a fourth UPIU refers to a UPIU that is ready or not ready, indicated by a first or second type of a third UPIU. Multiple fourth UPIUs refer to multiple third UPIUs that are ready or not ready, indicated by their respective first or second types. In this embodiment, a not-ready UPIU refers to a UPIU that is not yet ready but is predicted to become ready soon (e.g., after a period of time).

[0135] One or more third UPIUs are sent before the first UPIU, meaning the UFS device has already sent them to the UFS host. One or more fourth UPIUs are unsent UPIUs, meaning the UFS device has indicated to the UFS host via hints from one or more third UPIUs that it will send them, but has not yet done so.

[0136] One or more fourth UPIUs can also be referred to as UPIUs indicated by a hint outstanding.

[0137] Taking the example of an incomplete hint data volume including the data volume of a fourth UPIU indicated by a first or second type of a third UPIU, the following explanation clarifies the incomplete hint data volume. The incomplete hint data volume refers to the data volume indicated by the hint information of the third UPIU, specifically equal to the hint data transfer count of the third UPIU. The hint information of the third UPIU is used to indicate the fourth UPIU. If the incomplete hint data volume includes the data volume of a fourth UPIU indicated by multiple first or second types of third UPIUs, the incomplete hint data volume refers to the sum of the data volumes indicated by the respective hint information of each of the multiple third UPIUs, specifically equal to the sum of the hint data transfer counts of the multiple third UPIUs.

[0138] The status information of the second UPIU is used to indicate whether the second UPIU is ready or not.

[0139] S1002. Based on the amount of data in the currently unfinished prompts and the status information of the second UPIU, determine the prompt type information of the first UPIU.

[0140] This prompt type information can include type 1, type 2, or type 3, and a detailed explanation can be found here. Figure 7 S701 of the illustrated embodiment will not be described again here.

[0141] In this embodiment, by acquiring the data volume corresponding to the currently incomplete prompt and the status information of the second UPIU, the prompt type information of the first UPIU is determined based on the data volume of the currently incomplete prompt and the status information of the second UPIU. This prompt type information includes a first type, a second type, or a third type. The first type indicates that the second UPIU is ready. The second type indicates that the second UPIU is not ready. The third type indicates that at least one of the physical region descriptors of the UPIU indicated by the first type or the physical region descriptors of the UPIU indicated by the second type is deleted from the host's high-speed memory. By instructing the host to adjust the physical region descriptors in the host's high-speed memory through the prompt type information, the adjusted physical region descriptors are more likely to be hit by subsequently received second UPIUs, thereby improving the hit rate of the host's high-speed memory, achieving a better UFS data throughput, and improving data read / write performance.

[0142] Figure 11This is a flowchart illustrating a data processing method provided in an embodiment of this application. The data processing method in this embodiment can be executed by a storage device. For example, the storage device can be the UFS device described in the above embodiment, such as... Figure 11 As shown, the method may include:

[0143] S1101. Obtain the amount of data for the currently incomplete prompts and the status information of the second UPIU.

[0144] For a detailed explanation of S1101, please refer to [link / reference needed]. Figure 10 The explanation of S1001 in the illustrated embodiment will not be repeated here.

[0145] The trigger condition for executing S1101 can be that the first UPIU needs to be scheduled. That is, the first UPIU needs to be scheduled. By executing S1101 to S1107, the hint information of the first UPIU is determined, including but not limited to the hint type information.

[0146] S1102. Determine whether the amount of data for the currently unfinished prompts is less than the first threshold. If the amount of data for the currently unfinished prompts is less than the first threshold, execute S1103. If the amount of data for the currently unfinished prompts is equal to the first threshold, execute S1106.

[0147] The first threshold can be set reasonably according to requirements. The unit of the first threshold can be 4KB. Typically, this first threshold is related to the resource size of the high-speed storage of the UFS host. This first threshold can be preset or configured by the UFS host to the UFS device after power-on but before the command is issued. For example, taking the UFS host dynamically configuring the UFS device, the UFS host can configure a parameter (w) to the UFS device, which limits the amount of data for the UFS device's hints outstanding. The maximum amount of data for hints outstanding is represented by MAX hint outstanding. MAX hint outstanding = 32 x 2^w, in 4KB units. The first threshold can be 32 x 2^w, and it is understandable that it can also be any value less than 32 x 2^w. This embodiment uses a first threshold of 32 x 2^w as an example. When the amount of currently unfinished hint data is less than the first threshold, it indicates that the UFS device's unfinished hints (hint outstanding) have not been exhausted. In this case, steps S1103 to S1105 can be used to carry hint type information as either type one or type two in the first UPIU. When the amount of currently unfinished hint data is equal to the first threshold, it indicates that the UFS device's unfinished hints (hint outstanding) have been exhausted. In this case, step S1106 can be used to carry hint type information as type three in the first UPIU.

[0148] S1103. Determine whether the status information of the second UPIU indicates that the second UPIU is ready. If the status information of the second UPIU indicates that the second UPIU is ready, execute S1104. If the status information of the second UPIU indicates that the second UPIU is not ready, execute S1105.

[0149] S1104. Determine that the prompt type information carried by the first UPIU is of the first type.

[0150] In the following scenario, the UFS device can determine that the prompt type information carried by the first UPIU is of type 1.

[0151] Scene 1

[0152] When a UFS device needs to send the first UPIU, if it has already prepared the data or space for the second UPIU to be sent, it will fill the relevant information of the data or space for the second UPIU to be sent into the hint field of the first UPIU. This includes, but is not limited to, the hint type information being the first type, the hint control information, the identifier information of the hint UPIU, and the hint data buffer offset of the hint UPIU.

[0153] After executing S1104, you can execute S1108.

[0154] S1105. Determine that the prompt type information carried by the first UPIU is of the second type.

[0155] In the second scenario below, the UFS device can determine that the prompt type information carried by the first UPIU is of the second type.

[0156] Scene 2

[0157] When a UFS device needs to send a first UPIU, if it has not yet prepared the data or space for a subsequent second UPIU, it predicts that the data or space for the second UPIU will soon be ready. The device then fills the hint field of the first UPIU with the predicted data or space information for the second UPIU. This includes, but is not limited to, hint type information (e.g., second type), hint control information, the identifier of the hint UPIU, and the hint data buffer offset. For example, the UFS device can predict the data or space for the subsequent second UPIU by utilizing time and / or space limitations.

[0158] After executing S1105, you can execute S1108.

[0159] S1106. Determine whether the status information of the second UPIU indicates that the second UPIU is ready. If the status information of the second UPIU indicates that the second UPIU is ready, execute S1107. If the status information of the second UPIU indicates that the second UPIU is not ready, repeat S1106.

[0160] When the UFS device has exhausted its outstanding hints, and the UFS device has prepared the data or space for the second UPIU to be sent when it needs to send the first UPIU, then the third type is filled into the hint type field of the first UPIU's hint field. This avoids the problem of subsequent hint messages being unable to be sent due to limited outstanding hints. When the UFS device has exhausted its outstanding hints, and the UFS device has not prepared the data or space for the second UPIU to be sent when it needs to send the first UPIU, it can return to execution S1106.

[0161] S1107. Determine that the prompt type information carried by the first UPIU is of the third type.

[0162] In the following scenario three, the UFS device can determine that the prompt type information carried by the first UPIU is of type three.

[0163] Scene 3

[0164] When the UFS device has exhausted its hint outstanding space, and the UFS device has prepared the data or space for the subsequent second UPIU to be sent when it needs to send the first UPIU, the third type will be filled into the hint type field of the first UPIU's hint field.

[0165] After executing S1107, you can execute S1108.

[0166] S1108, UFS device sends the first UPIU.

[0167] In this embodiment, when the UFS device needs to send the first UPIU, it generates differentiated hint type information based on whether the data or space for the subsequent second UPIU to be sent is ready, and whether the UFS device's incomplete hints / outstandings are exhausted, and fills the hint field of the first UPIU with this information. The UFS device can provide differentiated hint type information for different scenarios, thereby adapting to the data transmission needs of different scenarios. The UFS host can adjust the physical region descriptors in the high-speed memory based on this hint type information to improve the hit rate of the high-speed memory, thereby achieving a better UFS data throughput and improving data read and write performance.

[0168] Figure 12 The flowchart illustrates a data processing method provided in this application embodiment. This data processing method can be executed by a host; for example, the host can be the UFS host described in the above embodiment, such as... Figure 12 As shown, the method may include:

[0169] S1201. Receive the first UPIU and parse the first UPIU to obtain the hint information of the first UPIU, which includes hint type information.

[0170] For example, the UFS host can resolve the first UPIU and obtain the hint type information from the hinttype field segment of the first UPIU. The UFS host can also obtain other hint information from other fields of the hint field of the first UPIU, such as hint control information, the identifier information of the hint UPIU, and the hint data buffer offset of the hint UPIU.

[0171] After executing S1201, execute S1202, S1203, or S1204.

[0172] S1202. If the prompt type information is of the first type, the physical region descriptor corresponding to the prompt type information of the first UPIU is prefetched and saved to the host's high-speed memory with the first priority.

[0173] The physical region descriptor corresponding to the prompt type information of the first UPIU refers to the physical region descriptor of the UPIU (i.e., the second UPIU) indicated by the prompt type information of the first UPIU. If the physical region descriptor of the UPIU (i.e., the second UPIU) indicated by the prompt type information of the first UPIU is not in the host's high-speed memory, the physical region descriptor is prefetched and saved to the high-speed memory with high priority. If the physical region descriptor of the UPIU (i.e., the second UPIU) indicated by the prompt type information of the first UPIU is already in the host's high-speed memory, appropriate strategies (e.g., increasing the activity of the physical region descriptor) can be adopted to prevent it from being replaced before the second UPIU is received.

[0174] S1203. If the prompt type information is of the second type, the physical region descriptor corresponding to the prompt type information of the first UPIU is prefetched and saved to the host's high-speed memory with the second priority.

[0175] The second priority is lower than the first priority.

[0176] Through S1202 or S1203, the high-speed memory of the UFS host stores the physical region descriptor of the UPIU (i.e., the second UPIU) indicated by the prompt type information of the first UPIU. Then, if the UFS host receives the second UPIU, it can quickly retrieve the physical region descriptor of the second UPIU from the high-speed memory, and then retrieve data from or write data to the host's first memory based on the physical region descriptor of the second UPIU. This improves data read and write performance.

[0177] The physical region descriptor stored in the high-speed memory of the UFS host corresponds to the hint information of the first UPIU. This hint information includes, but is not limited to, one or more of the UPIU's identification information or its hint data buffer offset. Subsequently, when the UFS host receives a second UPIU, it can use one or more of the second UPIU's identification information or its data buffer offset as an index to quickly retrieve the physical region descriptor of that second UPIU from the high-speed memory.

[0178] S1204. If the prompt type information is type 3, delete at least one of the physical region descriptors of the UPIU indicated by type 1 or type 2 in the host's high-speed memory.

[0179] According to the third type of instruction, the UFS host deletes at least one of the physical region descriptors of the UPIU indicated by the first type or the physical region descriptor of the UPIU indicated by the second type from the host's high-speed memory to release the imp outstanding of the UFS device, so that the released imp outstanding can be used to send the hint information of other ready UPIUs.

[0180] In this embodiment, the UFS host can adjust the physical region descriptors in the high-speed memory based on the prompt type information to improve the hit rate of the high-speed memory, thereby achieving a better UFS data throughput and improving data read and write performance.

[0181] Based on the aforementioned similar technical concepts, this application provides a data processing apparatus. This data processing apparatus can be a storage device in any possible design of the methods described in the foregoing embodiments, such as a UFS device. The data processing apparatus includes at least one corresponding unit in the data processing method provided above, for executing the method steps, operations, or behaviors performed by the storage device. The configuration of this at least one unit can have a one-to-one correspondence with the method steps, operations, or behaviors performed by the storage device. These units can be implemented by computer programs, by hardware circuits, or by a combination of computer programs and hardware circuits.

[0182] According to the aforementioned method, Figure 13 A schematic diagram of a data processing apparatus 1300 provided in an embodiment of this application.

[0183] The data processing device 1300 can be a chip or circuit, such as a chip or circuit that can be installed in an electronic device.

[0184] The data processing apparatus 1300 may include a UPIU generation unit 1310 and a transceiver unit 1330.

[0185] The UPIU generation unit 1310 is used to generate a first Universal Flash Storage UFS Protocol Information Unit (UPIU). The first UPIU includes prompt type information and description information. The prompt type information includes a first type, a second type, or a third type. The first type indicates that a second UPIU is ready, the second type indicates that a second UPIU is not ready, and the third type indicates that at least one of the physical region descriptors of the UPIU indicated by the first type or the UPIU indicated by the second type should be deleted from the host's high-speed memory. The physical region descriptor indicates the location of the host's first memory corresponding to the UPIU. The description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU. A plurality of UPIUs for responding to commands include the first UPIU and the second UPIU. The command is used to request to write or read data. The data cache offset of the first UPIU indicates the position of the first UPIU among the plurality of UPIUs for responding to commands. The transceiver unit 1330 is used to transmit the first UPIU.

[0186] In some embodiments, the UPIU generation unit 1310 is configured to: acquire a first data volume and status information of the second UPIU, the first data volume including data volume of a fourth UPIU indicated by a first type or a second type of each of at least one third UPIU; the at least one third UPIU was sent before the first UPIU was sent, and the at least one fourth UPIU is an unsent UPIU; and determine the prompt type information of the first UPIU based on the first data volume and the status information of the second UPIU.

[0187] In some embodiments, the UPIU generation unit 1310 is configured to: determine whether the first data volume is less than a first threshold; when the first data volume is less than the first threshold, determine the prompt type information of the first UPIU based on the status information of the second UPIU, wherein the prompt type information includes a first type or a second type.

[0188] In some embodiments, the UPIU generation unit 1310 is configured to: determine whether the status information of the second UPIU indicates that the second UPIU is ready; when the status information of the second UPIU indicates that the second UPIU is ready, determine that the prompt type information is a first type; when the status information of the second UPIU indicates that the second UPIU is not ready, determine that the prompt type information is a second type.

[0189] In some embodiments, the UPIU generation unit 1310 is further configured to: determine the prompt type information as a third type when the first data volume is equal to the first threshold.

[0190] In some embodiments, the UPIU generation unit 1310 is configured to: determine the prompt type information as a third type when the status information of the second UPIU indicates that the second UPIU is ready.

[0191] In some embodiments, the first UPIU includes: a Transmission Ready RTT UPIU or a Read In Data UPIU.

[0192] In some embodiments, the prompt type information is located in a reserved field of the prompt information for the Transmission Ready RTT UPIU or Read Data UPIU.

[0193] In some embodiments, the UPIU generation unit 1310 is further configured to: receive a command UPIU; and generate the first UPIU in response to the command UPIU.

[0194] The units in the above embodiments can also be referred to as modules, circuits, or components.

[0195] For the concepts, explanations, detailed descriptions, and other steps related to the technical solutions provided in the embodiments of this application involved in the data processing apparatus 1300, please refer to the descriptions of these contents in the foregoing methods or other embodiments, which will not be repeated here.

[0196] Based on the aforementioned similar technical concepts, this application provides a data processing apparatus. This data processing apparatus can be a host in any possible design scheme of the methods described in the foregoing embodiments, such as a UFS host. The data processing apparatus includes at least one corresponding unit for executing the method steps, operations, or behaviors performed by the host in the data processing method provided above. The configuration of this at least one unit can have a one-to-one correspondence with the method steps, operations, or behaviors performed by the host. These units can be implemented by computer programs, by hardware circuits, or by a combination of computer programs and hardware circuits.

[0197] According to the aforementioned method, Figure 14 A schematic diagram of a data processing apparatus 1400 provided in an embodiment of this application.

[0198] The data processing device 1400 can be a chip or circuit, such as a chip or circuit that can be installed in an electronic device.

[0199] The data processing apparatus 1400 may include a UPIU processing unit 1410 and a transceiver unit 1430.

[0200] UPIU processing unit 1410 is configured to receive a first Universal Flash Memory UFS Protocol Information Unit (UPIU) via transceiver unit 1430. The first UPIU includes prompt type information and description information. The prompt type information includes a first type, a second type, or a third type. The first type indicates that a second UPIU is ready; the second type indicates that a second UPIU is not ready; and the third type indicates that at least one of the physical region descriptors of the UPIU indicated by the first type or the UPIU indicated by the second type should be deleted from the host's high-speed memory. The physical region descriptor is used to indicate the location of the host's first memory corresponding to the UPIU; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; the multiple UPIUs used to respond to the command include the first UPIU and the second UPIU, the command is used to request to write data or read data, and the data cache offset of the first UPIU is used to indicate the position of the first UPIU among the multiple UPIUs used to respond to the command; the UPIU processing unit 1410 is also used to adjust the physical region descriptor in the host's high-speed memory according to the prompt type information.

[0201] In one possible design, the UPIU processing unit 1410 is configured to: when the prompt type information is of a first type, prefetch the physical region descriptor corresponding to the prompt type information of the first UPIU, and save it to the host's high-speed memory with a first priority; when the prompt type information is of a second type, prefetch the physical region descriptor corresponding to the prompt type information of the first UPIU, and save it to the host's high-speed memory with a second priority; the second priority is lower than the first priority; when the prompt type information is of a third type, delete at least one of the physical region descriptors of the UPIU indicated by the first type or the physical region descriptors of the UPIU indicated by the second type from the host's high-speed memory.

[0202] In one possible design, the UPIU processing unit 1410 is further configured to receive at least one third UPIU via the transceiver unit 1430 before receiving the first UPIU. The first or second type included in each of the at least one third UPIU is used to indicate whether the corresponding fourth UPIU is ready or not. The physical region descriptor in the host's high-speed memory includes the physical region descriptor of the corresponding fourth UPIU of each of the at least one third UPIU.

[0203] In one possible design, the first UPIU includes either a Transmission Ready (RTT) UPIU or a Read In Data UPIU.

[0204] In one possible design, the prompt type information is located in a reserved field of the prompt information for the Transmission Ready RTT UPIU or Read Data UPIU.

[0205] For the concepts, explanations, detailed descriptions, and other steps related to the technical solutions provided in the embodiments of this application involving the data processing apparatus 1400, please refer to the descriptions of these contents in the foregoing methods or other embodiments, which will not be repeated here.

[0206] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0207] Figure 15 This is a schematic diagram of a possible composition of the electronic device 1500 provided in the embodiments of this application, such as... Figure 15As shown, the electronic device 1500 may include a host 1501 and a storage device 1502.

[0208] The storage device 1502 can be used to support the electronic device 1500 in performing the steps performed by the storage device in the above method embodiments, such as S701 and S702, S1001 and S1002, or S1101 to S1108, and / or other processes used in the technology described herein.

[0209] The host 1501 can be used to support the steps performed by the host in the above method embodiments of the electronic device 1500, such as performing S703, S1201 to S1204, and / or other processes used in the technology described herein.

[0210] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0211] The electronic device provided in this embodiment is used to execute the above-described data processing method, and therefore can achieve the same effect as the above-described implementation method.

[0212] It is understood that the electronic device 1500 may include more or fewer components than those shown in the figures, or combine some components, or separate some components, or have different component arrangements. The components shown in the figures may be implemented in hardware, software, or a combination of software and hardware. For example, the electronic device 1500 may also include radio frequency circuits, Bluetooth chips, Wi-Fi chips, etc., which are not illustrated in detail in the embodiments of this application.

[0213] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on the storage device, the storage device performs the aforementioned method steps to implement the data processing method described in the above embodiment.

[0214] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on a host computer, the host computer performs the aforementioned method steps to implement the data processing method described in the above embodiment.

[0215] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the data processing method described in the above embodiment.

[0216] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the data processing methods in the above-described method embodiments.

[0217] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.

[0218] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0219] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0220] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0221] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0222] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0223] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A data processing method, characterized in that, The method includes: A first Universal Flash Storage (UFS) Protocol Information Unit (UPIU) is generated. The first UPIU includes prompt type information and description information. The prompt type information includes a first type, a second type, or a third type. The first type indicates that a second UPIU is ready; the second type indicates that a second UPIU is not ready; and the third type indicates the deletion of at least one of the physical region descriptors of the UPIU indicated by the first type or the UPIU indicated by the second type from the host's high-speed memory. The physical region descriptor indicates the location of the host's first memory corresponding to the UPIU. The description information of the first UPIU includes identification information and a data cache offset. The data cache offset indicates the position of the first UPIU among a plurality of UPIUs used to respond to commands, which request to write or read data. Send the first UPIU.

2. The method according to claim 1, characterized in that, The generation of the first Universal Flash Storage UFS Protocol Information Unit (UPIU) includes: Obtain the first data volume and the status information of the second UPIU. The first data volume is the data volume of the UPIU that has sent the prompt message but has not sent the prompt message. Based on the first data volume and the status information of the second UPIU, the prompt type information of the first UPIU is determined.

3. The method according to claim 2, characterized in that, The step of determining the prompt type information of the first UPIU based on the first data volume and the status information of the second UPIU includes: Determine whether the first data volume is less than the first threshold; When the first data volume is less than the first threshold, the prompt type information of the first UPIU is determined according to the status information of the second UPIU, and the prompt type information includes a first type or a second type.

4. The method according to claim 3, characterized in that, The step of determining the prompt type information of the first UPIU based on the status information of the second UPIU, wherein the prompt type information includes a first type or a second type, including: Determine whether the status information of the second UPIU indicates that the second UPIU is ready; When the status information of the second UPIU indicates that the second UPIU is ready, the prompt type information is determined to be the first type; When the status information of the second UPIU indicates that the second UPIU is not ready, the prompt type information is determined to be the second type.

5. The method according to claim 3 or 4, characterized in that, The method further includes: When the first data volume equals the first threshold, the prompt type information is determined to be the third type.

6. The method according to claim 5, characterized in that, Determining that the prompt type information is the third type includes: When the status information of the second UPIU indicates that the second UPIU is ready, the prompt type information is determined to be the third type.

7. The method according to any one of claims 1 to 6, characterized in that, The first UPIU includes: a Transmission Ready (RTT) UPIU or a Read In Data UPIU.

8. The method according to claim 7, characterized in that, The prompt type information is located in the reserved field of the prompt information of the RTT UPIU or the read data UPIU.

9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: Receive command UPIU; In response to the command UPIU, the first UPIU is generated.

10. A data processing method, characterized in that, The method includes: The system receives a first Universal Flash Storage Protocol Information Unit (UPIU), which includes prompt type information and description information. The prompt type information includes a first type, a second type, or a third type. The first type indicates that a second UPIU is ready, the second type indicates that a second UPIU is not ready, and the third type indicates that at least one of the physical region descriptors of the UPIU indicated by the first type or the UPIU indicated by the second type in the host's high-speed memory is deleted. The physical region descriptor indicates the location of the host's first memory corresponding to the UPIU. The description information of the first UPIU includes identification information and a data cache offset. The data cache offset of the first UPIU indicates the position of the first UPIU among a plurality of UPIUs used to respond to a command, which requests to write or read data. Adjust the physical region descriptor in the host's high-speed memory according to the prompt type information.

11. The method according to claim 10, characterized in that, The step of adjusting the physical region descriptor in the host's high-speed memory according to the prompt type information includes: When the prompt type information is the first type, the physical region descriptor corresponding to the prompt type information of the first UPIU is prefetched and saved to the host's high-speed memory with the first priority; When the prompt type information is the second type, the physical region descriptor corresponding to the prompt type information of the first UPIU is prefetched and saved to the host's high-speed memory with a second priority; the second priority is lower than the first priority. When the prompt type information is of type three, delete at least one of the physical region descriptors of the UPIU indicated by type one or the physical region descriptors of the UPIU indicated by type two from the host's high-speed memory.

12. The method according to claim 10 or 11, characterized in that, The first UPIU includes: a Transmission Ready (RTT) UPIU or a Read In Data UPIU.

13. The method according to claim 12, characterized in that, The prompt type information is located in the reserved field of the prompt information for the Transmission Ready RTT UPIU or Read Data UPIU.

14. A data processing apparatus, characterized in that, The device includes: a controller and a transmission interface; The controller is configured to generate a first Universal Flash Storage Protocol Information Unit (UPIU), the first UPIU including prompt type information and description information of the first UPIU. The prompt type information includes a first type, a second type, or a third type. The first type is used to indicate that a second UPIU is ready, the second type is used to indicate that a second UPIU is not ready, and the third type is used to indicate the deletion of at least one of the physical region descriptors of the UPIU indicated by the first type or the UPIU indicated by the second type from the host's high-speed memory. The physical region descriptor is used to indicate the location of the host's first memory corresponding to the UPIU. The description information of the first UPIU includes identification information of the first UPIU and a data cache offset of the first UPIU. The data cache offset of the first UPIU is used to indicate the position of the first UPIU among a plurality of UPIUs used to respond to commands, the commands being used to request writing or reading data. The controller is also configured to send the first UPIU through the transmission interface.

15. The apparatus according to claim 14, characterized in that, The controller is configured to: acquire a first data volume and the status information of the second UPIU, wherein the first data volume is the data volume of the UPIU that has sent a prompt message but has not yet sent the prompt message; and determine the prompt type information of the first UPIU based on the first data volume and the status information of the second UPIU.

16. The apparatus according to claim 15, characterized in that, The controller is used for: Determine whether the first data volume is less than the first threshold; When the first data volume is less than the first threshold, the prompt type information of the first UPIU is determined according to the status information of the second UPIU, and the prompt type information includes a first type or a second type.

17. The apparatus according to claim 16, characterized in that, The controller is used for: Determine whether the status information of the second UPIU indicates that the second UPIU is ready; When the status information of the second UPIU indicates that the second UPIU is ready, the prompt type information is determined to be the first type; When the status information of the second UPIU indicates that the second UPIU is not ready, the prompt type information is determined to be the second type.

18. The apparatus according to claim 16 or 17, characterized in that, The controller is further configured to: determine the prompt type information as the third type when the first data volume is equal to the first threshold.

19. The apparatus according to claim 18, characterized in that, The controller is configured to: determine the prompt type information as the third type when the status information of the second UPIU indicates that the second UPIU is ready.

20. The apparatus according to any one of claims 14 to 19, characterized in that, The first UPIU includes: a Transmission Ready (RTT) UPIU or a Read In Data UPIU.

21. The apparatus according to claim 20, characterized in that, The prompt type information is located in the reserved field of the prompt information for the Transmission Ready RTT UPIU or Read Data UPIU.

22. The apparatus according to any one of claims 14 to 21, characterized in that, The controller is also used for: Receive command UPIU through the transmission interface; In response to the command UPIU, the first UPIU is generated.

23. A data processing apparatus, characterized in that, The device includes: a transmission interface, a controller, a high-speed memory, and a first memory; The controller is configured to receive a first Universal Flash Storage Protocol Information Unit (UPIU) via the transmission interface. The first UPIU includes prompt type information and description information of the first UPIU. The prompt type information includes a first type, a second type, or a third type. The first type is used to indicate that a second UPIU is ready, the second type is used to indicate that a second UPIU is not ready, and the third type is used to indicate the deletion of at least one of the physical region descriptors of the UPIU indicated by the first type or the UPIU indicated by the second type in the high-speed memory. The physical region descriptor is used to indicate the location of the first memory corresponding to the UPIU. The description information of the first UPIU includes identification information of the first UPIU and data cache offset of the first UPIU. The data cache offset of the first UPIU is used to indicate the position of the first UPIU among a plurality of UPIUs used to respond to commands, the commands being used to request writing or reading data. The controller is also configured to adjust the physical region descriptors in the high-speed memory based on the prompt type information.

24. The apparatus according to claim 23, characterized in that, The controller is used for: When the prompt type information is the first type, the physical region descriptor corresponding to the prompt type information of the first UPIU is prefetched and saved to the high-speed memory with the first priority; When the prompt type information is the second type, the physical region descriptor corresponding to the prompt type information of the first UPIU is prefetched and saved to the high-speed memory with a second priority; the second priority is lower than the first priority. When the prompt type information is the third type, delete at least one of the physical region descriptors of the UPIU indicated by the first type or the physical region descriptors of the UPIU indicated by the second type in the high-speed memory.

25. The apparatus according to claim 23 or 24, characterized in that, The first UPIU includes: a Transmission Ready (RTT) UPIU or a Read In Data UPIU.

26. The apparatus according to claim 25, characterized in that, The prompt type information is located in the reserved field of the prompt information for the Transmission Ready RTT UPIU or Read Data UPIU.

27. An electronic device, characterized in that, include: The host computer and the storage device coupled to the host computer; The host is used to perform the method as described in any one of claims 10-13; The storage device is used to perform the method as described in any one of claims 1-9.

28. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-9 or 10-13.

29. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-9 or 10-13.

Citation Information

Patent Citations

  • Convolution code decoder and convolution code decoding method

    CN102932014A

  • Semiconductor apparatus and UFS system

    JP2019185544A