Storage device and method of processing data

The storage device improves data processing efficiency by using a single instruction to process multiple storage units, addressing resource wastage in existing methods.

CN119252304AActive Publication Date: 2025-01-03HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411165656.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2021-04-07
Filing Date
2021-04-30
Publication Date
2025-01-03
Estimated Expiration
2041-04-30

AI Technical Summary

Technical Problem

Existing data processing methods in computer storage devices require multiple instructions for each storage unit, leading to resource wastage and inefficiency.

Method used

A storage device with a controller and an instruction decoder that sends a single processing instruction to process data across multiple storage units, determining target units based on data length and processing method, reducing the number of instructions needed.

Benefits of technology

Reduces resource consumption and enhances data processing efficiency by allowing continuous processing across multiple storage units with a single instruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119252304A_ABST
    Figure CN119252304A_ABST
Patent Text Reader

Abstract

The invention discloses a storage device and a data processing method, and belongs to the technical field of computers. The storage device comprises a controller and a storage medium, the storage medium comprises an instruction decoder and a plurality of storage units, and the controller is connected with the instruction decoder of the storage medium. The controller is used for sending a first processing instruction to an instruction decoder of the storage medium, the first processing instruction comprises first information and second information, the first information is used for indicating a processing mode, and the second information is used for indicating the data length of data needing to be processed. Accordingly, an instruction decoder of the storage medium is used for receiving a first processing instruction sent by the controller and determining at least two target storage units from the multiple storage units of the storage medium based on the data length indicated by the second information, so that the storage medium is processed based on the at least two target storage units. And performing data processing according to the processing mode indicated by the first information. According to the embodiment of the invention, the number of processing instructions needing to be sent by the controller is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202110485385.5, and the original application date is April 30, 2021. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a storage device and a method for processing data. Background Art

[0003] Computer equipment includes multiple components, and storage media is one of the multiple components. In the storage medium, data is stored in the form of multiple storage units, and the storage unit is the smallest operation unit for data processing.

[0004] In the related art, a controller in a computer device sends instructions to a storage medium, and each instruction is for a storage unit in the storage medium. Therefore, when data processing is required based on multiple storage units, the controller needs to send multiple processing instructions to the storage medium. This method requires the controller to consume more processing resources, resulting in a waste of resources, and the efficiency of processing data is not high. Summary of the invention

[0005] The embodiments of the present application provide a storage device and a method for processing data to solve the problems provided by the related technologies. The technical solutions are as follows:

[0006] In the first aspect, a storage device is provided, which includes a controller and a storage medium, the storage medium includes an instruction decoder and a plurality of storage units, and the controller is connected to the instruction decoder of the storage medium. The controller is used to send a first processing instruction to the instruction decoder of the storage medium, wherein the first processing instruction includes first information and second information, the first information is used to indicate a processing method, and the second information is used to indicate the data length of the data to be processed. Accordingly, the instruction decoder of the storage medium is used to receive the first processing instruction sent by the controller. Based on the data length indicated by the second information in the first processing instruction, at least two target storage units are determined from the plurality of storage units of the storage medium. Afterwards, based on the at least two target storage units, data processing is performed according to the processing method indicated by the first information in the first processing instruction.

[0007] It can be seen that the controller only needs to send one processing instruction to enable the instruction decoder of the storage medium to perform continuous data processing based on at least two storage units. Compared with the situation where each processing instruction can only instruct the instruction decoder to perform data processing based on one storage unit, the storage device provided in this embodiment can reduce the number of processing instructions that the controller needs to send. Therefore, not only the processing resources that the controller needs to consume during data processing are reduced, resource waste is avoided, but also the efficiency of data processing is improved.

[0008] In a possible implementation, a plurality of storage units of a storage medium are located in at least one storage row, and an instruction decoder of the storage medium is used to determine a starting address of data to be processed, and to determine at least two target storage units from the plurality of storage units of the storage medium based on second information, lengths of the plurality of storage units, lengths of at least one storage row, and the starting address of the data to be processed. An exemplary implementation of determining at least two target storage units is provided, so that the instruction decoder of the storage medium can implement data processing based on the determined at least two target storage units.

[0009] In a possible implementation, the first processing instruction also includes third information, and the third information is used to indicate an address. The instruction decoder of the storage medium is used to determine the address indicated by the third information as the starting address of the data to be processed, and the addresses of at least two target storage units are continuous. Wherein, in the case where the first processing instruction carries the third information, the instruction decoder of the storage medium directly uses the address indicated by the third information as the starting address of the data to be processed. Thus, in the subsequent process, the storage unit where the starting address of the data to be processed is located can be used as the first target storage unit, and the continuous storage units including the first target storage unit can be determined as at least two target storage units.

[0010] In a possible implementation, the instruction decoder of the storage medium is used to determine the starting address of the data to be processed based on multiple storage units of the storage medium, and the addresses of at least two target storage units are continuous or discontinuous. Correspondingly, the instruction decoder of the storage medium is also used to encapsulate the instruction identifier of the first processing instruction and the addresses of at least two target storage units, obtain a response message, and send the response message to the controller; the controller is also used to receive the response message. In this implementation, the instruction decoder of the storage medium randomly determines the starting address of the data to be processed in multiple storage units, and randomly determines at least two target storage units, then the at least two target storage units may be continuous or discontinuous. Since the at least two target storage units are randomly determined, the instruction decoder also needs to return the addresses of the at least two target storage units to the controller, so that the controller can determine which target storage units the instruction decoder is based on to implement data processing.

[0011] In a possible implementation, the processing method indicated by the first information includes a first processing method, and the first processing method includes a processing method of storing data in a storage unit. The controller is also used to send data. Accordingly, the instruction decoder of the storage medium is used to store the data sent by the controller in at least two target storage units according to the first processing method. The first processing method is, for example, writing or overwriting. The data processing process performed by the instruction decoder refers to the storage process of the data.

[0012] In a possible implementation, the processing method indicated by the first information includes a second processing method, the second processing method includes a method of processing data based on a storage unit that has stored data, and the instruction decoder of the storage medium is used to process the data stored in at least two target storage units according to the second processing method. The second processing method is, for example, reading or erasing. The data processing process performed by the instruction decoder refers to the processing process of the stored data.

[0013] In a possible implementation, the instruction decoder of the storage medium is further used to send the data stored in at least two target storage units to the controller according to the address sequence of the at least two target storage units. The controller is also used to receive the data stored in at least two target storage units sent by the instruction decoder of the storage medium. For example, when the processing mode is read, the instruction decoder of the storage medium needs to return the read data to the controller. The instruction decoder completes the data transmission through multiple transmission processes, and the length of the data sent in each transmission process depends on the bit width of the transmission interface.

[0014] In a possible implementation, the first processing instruction also includes fourth information, and the fourth information is used to indicate data grouping requirements, and the data grouping requirements include grouping at least two target storage units in storage row units, or grouping at least two target storage units in storage column units. The instruction decoder of the storage medium is used to group at least two target storage units according to the data grouping requirements indicated by the fourth information to obtain at least one group, and perform data processing according to the processing method indicated by the first information based on the target storage units in each group. In this implementation, according to the instruction of the fourth information, the instruction decoder of the storage medium can perform data processing in storage row units, that is, after completing the data processing of each target storage unit in a storage row, switch to other storage rows, and perform data processing on the target storage units in other storage rows. Alternatively, data processing can also be performed in storage column units, and after completing the data processing of each target storage unit in a storage column, switch to other storage columns. The fourth information makes the instruction decoder perform data processing more flexible.

[0015] In a possible implementation, the instruction decoder of the storage medium is used to enable the target storage units in any group in parallel, and perform data processing on the target storage units in any group that are enabled in parallel according to the processing method indicated by the first information, so that the difference between the processing times of the target storage units in any group that are enabled in parallel is less than a threshold value. The target storage units in the same group are enabled and data processed in parallel, which reduces the time required for enabling and data processing, thereby shortening the total time required for data processing.

[0016] In a possible implementation, at least two target storage units are located in the same logical unit number, and the target storage unit is the smallest unit for data processing. In this embodiment, one storage medium is one logical unit number, so at least two target storage units determined from multiple storage units of the storage medium are located in the same logical unit number.

[0017] In a possible implementation, the instruction decoder of the storage medium is further used to parse the first processing instruction to obtain the first information and the second information. The instruction decoder obtains the first information and the second information by parsing the first processing instruction.

[0018] In a possible implementation, the sum of the lengths of at least two target storage units is not less than the data length indicated by the second information. Since the target storage unit is the minimum unit for data processing, the sum of the lengths of at least two target storage units may be equal to the data length indicated by the second information, or may be greater than the data length indicated by the second information. For example, when the data length cannot divide the length of the storage unit, the sum of the lengths of at least two target storage units is greater than the data length indicated by the second information.

[0019] In a possible implementation, there are multiple storage media, and the controller is used to receive a storage medium identifier and send a first processing instruction to an instruction decoder of the storage medium indicated by the storage medium identifier. When there are multiple storage media, the controller determines, based on the storage medium identifier, to which instruction decoder of the storage medium the first processing instruction is to be sent. For example, if the storage medium identifier is a logical address sent by the processor, the controller uses the instruction decoder indicated by the physical address corresponding to the logical address as the instruction decoder for receiving the first processing instruction.

[0020] In a second aspect, a method for processing data is provided, the method being applied to a storage device, the storage device comprising a controller and a storage medium, the storage medium comprising an instruction decoder and a plurality of storage units, the method comprising:

[0021] The instruction decoder of the storage medium receives a first processing instruction sent by the controller, the first processing instruction includes first information and second information, the first information is used to indicate the processing method, and the second information is used to indicate the data length of the data to be processed;

[0022] The instruction decoder of the storage medium determines at least two target storage units from a plurality of storage units of the storage medium based on the data length indicated by the second information;

[0023] The instruction decoder of the storage medium performs data processing based on at least two target storage units in accordance with the processing method indicated by the first information.

[0024] In one possible implementation, multiple storage cells of a storage medium are located in at least one storage row, and an instruction decoder of the storage medium determines at least two target storage cells from the multiple storage cells of the storage medium based on the data length indicated by second information, including: the instruction decoder of the storage medium determines the starting address of the data to be processed; the instruction decoder of the storage medium determines at least two target storage cells from the multiple storage cells of the storage medium based on the second information, the length of the multiple storage cells, the length of at least one storage row, and the starting address of the data to be processed.

[0025] In one possible implementation, the first processing instruction also includes third information, and the third information is used to indicate an address, and the instruction decoder of the storage medium determines the starting address of the data to be processed, including: the instruction decoder of the storage medium determines the address indicated by the third information as the starting address of the data to be processed, and the addresses of at least two target storage units are continuous.

[0026] In a possible implementation, the instruction decoder of the storage medium determines the starting address of the data to be processed, including: determining the starting address of the data to be processed based on multiple storage units of the storage medium, and the addresses of at least two target storage units are continuous or discontinuous. After the instruction decoder of the storage medium processes the data according to the processing method indicated by the first information based on the at least two target storage units, the method also includes: the instruction decoder of the storage medium encapsulates the instruction identifier of the first processing instruction and the addresses of at least two target storage units, obtains a response message, and sends the response message to the controller.

[0027] In one possible implementation, the processing method indicated by the first information includes a first processing method, the first processing method includes a processing method of storing data in a storage unit, and the instruction decoder of the storage medium performs data processing based on at least two target storage units in accordance with the processing method indicated by the first information, including: the instruction decoder of the storage medium stores the data sent by the controller in at least two target storage units in accordance with the method indicated by the first information.

[0028] In one possible implementation, the processing method indicated by the first information includes a second processing method, the second processing method includes a method of processing data based on a storage unit that has stored data, and the instruction decoder of the storage medium processes data based on at least two target storage units according to the processing method indicated by the first information, including: the instruction decoder of the storage medium processes the data stored in at least two target storage units according to the second processing method.

[0029] In one possible implementation, after the instruction decoder of the storage medium processes data based on at least two target storage units in accordance with the processing method indicated by the first information, the method further includes: the instruction decoder of the storage medium sends the data stored in at least two target storage units to the controller in the address order of the at least two target storage units.

[0030] In a possible implementation, the first processing instruction also includes fourth information, and the fourth information is used to indicate a data grouping requirement, and the data grouping requirement includes grouping at least two target storage units in units of storage rows, or grouping at least two target storage units in units of storage columns. The instruction decoder of the storage medium performs data processing based on the at least two target storage units in accordance with the processing method indicated by the first information, including: the instruction decoder of the storage medium groups the at least two target storage units in accordance with the data grouping requirement indicated by the fourth information to obtain at least one group. The instruction decoder of the storage medium performs data processing based on the target storage units in each group in accordance with the processing method indicated by the first information.

[0031] In one possible implementation, the instruction decoder of the storage medium performs data processing based on the target storage units in each group in accordance with the processing method indicated by the first information, including: the instruction decoder of the storage medium enables the target storage units in any group in parallel for any group; the instruction decoder of the storage medium performs data processing on the target storage units enabled in parallel in any group in accordance with the processing method indicated by the first information, so that the difference between the processing times of the target storage units enabled in parallel in any group is less than a threshold.

[0032] In a possible implementation, at least two target storage units are located in the same logical unit number, and the target storage unit is a minimum unit for data processing.

[0033] In one possible implementation, before the instruction decoder of the storage medium processes data according to the processing method indicated by the first information based on the target storage units in each group, the method also includes: the instruction decoder of the storage medium parses the first processing instruction to obtain the first information and the second information.

[0034] In a possible implementation manner, the sum of the lengths of at least two target storage units is not less than the data length indicated by the second information.

[0035] In a third aspect, a method for processing data is provided, the method being applied to a storage device, the storage device comprising a controller and a storage medium, the storage medium comprising an instruction decoder and a plurality of storage units, the method comprising:

[0036] The controller determines first information and second information, the first information is used to indicate a processing mode, the second information is used to indicate a data length of data to be processed, the data length is used to determine at least two target storage units from a plurality of storage units of a storage medium, and the at least two target storage units are used for data processing;

[0037] The controller encapsulates the first information and the second information to obtain a first processing instruction;

[0038] The controller sends a first processing instruction to an instruction decoder of the storage medium.

[0039] In a possible implementation, the controller determines the first information and the second information, including: receiving a second processing instruction, the second processing instruction including first reference information and second reference information, the first reference information is used to indicate a processing method, and the second reference information is used to indicate a data length of data to be processed. The first reference information is determined as the first information, and the second information is determined based on the second reference information.

[0040] In one possible implementation, the controller determines the first information and the second information, including: the number of second processing instructions includes at least two, and the second information is determined based on the second reference information, including: in response to the data length indicated by the second reference information of the at least two second processing instructions being less than the lower limit of the reference range, the controller merges the second reference information of the at least two second processing instructions to obtain the second information, and the data length indicated by the second information is within the reference range.

[0041] In one possible implementation, the controller determines the first information and the second information, including: in response to the data length indicated by the second reference information of the second processing instruction being greater than the upper limit of the reference range, the controller divides the second reference information to obtain at least two second information, and the data length indicated by any second information is within the reference range.

[0042] In a possible implementation, the controller determines the first information and the second information, including: in response to a data length indicated by second reference information of the second processing instruction being within a reference range, using the second reference information as the second information.

[0043] In a possible implementation, before the controller sends the first processing instruction to the instruction decoder of the storage medium, the method further includes: the controller obtains third information, the third information is used to indicate an address, and encapsulates the third information in the first processing instruction.

[0044] In one possible implementation, after the controller sends the first processing instruction to the instruction decoder of the storage medium, the method further includes: receiving a response message sent by the instruction decoder of the storage medium, the response message including an instruction identifier of the first processing instruction and addresses of at least two target storage units.

[0045] In a possible implementation, after the controller sends the first processing instruction to the instruction decoder of the storage medium, the method further includes: sending data, where the data is used by the instruction decoder of the storage medium to store in at least two target storage units.

[0046] In a possible implementation, after the controller sends the first processing instruction to the instruction decoder of the storage medium, the method further includes: receiving data stored in at least two target storage units sent by the instruction decoder of the storage medium in sequence of addresses of the at least two target storage units.

[0047] In one possible implementation, before the controller sends the first processing instruction to the instruction decoder of the storage medium, the method also includes: the controller determines fourth information, the fourth information is used to indicate data grouping requirements, the data grouping requirements include grouping at least two target storage units in storage row units, or grouping at least two target storage units in storage column units, and encapsulating the fourth information in the first processing instruction.

[0048] In a possible implementation, at least two target storage units are located in the same logical unit number, and the target storage unit is a minimum unit for data processing.

[0049] In a possible implementation manner, the sum of the lengths of at least two target storage units is not less than the data length indicated by the second information.

[0050] In a possible implementation, there are multiple storage devices, and the controller sends a first processing instruction to an instruction decoder of the storage medium, including: the controller receives a storage medium identifier, and sends the first processing instruction to the instruction decoder of the storage medium indicated by the storage medium identifier. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A schematic diagram of the structure of a storage device provided in an embodiment of the present application;

[0052] Figure 2 A schematic diagram of the structure of a storage device provided in an embodiment of the present application;

[0053] Figure 3 A flowchart of a method for processing data provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of the structure of a storage device provided in an embodiment of the present application;

[0055] Figure 5 A schematic diagram of a process for processing data in a related technology provided in an embodiment of the present application;

[0056] Figure 6 A schematic diagram of a data processing flow provided in an embodiment of the present application;

[0057] Figure 7 A schematic diagram of processing data provided in an embodiment of the present application;

[0058] Figure 8 A schematic diagram of processing data provided in an embodiment of the present application;

[0059] Fig. 9 A schematic diagram of processing data provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0061] The present application embodiment provides a storage device, see Figure 1 , the storage device includes a controller and a storage medium, the storage medium includes a command decoder and a plurality of storage units, and the controller and the command decoder of the storage medium are connected. Thus, the command decoder of the storage medium can receive the processing instructions sent by the controller and perform data processing based on the received processing instructions. Among them, a storage medium is a logical unit number (logical unit number, LUN), and LUN is also called Die. In the storage medium, multiple storage units form an array, and the array is also called a bank. The array includes M rows and N columns, and M and N are integers not less than 1. A storage unit is uniquely identified by a row and a column. In addition, the storage medium also includes an input / output (IO) interface, which is connected to the controller so as to return the data processing results to the controller as needed.

[0062] For example, see Figure 2, the number of storage media included in the storage device is multiple. Each storage medium in the multiple storage media includes the above-mentioned instruction decoder and multiple storage units, which will not be repeated here. For the controller in the storage medium, the controller is connected to the instruction controllers of the multiple storage media respectively.

[0063] For example, see Figure 1 For any storage medium, in addition to the above-mentioned controller and multiple storage units, it also includes a row address decoder and a column address decoder, and the row address decoder and the column address decoder also correspond to multiplexers (MUX) respectively. The instruction decoder sends an instruction to the row address decoder, and the row address decoder controls the MUX corresponding to the row address decoder to enable one or more rows in the array according to the instruction. The instruction decoder also sends an instruction to the column address decoder, and the column address decoder controls the MUX corresponding to the column address decoder to enable one or more columns in the array according to the instruction. Since the storage unit is uniquely identified by the row and column, after enabling the rows and columns in the array respectively, one or more storage units in the array can be enabled. In this embodiment, the enabled storage unit can be used for data processing.

[0064] See also Figure 1 Any storage medium also includes a data processing unit, which is connected to the instruction decoder, so as to cooperate with the instruction decoder to complete the data processing process according to the control of the instruction decoder. Among them, the instruction decoder first enables the storage units in the array by controlling the row address decoder and the column address decoder, and then controls the data processing unit to perform data processing based on the enabled storage units. For example, the data processing unit reads, erases, and performs other processing on the enabled storage units according to the control of the instruction decoder. For another example, the data processing unit is also connected to the controller to receive data sent by the controller, and writes the received data into the enabled storage units according to the control of the instruction decoder.

[0065] Based on the above Figure 1 and Figure 2 The storage device shown in the embodiment of the present application provides a method for processing data, which is applied to the interaction process between the controller and the instruction decoder of the storage medium. Figure 3 , the method includes the following contents.

[0066] 301. A controller sends a first processing instruction to an instruction decoder of a storage medium.

[0067] In the first processing instruction, the first information and the second information are included, the first information is used to indicate the processing method, and the second information is used to indicate the data length of the data to be processed. The processing method indicated by the first information includes but is not limited to: reading, writing, erasing, overwriting, etc. Among them, reading refers to obtaining the data stored in the storage unit and returning it to the controller, writing refers to storing data in a storage unit that does not store data, erasing refers to deleting the data stored in the storage unit, and overwriting refers to storing data in a storage unit that stores data. Of course, the above methods are all examples and are not used to limit the processing method indicated by the first information. The data length of the data to be processed indicated by the second information is determined according to actual needs. In this embodiment, the second information can indicate the data length in a variety of ways. For example, the second information includes a length value, and the data length is equal to the length value. For another example, the second information is the number of storage units, and the data length is equal to the product of the number of storage units and the length of the storage unit. For another example, the second information includes a first address and a second address located after the first address, then the data length is equal to the difference between the second address and the first address.

[0068] For the controller, the controller first determines the first information and the second information, and then encapsulates the first information and the second information to obtain the above-mentioned first processing instruction, thereby sending the first processing instruction to the instruction decoder of the storage medium. Exemplarily, the controller determines the first information and the second information, including: receiving the second processing instruction, the second processing instruction includes the first reference information and the second reference information, the first reference information is used to indicate the processing method, and the second reference information is used to indicate the data length of the data to be processed. The first reference information is determined as the first information, and the second information is determined based on the second reference information.

[0069] The second processing instruction includes an instruction sent by the processor to the controller. The processor is a component other than the storage device. The processor and the storage device can be integrated into the same computer device or located in different computer devices. The processing method indicated by the first reference information includes but is not limited to reading, writing, erasing, overwriting, etc. In this embodiment, the first reference information is used as the first information, so that the processing methods indicated by the first processing instruction and the second processing instruction are the same. Exemplarily, determining the second information based on the second reference information includes the following three situations A1-A3.

[0070] Case A1, the number of second processing instructions includes at least two, and the second information is determined based on the second reference information, including: in response to the data length indicated by the second reference information of at least two second processing instructions being less than the lower limit of the reference range, the controller merges the second reference information of at least two second processing instructions to obtain the second information, and the data length indicated by the second information is within the reference range.

[0071] Among them, the reference range is the value range of the data length, and this embodiment does not limit the lower limit and upper limit of the reference range. The data length indicated by the second information is within the reference range, which means that the data length indicated by the second information is not less than the lower limit of the reference range, and is not greater than the upper limit of the reference range. Exemplarily, the lower limit and upper limit of the reference range are determined based on the processing efficiency of the storage medium when processing data. For example, the processing efficiency of the storage medium when processing data of different data lengths is obtained, and the lower limit and upper limit of the reference range are determined according to the data length corresponding to the processing efficiency higher than the efficiency threshold. As a result, when the storage medium processes the data within the reference range, the storage medium can have a higher processing efficiency.

[0072] Taking the reference range with a lower limit of 128 bytes (byte, B) and an upper limit of 1 megabyte (mega byte, MB) as an example, the process of the controller merging the second reference information is described as follows:

[0073] In the two second processing instructions received by the controller, the processing methods indicated by the first reference information are both writing, the data length indicated by one second reference information is 64B, and the data length indicated by the other second reference information is 96B, then the data lengths indicated by the two second reference information are both less than the lower limit of the reference range 128B. Therefore, the controller merges the data lengths indicated by the two second reference information, that is, the sum of 64B and 96B 160B is used as the second information, and the data length 160B indicated by the second information is within the reference range 128B-1MB. For the controller, it only needs to send a first processing instruction to the instruction decoder of the storage medium later, the processing method indicated by the first information of the first processing instruction is writing, and the data length indicated by the second information of the first processing instruction is 160B.

[0074] In the case where the controller does not merge the second reference information of at least two second processing instructions, the controller needs to send a first processing instruction to the instruction decoder of the storage medium for each second processing instruction, that is, the controller needs to send at least two first processing instructions to the instruction decoder of the storage medium. In case A1, since the controller merges the second reference information of at least two second processing instructions, the number of first processing instructions sent by the controller to the instruction decoder of the storage medium is reduced. As a result, the processing resources that the controller needs to consume during data processing are reduced, and the data processing efficiency is improved.

[0075] Exemplarily, in this embodiment, when the processing methods indicated by the first reference information of at least two second processing instructions are the same, the second reference information of at least two second processing instructions is merged. For example, if the processing methods indicated by the first reference information of the two second processing instructions are both writing, the second reference information of the two second processing instructions is merged. However, if the processing method indicated by the first reference information of one second processing instruction is writing, and the processing method indicated by the first reference information of the other second processing instruction is reading, the two second processing instructions are not merged.

[0076] Case A2: in response to the data length indicated by the second reference information of the second processing instruction being greater than the upper limit of the reference range, the controller divides the second reference information to obtain at least two second information, and the data length indicated by any second information is within the reference range.

[0077] The upper limit of the reference range is determined in accordance with the description of situation A1, which will not be described again. In the process of the controller dividing the second reference information to obtain the second information, the data lengths indicated by different second information may be the same or different, as long as the data lengths indicated by each second information are within the reference range.

[0078] Taking the lower limit of the reference range as 128B and the upper limit of the reference range as 1MB as an example, the process of dividing the second reference information by the controller is described as follows:

[0079] The controller receives a second processing instruction, the processing method indicated by the first reference information of the second processing instruction is read, and the data length indicated by the second reference information of the second processing instruction is 4MB, which is greater than the upper limit of the reference range of 1MB. Therefore, the controller divides the second reference information into multiple second information, for example, divides the second reference information into four parts evenly, thereby obtaining four second information, and the data length indicated by each second information is 1MB, which is within the reference range of 128B-1MB. For the controller, four first processing instructions are subsequently sent to the finger decoder of the storage medium, and the processing method indicated by the first information of each first processing instruction is read, and the data length indicated by the second information is 1MB.

[0080] In the case where the controller does not divide the second reference information of the second processing instruction, the controller only sends a first processing instruction to the instruction decoder of the storage medium. According to the first processing instruction, the storage medium needs to process longer data (such as 4MB in the above example) during a data processing process, so the storage medium takes a long time to complete a data processing. In some scenarios, after the storage medium completes a data processing, it needs to return information to the controller. Since the storage medium takes a long time to complete a data processing, the controller needs to wait for a long time to receive the information returned by the storage medium. For example, in a data reading scenario, after the storage medium completes the data reading according to the first processing instruction, it needs to return the read data to the controller. For the controller, it needs to wait for a long time to receive the data read by the storage medium.

[0081] In case A2, since the controller divides the second reference information of the second processing instruction, at least two first processing instructions are obtained. According to each first processing instruction, the length of the data that the storage medium needs to process in one data processing process is reduced (for example, from 4MB to 1MB in the above example), thereby shortening the time required for the storage medium to complete one data processing. In the scenario where the storage medium needs to return information to the controller, the controller only needs to wait for a short time to receive the information returned by the storage medium.

[0082] In case A3, in response to the data length indicated by the second reference information of the second processing instruction being within the reference range, the second reference information is used as the second information.

[0083] When the data length indicated by the second reference information of the second processing instruction is within the reference range, the second reference information can be directly used as the second information. In case A3, the second processing instruction sent by the processor to the controller is the first processing instruction sent by the controller to the instruction decoder of the storage medium, that is, the second processing instruction is the same as the first processing instruction.

[0084] The above describes the way in which the controller generates the first processing instruction. When the controller is connected to an instruction decoder of a storage medium, the controller can send the first processing instruction to the instruction decoder of the storage medium. It should be noted that the storage medium corresponds to a chip enable (CE) pin, and the controller enables the storage medium through the CE pin to obtain an enabled storage medium, thereby sending the first processing instruction to the enabled storage medium.

[0085] In the case where the controller is connected to the instruction decoders of multiple storage media, the controller also needs to determine to which storage medium the instruction decoder is to send the first processing instruction. Exemplarily, the controller receives a storage medium identifier and sends the first processing instruction to the instruction decoder of the storage medium indicated by the storage medium identifier. The storage medium identifier is carried in the second processing instruction sent by the processor to the controller, and the storage medium identifier is, for example, a logical address. The controller stores a mapping relationship between a logical address and a physical address. The controller can determine the physical address corresponding to the logical address based on the mapping relationship, and determines the storage medium indicated by the physical address corresponding to the logical address as the target storage medium among multiple storage media. The instruction decoder of the target storage medium is used to receive the first processing instruction. Therefore, the controller enables the target storage medium through the CE pin of the target storage medium, and sends the first processing instruction to the enabled target storage medium.

[0086] 302. An instruction decoder of a storage medium receives a first processing instruction sent by a controller.

[0087] Since the instruction decoder of the storage medium is connected to the controller, after the controller sends the first processing instruction, the instruction decoder of the storage medium receives the first processing instruction accordingly.

[0088] 303. The instruction decoder of the storage medium determines at least two target storage units from a plurality of storage units of the storage medium based on the data length indicated by the second information.

[0089] According to the description in 301, the first processing instruction includes the first information and the second information. To obtain the first information and the second information in the first processing instruction, exemplarily, the method further includes: the instruction decoder of the storage medium parses the first processing instruction to obtain the first information and the second information. After obtaining the first information and the second information, the instruction decoder of the storage medium can determine the data length indicated by the second information, and thus can determine at least two target storage units from multiple storage units of the storage medium based on the data length.

[0090] It should be noted that, since one storage medium is one LUN, at least two target storage units determined from multiple storage units of the storage medium are also located in the same LUN. In addition, the target storage unit is the smallest unit for data processing. In other words, during the data processing process, data processing is performed based on an integer number of target storage units. For any target storage unit, data processing is not performed based on only a part of the target storage unit. Therefore, the sum of the lengths of at least two target storage units is not less than the data length. For example, when the data length can divide the length of the target storage unit, the sum of the lengths of at least two target storage units is equal to the data length. For another example, when the data length cannot divide the length of the target storage unit, the sum of the lengths of at least two target storage units is greater than the data length.

[0091] In an exemplary embodiment, the command decoder of the storage medium determines at least two target storage units from a plurality of storage units of the storage medium based on the data length indicated by the second information, including 3031 and 3032 as follows.

[0092] 3031, the instruction decoder of the storage medium determines the starting address of the data to be processed.

[0093] The starting address of the data to be processed affects the number of target storage units. When the data length indicated by the second information and the length of the storage unit are the same, if the starting address of the data to be processed is different, the number of target storage units may also be different. For example, if the data length indicated by the second information is 32B and the length of the storage unit is 16B, see Figure 4 In response to the starting address of the data to be processed being the first address bit of the storage unit 0 in row 0, the target storage units are the storage units 0 and 1 in row 0, and the number of target storage units is 2. In response to the starting address of the data to be processed being between the first address bit and the last address bit of the storage unit 0 in row 0, the target storage units are the storage units 0, 1 and 3 in row 0, and the number of target storage units is 3. It can be seen that the present embodiment needs to determine the starting address of the data to be processed in order to subsequently determine the number of target storage units. Exemplarily, the method for determining the starting address of the data to be processed includes the following two cases.

[0094] Case B1, the first processing instruction also includes third information, and the third information is used to indicate an address. The instruction decoder of the storage medium determines the address indicated by the third information as the starting address of the data to be processed. According to the above description, the first processing instruction is obtained by the controller encapsulating the first information and the second information. In the case where the first processing instruction also includes the third information, before the controller sends the encapsulated first processing instruction, the method also includes: the controller obtains the third information for indicating the address, and encapsulates the third information in the first processing instruction. Exemplarily, the second processing instruction sent by the processor to the controller includes information for indicating the address, and the controller parses the second processing instruction to obtain information for indicating the address, thereby using the information for indicating the address as the third information.

[0095] In case B2, the instruction decoder of the storage medium determines the starting address of the data to be processed based on a plurality of storage units of the storage medium.

[0096] Exemplarily, the instruction decoder of the storage medium randomly selects a storage unit from a plurality of storage units of the storage medium, and uses the first address position of the randomly selected storage unit as the starting address of the data to be processed. Further, in some embodiments, the instruction decoder of the storage medium obtains the storage unit corresponding to the processing method indicated by the first information from the plurality of storage units of the storage medium according to the processing method indicated by the first information of the first processing instruction, and randomly determines the storage unit from the storage units corresponding to the processing method indicated by the first information, thereby using the first address position of the randomly determined storage unit as the starting address of the data to be processed. Taking the processing method indicated by the first information as writing as an example, since writing refers to storing data in a storage unit that does not store data, the storage unit corresponding to the processing method indicated by the first information refers to: a storage unit that does not store data, then the instruction decoder of the storage medium randomly determines a storage unit from the storage unit that does not store data, and uses the first address position of the randomly determined storage unit as the starting address of the data to be processed.

[0097] 3032, the instruction decoder of the storage medium determines at least two target storage units from the multiple storage units of the storage medium based on the second information, the lengths of the multiple storage units, the length of at least one storage row, and the starting address of the data to be processed.

[0098] Exemplarily, this embodiment determines the first target storage unit based on the starting address of the data to be processed, and determines the total number of target storage units based on the data length indicated by the second information, the length of the storage unit, and the starting address of the data to be processed. For ease of description, the total number of target storage units is recorded as the first number, and this embodiment uses the first number of storage units including the first target storage unit as at least two target storage units.

[0099] In an exemplary embodiment, in response to determining the starting address of the data to be processed according to the above situation B1, a first number of storage units including the first target storage unit is used as at least two target storage units, including: starting from the first target storage unit, a first number of continuous storage units are used as at least two target storage units. Thus, the addresses of the at least two target storage units are continuous. For example, see Figure 4 , the first target storage unit is storage unit 0 in row 0, and the total number of target storage units is 4, then the target storage units are: storage unit 0 in row 0, storage unit 1, storage unit 2, and storage unit 3.

[0100] It can be understood that the multiple storage units of the storage medium are located in at least one storage row, and the number of storage units included in a storage row is limited. Therefore, the above-mentioned at least two target storage units may cover at least one storage row, and this embodiment needs to determine the storage row covered by at least two target storage units in combination with the length of the storage row. Among them, the length of the storage row is equal to the sum of the lengths of the storage units included in the storage row. For example, if a storage row includes 16 storage units with a length of 16B, the length of the storage row is 256B.

[0101] Exemplarily, the first storage row can be determined based on the starting address of the data to be processed, and the total number of storage rows can be determined based on the data length indicated by the second information, the length of the storage row, and the starting address of the data to be processed, and the total number of storage rows is recorded as the second number. Therefore, the covered storage rows refer to: the second number of continuous storage rows including the first storage row. For example, see Figure 4 When the data length indicated by the second information is 512B, the length of the storage row is 256B, and the starting address of the data to be processed is the first address of storage unit 8 in row 0, the first storage row is row 0, and the total number of storage rows covered is 3, so it can be determined that the storage rows covered are row 0, row 1, and row 2 in the storage medium.

[0102] Alternatively, in response to determining the starting address of the data to be processed according to the above situation B2, a reference number of storage units including the first target storage unit is used as at least two target storage units, including: randomly determining a storage unit after the first target storage unit, and using the first target storage unit and the randomly determined storage unit as at least two target storage units, then the addresses of the at least two target storage units are continuous or discontinuous. The situation where the addresses of at least two target storage units are continuous can be seen in the above examples, and the examples will not be repeated here. For the situation where the addresses of at least two target storage units are discontinuous, see Figure 4, still taking the example that the first target storage unit is storage unit 0 in row 0 and the total number of target storage units is 4, the target storage units may be: storage unit 0, storage unit 2, storage unit 3 and storage unit 4 in row 0, wherein the addresses of storage unit 0 and storage unit 2 are not continuous. In this case, at least two target storage units also cover at least one storage row, and the covered storage row may be determined according to the address of the randomly determined target storage unit.

[0103] It should be noted that, since the target storage unit is randomly determined by the instruction decoder of the storage medium in case B2, the instruction decoder of the storage medium needs to return the address of the target storage unit to the controller so that the controller can know which target storage units the instruction decoder of the storage medium performs data processing based on. Therefore, in an exemplary embodiment, after the instruction decoder of the storage medium determines at least two target storage units, the method also includes: the instruction decoder of the storage medium encapsulates the instruction identifier of the first processing instruction and the addresses of at least two target storage units, obtains a response message, and sends the response message to the controller, and the controller can determine the addresses of at least two target storage units by receiving the response message. Among them, the instruction identifier of the first processing instruction of the response message is used by the controller to distinguish different first processing instructions. In the case where the controller sends multiple first processing instructions to the instruction decoder of the storage medium, the controller can determine which first processing instruction the instruction decoder of the storage medium determines the target storage unit based on according to the instruction identifier of the first processing instruction carried in the response message.

[0104] In the above description, the instruction decoder of the storage medium parses the first processing instruction to obtain the first information and the second information (which may also include the third information), and the instruction decoder of the storage medium determines at least two target storage units based on the second information, and the at least two storage units cover at least one storage row. The instruction decoder of the storage medium can send the covered storage row to the row address decoder, and send the target storage unit in each storage row to the column address decoder, so that the row address decoder and the column address decoder can be enabled. Exemplarily, the instruction decoder of the storage medium in this embodiment can also only parse the first processing instruction, and send the obtained second information (which may also include the third information) to the row address decoder and the column address decoder respectively, so that the row address decoder determines the covered storage row according to the received information in the manner described in the above description, and the column address decoder determines the target storage unit in each storage row according to the received information in the manner described in the above description, so that the row address decoder and the column address decoder can be enabled. Wherein, the process of enabling the row address decoder and the column address decoder is described in 304 below.

[0105] 304. The instruction decoder of the storage medium performs data processing based on at least two target storage units in accordance with the processing method indicated by the first information.

[0106] It can be seen that the instruction decoder can implement data processing based on at least two target storage units according to a first processing instruction sent by the controller. This data processing method is also called concurrent (burst) processing.

[0107] In an exemplary embodiment, the first processing instruction also includes fourth information, and the fourth information is used to indicate a data grouping requirement, and the data grouping requirement includes grouping at least two target storage units in units of storage rows, or grouping at least two target storage units in units of storage columns. Accordingly, the instruction decoder of the storage medium groups at least two target storage units according to the data grouping requirement indicated by the fourth information to obtain at least one group. Based on the target storage units in each group, data processing is performed according to the processing method indicated by the first information. Exemplarily, the fourth information can be obtained by the controller from the second processing instruction, and the controller encapsulates the fourth information in the first processing instruction before sending the first processing instruction to the instruction decoder of the storage medium.

[0108] Exemplarily, the fourth information is represented as a numerical value, and different values ​​of the fourth information are used to indicate different data grouping requirements. For example, if the value of the fourth information is a first numerical value, it indicates that the data grouping requirement is to group at least two target storage units in units of storage rows. If the value of the fourth information is a second numerical value, it indicates that the data grouping requirement is to group at least two target storage units in units of storage columns, and the first numerical value and the second numerical value are different numerical values.

[0109] In response to the data grouping requirement including grouping at least two target storage units in storage row units, the instruction decoder performs data processing in storage row units. That is, for a storage row including a target storage unit, the instruction decoder first performs data processing based on each target storage unit in one storage row, then switches to another storage row, performs data processing based on each target storage unit in another storage row, and so on, and ends the data processing process after traversing each storage row including a target storage unit. For example, see Figure 4 Taking the target storage units including storage units 0-storage units 15 in row 0 and storage units 0-storage units 15 in row 1 as an example, the instruction decoder first performs data processing based on storage units 0-storage units 15 in row 0, and then switches to row 1, and performs data processing based on storage units 0-storage units 15 in row 1, thereby completing the data processing process.

[0110] Alternatively, in response to the data grouping requirement including grouping at least two target storage units in storage column units, the instruction decoder performs data processing in storage column units. For storage columns including target storage units, the instruction decoder first performs data processing based on each target storage unit in one of the storage columns, then switches to another storage column, performs data processing based on each target storage unit in the other storage column, and so on, and ends the data processing process after traversing each storage column including the target storage unit. Still taking the example that the target storage unit includes storage unit 0-storage unit 15 in row 0 and storage unit 0-storage unit 15 in row 1, the instruction decoder first performs data processing based on storage unit 0 in row 0 and row 1, then switches to storage unit 1, and performs data processing based on storage unit 1 in row 0 and row 1. And so on, until data processing is performed based on storage unit 15 in row 0 and row 1, thereby completing the data processing process.

[0111] It can be understood that the embodiments of the present application do not limit the processing order of the target storage units in each group. For example, the data grouping requirement includes grouping at least two target storage units in storage line units, and the instruction decoder processes data based on the storage units in row 0 and row 1 respectively, then the instruction decoder first processes data based on row 0 and then processes data based on row 1, or the instruction decoder first processes data based on row 1 and then processes data based on row 0.

[0112] Furthermore, for any storage unit, the process of the instruction decoder performing data processing based on the storage unit includes: enabling the storage unit, and performing data processing based on the enabled storage unit. Therefore, when performing data processing based on the target storage unit in each group, the instruction decoder also needs to enable the target storage unit in each group, so as to perform data processing based on the enabled target storage unit in the group.

[0113] Exemplarily, in this embodiment, the target storage units in any group are enabled in parallel, so as to shorten the time consumed for data processing and improve data processing efficiency. Exemplarily, the instruction decoder of the storage medium performs data processing in accordance with the processing method indicated by the first information based on the target storage units in each group, including: the instruction decoder of the storage medium enables the target storage units in any group in parallel for any group. The target storage units enabled in parallel in any group are processed in accordance with the processing method indicated by the first information, so that the difference between the processing times of the target storage units enabled in parallel in any group is less than a threshold value.

[0114] In response to grouping in units of storage rows, in a parallel enabling process, the instruction decoder sends a first instruction to the row address decoder, and the row address decoder controls the MUX corresponding to the row address decoder according to the first instruction, so that the MUX corresponding to the row address decoder enables a storage row including a target storage unit. Correspondingly, the instruction decoder sends a second instruction corresponding to the first instruction to the column address decoder, and the column address decoder controls the MUX corresponding to the column address decoder according to the second instruction, so that the MUX corresponding to the column address decoder enables one or more storage columns corresponding to the storage row in parallel, thereby enabling the target storage unit included in the storage row in parallel. Afterwards, data processing is performed on the target storage unit enabled in parallel in the storage row according to the processing method indicated by the first information. By enabling the target storage units in the same storage row in parallel, the difference between the processing times of the target storage units enabled in parallel is made less than a threshold. In other words, it can be considered that the data processing process of the target storage units in the same storage row is performed synchronously.

[0115] It should be noted that a target duration is set in the storage medium, and the target duration is the time required for the process of enabling and processing data of a storage unit. In other words, the timing starts from the instruction decoder sending an instruction to the row address decoder and the column address decoder, and after the target duration has passed, it is considered that the enabling and data processing of a storage unit have been completed. In this embodiment, since the data processing process of each target storage unit in the same storage row is carried out synchronously, the timing starts from the instruction decoder sending an instruction, and after a target duration has passed, it is considered that the enabling and data processing process of each target storage unit in the storage row has been completed. Therefore, the instruction decoder can send a new instruction to the row address decoder and the column address decoder to instruct the target storage units in other storage rows to perform parallel enabling and data processing.

[0116] Taking the target storage unit including storage units 0-15 in row 0 and storage units 0-15 in row 1 as an example, the above target duration is recorded as T, and the time when the instruction decoder first sends the instruction is recorded as 0, then: at time 0, the instruction decoder sends the first instruction to the row address decoder and sends the second instruction corresponding to the first instruction to the column address decoder, the row address decoder controls the MUX corresponding to the row address decoder to enable row 0 according to the first instruction, and the column address decoder controls the MUX corresponding to the column address decoder to enable columns 0-15 according to the first instruction, thereby enabling storage units 0-15 in row 0, and performing data processing after enabling. At time T, it is considered that the data processing process based on storage units 0-15 in row 0 has been completed. Therefore, the instruction decoder sends a new first instruction to the row address decoder and a new second instruction to the column address decoder to enable storage units 0-15 in row 1, and performs data processing after enabling. At time 2T, it is considered that the data processing process based on storage units 0-15 in row 1 has been completed, thereby ending the data processing process.

[0117] Alternatively, in response to grouping in units of storage columns, in a parallel enabling process, the instruction decoder sends a first instruction to the column address decoder, and the column address decoder controls the MUX corresponding to the column address decoder according to the first instruction to enable a storage column including a target storage unit. Correspondingly, the instruction decoder sends a second instruction corresponding to the first instruction to the row address decoder, and the row address decoder controls the MUX corresponding to the row address decoder according to the second instruction, so that the MUX corresponding to the row address decoder enables one or more storage rows corresponding to the storage column, thereby enabling the target storage units included in the storage column in parallel. Afterwards, data processing is performed on the parallel-enabled target storage units in the storage column according to the processing method indicated by the first information, so that the difference between the processing times of the parallel-enabled target storage units in the storage column is less than the threshold.

[0118] In the case of parallel operation, the time required for data processing in this embodiment is less than the time required for data processing in the related art. Figure 5 , Figure 5The process of data processing in the related technology is shown. In the related technology, each time the storage medium receives a processing instruction sent by the controller, it enables and processes data for a storage unit. After completing the enabling and data processing of a storage unit, it waits to receive the next processing instruction from the controller, and enables and processes data for the next storage unit according to the next processing instruction. Taking the length of a storage unit of 16B as an example, if 64B of data is processed according to the related technology, the controller needs to send 4 processing instructions. On this basis, the time required for the storage medium to complete the enabling and data processing of a storage unit is recorded as P, and the time required for the storage medium to wait for instructions is recorded as Q, and is given by Figure 5 It can be seen that the total time required to process 64B length data according to the relevant technology is 4P+3Q.

[0119] In this embodiment, see Figure 6 , each time the storage medium receives a concurrent processing instruction sent by the controller, it can process data for at least two target storage units, reducing the number of processing instructions that the controller needs to send, and the storage medium does not need to wait to receive other processing instructions. In addition, since the enabling process for each target storage unit is parallel, the data processing process of each target storage unit is performed synchronously. In the same length of time, the related technology can only complete the data processing of one storage unit, while the present embodiment can complete the data processing of at least two target storage units, thereby shortening the time required for data processing. Figure 6 As shown, the time required to complete the enabling and data processing of a storage unit is still recorded as P. Then, according to the method provided in this embodiment, 64B length data is processed. The controller only needs to send one processing instruction, and the total time required to process 64B length data is P, which is reduced by (3P+3Q) time compared with the related art.

[0120] Of course, the method provided in this embodiment is not limited to the case of parallel enablement. For example, for any group, this embodiment can also enable the target storage unit in the group in series according to actual needs. The difference between serial enablement and parallel enablement is that parallel enablement is to synchronously enable each target storage unit in the same group, while serial enablement is to enable each target storage unit in the same group in sequence. Take an example to illustrate the process of serial enablement: in the case of grouping according to storage rows and the target storage unit includes storage units 0-2 in row 0, the time required for the process of enabling and data processing of a storage unit is recorded as T, and the time when the instruction decoder starts to send the instruction is recorded as 0. Then, at time 0, the instruction decoder instructs the row address decoder to enable row 0 and instructs the column address decoder to enable column 0, so that storage unit 0 in row 0 is enabled. At time T, the instruction decoder instructs the row address decoder to enable row 0 and instructs the column address decoder to enable column 1, so that storage unit 1 in row 0 is enabled. At time 2T, the instruction decoder instructs the row address decoder to enable row 0 and the column address decoder to enable column 2, thereby enabling storage unit 2 in row 0. At time 3T, the data processing process based on storage units 0-2 in row 0 is considered to be completed, thereby ending the data processing process.

[0121] In addition, based on the above description, it can be known that the first information can be used to indicate multiple processing methods. When the processing methods indicated by the first information are different, the instruction decoder of the storage medium completes different data processing processes according to the processing methods indicated by the first information, see the following cases C1 and C2.

[0122] In case C1, the processing mode indicated by the first information includes a first processing mode, and the first processing mode includes a processing mode of storing data in a storage unit. Exemplarily, the first processing mode includes but is not limited to writing and overwriting. The instruction decoder of the storage medium also needs to obtain data so as to store data according to the first processing mode. Therefore, the method provided in this embodiment also includes: the controller sends data. Exemplarily, the data sent by the controller is the data received by the controller from the processor. Correspondingly, the instruction decoder of the storage medium processes data according to the processing mode indicated by the first information based on at least two target storage units, including: storing the data sent by the controller in at least two target storage units according to the first processing mode. Exemplarily, after sending the first processing instruction to the instruction decoder of the storage medium, the controller continues to send data to the instruction decoder of the storage medium, so that the instruction decoder stores the data in the target storage unit. Alternatively, after sending the first processing instruction to the instruction decoder of the storage medium, the controller sends data to the data processing unit in the storage medium, and after determining that the target storage unit is enabled, the instruction decoder controls the data processing unit to store the data in the target storage unit.

[0123] In case C2, the processing method indicated by the first information includes a second processing method, and the second processing method includes a method of processing data based on a storage unit that has stored data. Exemplarily, the second processing method includes but is not limited to reading and erasing. The instruction decoder of the storage medium processes data based on at least two target storage units according to the processing method indicated by the first information, including: the instruction decoder of the storage medium processes the data stored in at least two target storage units according to the second processing method.

[0124] In an exemplary embodiment, after the instruction decoder of the storage medium processes the data stored in at least two target storage units according to the second processing method, the method further includes: the instruction decoder of the storage medium sends the data stored in at least two target storage units to the controller according to the address sequence of the at least two target storage units. Correspondingly, the controller also receives the data stored in at least two target storage units sent by the instruction decoder of the storage medium. Exemplarily, the instruction decoder of the storage medium implements data transmission through multiple transmission processes, and the length of the data sent in each transmission process is determined based on the bit width of the IO interface, that is, the length of the data sent in each transmission process is not greater than the bit width of the IO interface. Therefore, the instruction decoder of the storage medium first divides the data stored in the first target storage unit into multiple parts according to the bit width of the IO interface, and sends each part to the controller in the order of the address from first to last. After all the parts in the first target storage unit are sent, the data stored in the second target storage unit are divided and sent in the same way. And so on, until the data stored in each target storage unit are sent.

[0125] For example, if there are two target storage units with a length of 16B and the bit width of the IO interface is 1B, the data stored in the first target storage unit is first divided into 16 parts with a length of 1B, and the first part, the second part, ..., the 16th part of the first target storage unit are sent in order from the first address to the last address, so that the data stored in the first target storage unit is sent to the controller through 16 sending processes. After that, the data stored in the second target storage unit is also divided into 16 parts with a length of 1B, and the data stored in the second target storage unit is sent to the controller through 16 sending processes.

[0126] The above describes the method for processing data provided by the embodiment of the present application. Next, taking the storage unit length of 16B and the processing method of reading as an example, the application process of the data processing method provided by the embodiment of the present application is described through the following three examples.

[0127] Example 1, see Figure 7 , Figure 7 The process of reading 64B of data is shown. The instruction decoder of the storage medium controls the row address decoder and the corresponding MUX to enable row 0, and controls the column address decoder and the corresponding MUX to enable columns 0-3, so that storage units 0-3 in row 0 are enabled. After that, the data stored in storage units 0-3 in row 0 are read, and a total of 64B of data is read.

[0128] Example 2, see Figure 8 , Figure 8The process of reading 256B of data is shown. The instruction decoder of the storage medium controls the row address decoder and the corresponding MUX to enable row 0, and controls the column address decoder and the corresponding MUX to enable columns 0-15, so that storage units 0-15 in row 0 are enabled. After that, the data stored in storage units 0-15 in row 0 are read, and a total of 256B of data is read.

[0129] Example 3, see Fig. 9 , Fig. 9 The process of reading 4KB (i.e., 4096B) of data is shown. Among them, the instruction decoder of the storage medium controls the row address decoder and the corresponding MUX to enable the 0th row, controls the column address decoder and the corresponding MUX to enable the 0th-15th columns, thereby enabling the storage units 0-15 in the 0th row and reading 256B of data. Afterwards, the instruction decoder of the storage medium controls the row address decoder and the corresponding MUX to enable the 1st row, controls the column address decoder and the corresponding MUX to enable the 0th-15th columns, thereby enabling the storage units 0-15 in the 1st row and continuing to read 256B of data. And so on, until the instruction decoder of the storage medium controls the row address decoder and the corresponding MUX to enable the 15th row, controls the column address decoder and the corresponding MUX to enable the 0th-15th columns, thereby enabling the storage units 0-15 in the 15th row and reading 256B of data. Thus, a total of 4KB of data in 16 rows is read.

[0130] In summary, the controller only needs to send one processing instruction to enable the instruction decoder of the storage medium to perform continuous data processing based on at least two storage units. Compared with the situation where each processing instruction can only instruct the instruction decoder to perform data processing based on one storage unit, the data processing method provided in this embodiment can reduce the number of processing instructions that the controller needs to send. Not only does it reduce the processing resources that the controller needs to consume during data processing and avoid waste of resources, but it also improves the efficiency of data processing.

[0131] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0132] Further, in an optional embodiment, the above storage medium may include a read-only storage medium and a random access storage medium, and provide instructions and data to the processor. The storage medium may also include a non-volatile random access storage medium. For example, the storage medium may also store information about the device type.

[0133] The storage medium may be a volatile storage medium or a non-volatile storage medium, or may include both volatile and non-volatile storage media. Among them, the non-volatile storage medium may be a phase change memory (PCM), a read-only storage medium (ROM), a programmable read-only storage medium (PROM), an erasable programmable read-only storage medium (EPROM), an electrically erasable programmable read-only storage medium (EEPROM), or a flash memory. The volatile storage medium may be a random access storage medium (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).

[0134] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive solid statedisk), etc.

[0135] The above description is only an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A storage device, characterized in that: The storage device includes a controller and a storage medium, the storage medium includes an instruction decoder and a plurality of storage units, and the controller is connected to the instruction decoder of the storage medium; The controller is used to send a first processing instruction to the instruction decoder of the storage medium, wherein the first processing instruction includes first information and second information, wherein the first information is used to indicate a processing method of data to be processed, and the second information is used to indicate a data length of the data to be processed; The instruction decoder is used to receive the first processing instruction, determine at least two target storage units from multiple storage units of the storage medium based on the data length indicated by the second information, and use the at least two target storage units to process the data to be processed according to the processing method indicated by the first information.

2. The storage device according to claim 1, characterized in that The multiple storage cells of the storage medium are located in at least one storage row, and the instruction decoder of the storage medium is used to determine the starting address of the data to be processed, and based on the second information, the length of the multiple storage cells, the length of the at least one storage row and the starting address of the data to be processed, determine the at least two target storage cells from the multiple storage cells of the storage medium.

3. The storage device according to claim 2, characterized in that: The first processing instruction also includes third information, and the third information is used to indicate an address. The instruction decoder of the storage medium is used to determine the address indicated by the third information as the starting address of the data to be processed, and the addresses of the at least two target storage units are continuous.

4. The storage device according to claim 2, characterized in that: The instruction decoder of the storage medium is used to determine the starting address of the data to be processed based on the multiple storage units of the storage medium, and the addresses of the at least two target storage units are continuous or discontinuous; The instruction decoder of the storage medium is further used to encapsulate the instruction identifier of the first processing instruction and the addresses of the at least two target storage units, obtain a response message, and send the response message to the controller; The controller is further configured to receive the response message.

5. The storage device according to any one of claims 1 to 4, characterized in that: The processing mode indicated by the first information includes a first processing mode, the first processing mode includes a processing mode of storing data in a storage unit, and the controller is further used to send data; The instruction decoder of the storage medium is used to store the data sent by the controller in the at least two target storage units according to the first processing method.

6. The storage device according to any one of claims 1 to 4, characterized in that: The processing method indicated by the first information includes a second processing method, and the second processing method includes a method of processing data based on a storage unit that has stored data. The instruction decoder of the storage medium is used to process the data stored in the at least two target storage units according to the second processing method.

7. The storage device according to claim 6, characterized in that: The instruction decoder of the storage medium is further used to send the data stored in the at least two target storage units to the controller according to the address sequence of the at least two target storage units; The controller is further used to receive the data stored in the at least two target storage units sent by the instruction decoder of the storage medium.

8. The storage device according to any one of claims 1 to 4, characterized in that: The first processing instruction also includes fourth information, and the fourth information is used to indicate data grouping requirements, and the data grouping requirements include grouping the at least two target storage units in units of storage rows, or grouping the at least two target storage units in units of storage columns. The instruction decoder of the storage medium is used to group the at least two target storage units according to the data grouping requirements indicated by the fourth information to obtain at least one group, and perform data processing based on the target storage units in each group according to the processing method indicated by the first information.

9. The storage device according to claim 8, characterized in that: The instruction decoder of the storage medium is used to enable the target storage units in any group in parallel, and perform data processing on the target storage units in any group enabled in parallel according to the processing method indicated by the first information, so that the difference between the processing times of the target storage units enabled in parallel in any group is less than a threshold.

10. The storage device according to any one of claims 1 to 9, characterized in that: The at least two target storage units are located in the same logical unit number, and the target storage unit is the smallest unit for data processing.

11. The storage device according to any one of claims 1 to 10, characterized in that: The instruction decoder of the storage medium is further used to parse the first processing instruction to obtain the first information and the second information.

12. The storage device according to any one of claims 1 to 11, characterized in that: The sum of the lengths of the at least two target storage units is not less than the data length indicated by the second information.

13. The storage device according to any one of claims 1 to 12, characterized in that: There are multiple storage media, and the controller is used to receive a storage medium identifier and send the first processing instruction to an instruction decoder of the storage medium indicated by the storage medium identifier.

14. A method for processing data, characterized in that The method is applied to a storage medium in a storage device, and the method comprises: The instruction decoder of the storage medium receives a first processing instruction sent by the controller in the storage device, wherein the first processing instruction includes first information and second information, wherein the first information is used to indicate a processing method of data to be processed, and the second information is used to indicate a data length of the data to be processed; The instruction decoder of the storage medium determines at least two target storage units from a plurality of storage units of the storage medium based on the data length indicated by the second information; The instruction decoder of the storage medium processes the data to be processed using the at least two target storage units according to the processing method indicated by the first information.

15. The method according to claim 14, characterized in that The plurality of storage units of the storage medium are located in at least one storage row, and the instruction decoder of the storage medium determines at least two target storage units from the plurality of storage units of the storage medium based on the data length indicated by the second information, including: The instruction decoder of the storage medium determines the starting address of the data to be processed; The instruction decoder of the storage medium determines the at least two target storage units from the multiple storage units of the storage medium based on the second information, the lengths of the multiple storage units, the length of the at least one storage row and the starting address of the data to be processed.

16. The method according to claim 15, characterized in that The first processing instruction further includes third information, and the third information is used to indicate an address, and the instruction decoder of the storage medium determines the starting address of the data to be processed, including: The instruction decoder of the storage medium determines the address indicated by the third information as the starting address of the data to be processed, and the addresses of the at least two target storage units are continuous.

17. The method according to any one of claims 14 to 16, characterized in that: The first processing instruction also includes fourth information, the fourth information is used to indicate a data grouping requirement, the data grouping requirement includes grouping the at least two target storage units in units of storage rows, or grouping the at least two target storage units in units of storage columns, and the instruction decoder of the storage medium processes the data to be processed using the at least two target storage units according to the processing method indicated by the first information, including: The instruction decoder of the storage medium groups the at least two target storage units according to the data grouping requirement indicated by the fourth information to obtain at least one group; The instruction decoder of the storage medium performs data processing based on the target storage units in each group and in accordance with the processing method indicated by the first information.

18. The method according to claim 17, characterized in that The instruction decoder of the storage medium performs data processing based on the target storage unit in each group according to the processing method indicated by the first information, including: The instruction decoder of the storage medium enables the target storage unit in any group in parallel for any group; The instruction decoder of the storage medium processes data on the parallel-enabled target storage units in any group according to the processing method indicated by the first information, so that the difference between the processing times of the parallel-enabled target storage units in any group is less than a threshold.

19. A method for processing data, characterized in that The method is applied to a storage device, the storage device includes a controller and a storage medium, the storage medium includes an instruction decoder and a plurality of storage units, and the method includes: The controller determines first information and second information, wherein the first information is used to indicate a processing mode, and the second information is used to indicate a data length of data to be processed, wherein the data length is used to determine at least two target storage units from a plurality of storage units of the storage medium, and the at least two target storage units are used for data processing; The controller encapsulates the first information and the second information to obtain a first processing instruction; The controller sends the first processing instruction to an instruction decoder of the storage medium.

Citation Information

Patent Citations

  • Storage medium and access system

    CN103680577A

  • Decoding method, memory control circuit unit and memory storage apparatus

    CN107179960A

  • Data loading and storage instruction processing method and device

    CN111813446A

  • Microprocessor with improved instruction set architecture

    EP1102163A2

  • Data processor

    JP1994161747A