Storage device and data processing method
By sending target identification through the storage medium, the controller confirms that the data processing is completed, solving the efficiency and reliability problems caused by time-consuming uncertainty in the prior art, and achieving flexible and efficient data processing.
Patent Information
- Application Number
- CN202411165862.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-04-28
AI Technical Summary
In the prior art, the time-consuming uncertainty of the storage medium in executing data processing instructions causes the controller to wait for a fixed time, which reduces the efficiency and reliability of data processing, and is not flexible enough.
After executing the data processing instructions, the storage medium sends a target identifier to the controller. According to the identification confirmation process, the controller avoids waiting for a fixed time, and combines the first identification indicating processing status and the second identification indicating fault status to improve the flexibility and reliability of data processing.
Through the use of target identifiers, the controller can promptly confirm the processing status and fault conditions of the storage medium, improve the efficiency and reliability of data processing, simplify the design complexity of the controller, and ensure the priority processing and error correction capabilities of business data.
Smart Images

Figure CN119200963B_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202210471336.0, and the original application date is April 28, 2022. The entire content of the original application is 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 data processing method. Background Art
[0003] In a computer device, data is stored in a storage medium, and data processing is achieved through the interaction between the controller included in the computer device and the storage medium. Data processing includes but is not limited to data reading and data writing.
[0004] In the related art, a controller sends a data processing instruction to a storage medium, and after waiting for a fixed period of time, it is assumed that the storage medium has executed the data processing instruction.
[0005] However, the time it takes for the storage medium to execute the data processing instruction may vary. During the data processing process, if the time is less than the fixed duration, the controller must wait an excessive amount of time, reducing data processing efficiency. If the time is greater than the fixed duration, the controller assumes that the storage medium has executed the data processing instruction when it has not, reducing data processing reliability. In short, the data processing process in related technologies is not flexible enough. Summary of the Invention
[0006] This application provides a storage device and data processing method to solve the problems of low efficiency, low reliability, and lack of flexibility in data processing processes in related technologies. The technical solution includes the following aspects.
[0007] In a first aspect, a storage device is provided, comprising a controller and a storage medium connected to each other. In the storage device, the controller is configured to send a data processing instruction to the storage medium, and the storage medium is configured to send a target identifier to the controller after executing the data processing instruction. The target identifier is at least one of a first identifier and a second identifier, the first identifier being configured to indicate the data processing instruction and the second identifier being configured to indicate a fault condition. Furthermore, the controller is configured to confirm, based on the target identifier, that the storage medium has executed the data processing instruction.
[0008] In this application, after executing the data processing instruction sent by the controller, the storage medium returns a target identifier to the controller. The controller can then confirm that the storage medium has executed the data processing instruction after receiving the target identifier. Therefore, the controller does not need to wait for a fixed period of time before assuming that the storage medium has executed the data processing instruction, thereby balancing the efficiency and reliability of the data processing process and improving the flexibility of the data processing process.
[0009] The target identifier is at least one of a first identifier and a second identifier, the first identifier is used to indicate a data processing instruction, and the second identifier is used to indicate a fault state. When the number of data processing instructions is one, the target identifier is only the first identifier, or only the second identifier, or both the first identifier and the second identifier, and the controller can identify the data processing instruction executed by the storage medium based on the target identifier. When the number of data processing instructions is at least two, the target identifier is only the first identifier, or both the first identifier and the second identifier, and the controller can identify the data processing instruction executed by the storage medium based on the target identifier.
[0010] Moreover, for the first identifier, in addition to being used by the controller to confirm that the storage medium has executed the data processing instruction, it can also be used by the controller to identify the data reading instruction corresponding to the business data returned by the storage medium when the data processing instruction is a data reading instruction. Therefore, the controller does not need to plan the order in which the data reading instructions are sent, nor does it need to command the storage medium to return the business data at a specified time and in a specified order, thereby simplifying the design complexity of the controller. Moreover, since the storage medium does not need to return the business data at a specified time and in a specified order, the storage medium does not need to control the time consumption of executing each data reading instruction, and the storage medium does not need to ensure the consistency of the delay within the life cycle. For the second identifier, in addition to being used by the controller to confirm that the storage medium has executed the data processing instruction, it can also be used by the controller to promptly confirm whether there is a fault in the execution process of the data processing instruction.
[0011] The storage medium may include an instruction decoder, a row address decoder, a column address decoder, a non-volatile storage unit, a volatile storage unit, and an input / output (IO) loop interface. The instruction decoder receives a data processing instruction sent by a controller, parses the data processing instruction to obtain instructions for the row address decoder and the column address decoder. The row address decoder and the column address decoder enable the non-volatile storage unit according to the instruction of the instruction decoder. The data processing instruction is executed through the interaction between the enabled non-volatile storage unit, the volatile storage unit, and the IO loop interface. Afterwards, the IO loop interface sends the above-mentioned target identifier to the controller.
[0012] In a possible implementation, the controller is further configured to send a third identifier corresponding to the data processing instruction to the storage medium, and the target identifier is at least one of the third identifier and the second identifier.
[0013] The storage medium does not need to independently determine the first identifier for indicating the data processing instruction, but can use the third identifier sent by the controller as the first identifier. For example, the instruction decoder included in the storage medium receives the third identifier and sends the third identifier to the IO cycle interface. The IO cycle interface uses the third identifier as the first identifier. When the target identifier includes the first identifier, the IO cycle interface can send the first identifier to the controller.
[0014] In a possible implementation, the first identifier includes at least one of an identifier of a storage unit and an identifier of a storage medium, the storage unit is at least one of the storage units included in the storage medium, and the storage unit is used for the execution process of the data processing instruction.
[0015] In other words, the storage medium independently determines the first identifier for the data processing instruction. For example, after parsing the data processing instruction, the instruction decoder determines the storage unit used to execute the data processing instruction. The instruction decoder determines the first identifier based on at least one of the identifier of the storage unit and the identifier of the storage medium where the instruction decoder is located. The instruction decoder then sends the first identifier to the I / O loop interface. If the target identifier includes the first identifier, the I / O loop interface can then send the first identifier to the controller.
[0016] In a possible implementation, the storage medium is further configured to obtain characteristic data during the execution of the data processing instruction, compare the characteristic data with reference data, and generate a second identifier.
[0017] The characteristic data represents the execution process of the data processing instruction in the form of data. Therefore, by comparing the characteristic data with the reference data, it is possible to determine whether the execution process of the data processing instruction has a fault, thereby generating a second identifier for indicating the fault state. For example, the storage medium also includes a comparator, and the storage medium also stores the reference data. The comparator obtains the characteristic data and reads the stored reference data, thereby generating the second identifier by comparing the characteristic data with the reference data.
[0018] In one possible implementation, the storage medium is used to obtain characteristic data based on data generated by elements included in the storage medium during the execution of the data processing instruction.
[0019] During the execution of a data processing instruction, the components included in the storage medium perform corresponding actions, such as an instruction decoder performing a parsing action, and a row address decoder and a column address decoder performing an enabling action. As a result, the components included in the storage medium generate data, and thus, feature data can be obtained based on the data generated by the components included in the storage medium. For example, the storage medium includes a sensor, and the sensor detects and obtains data generated by the components included in the storage medium. The comparator obtains feature data based on the data detected by the sensor. The comparator also reads reference data and generates a second identifier by comparing the feature data with the reference data.
[0020] In a possible implementation, the characteristic data includes at least one of current data, voltage data, temperature data, and component attribute data.
[0021] In this implementation, the feature data may include multiple types of data and has a wide range of applications.
[0022] In a possible implementation, the data processing instruction is used to instruct reading of business data; and the storage medium is used to obtain feature data based on the read business data during the execution of the data processing instruction.
[0023] During the data reading process, the business data is transmitted in the following directions: non-volatile storage unit, volatile storage unit, I / O loop interface, and controller. For example, the comparator reads the business data cached in the volatile storage unit and obtains characteristic data based on the business data. The comparator also obtains stored reference data. Thus, the comparator generates a second identifier by comparing the characteristic data with the reference data.
[0024] In a possible implementation, the data processing instruction is used to instruct writing of business data; the storage medium is used to read the written business data during the execution of the data processing instruction, and obtain feature data based on the read business data.
[0025] During the data writing process, business data is transmitted through the controller, the I / O loop interface, the volatile storage unit, and the non-volatile storage unit. For example, the comparator reads the written business data from the non-volatile storage unit and obtains signature data based on this business data. The comparator also reads the cached business data from the volatile storage unit and uses this business data as the baseline data. The comparator then compares the signature data with the baseline data to generate a second identifier.
[0026] In one possible implementation, in response to the difference between the characteristic data and the reference data being less than or equal to a difference threshold, the fault state indicated by the second identifier is that no fault exists; or, in response to the difference between the characteristic data and the reference data being greater than the difference threshold, the fault state indicated by the second identifier is that a fault exists.
[0027] In this implementation, if the difference between the characteristic data and the reference data is different, the fault state indicated by the second identifier is also different. The method of generating the second identifier is simple, easy and flexible.
[0028] In one possible implementation, the data processing instruction is used to indicate the writing of business data, and the data processing instruction corresponds to the first storage unit; the controller is also used to send an updated data processing instruction to the storage medium in response to the fault state indicated by the second identifier as the existence of a fault, and the updated data processing instruction is used to indicate that the business data is written to the second storage unit, and the first storage unit and the second storage unit are different storage units included in the storage medium; the storage medium is also used to execute the updated data processing instruction.
[0029] The controller confirms that there is a failure in the process of writing business data into the first storage unit based on the second identifier, so the controller rewrites the business data into another second storage unit, thereby ensuring the successful writing of the business data, avoiding the loss of business data, and improving the reliability of data processing.
[0030] In a possible implementation manner, the controller is further configured to mark the first storage unit as an unreliable storage unit.
[0031] Since there is a failure in the process of writing business data to the first storage unit, the first storage unit needs to be marked to protect or focus on the first storage unit to avoid affecting the reliability of data processing when the first storage unit is subsequently used to execute data processing instructions.
[0032] In one possible implementation, the controller is further used to, after marking the first storage unit as an unreliable storage unit, mark the first storage unit as a damaged storage unit and stop using the first storage unit in response to the number of errors occurring in the first storage unit being greater than or equal to a number threshold.
[0033] When a large number of errors occur in the first storage unit, the first storage unit is no longer used to avoid affecting the reliability of data processing.
[0034] In a possible implementation, the data processing instruction is used to instruct writing of business data, the storage medium is used to store the business data in a non-volatile manner, and the controller is further used to delete the volatile stored business data based on the target identifier.
[0035] Since the controller can confirm that the storage medium has executed the data processing instruction based on the target identifier, that is, the storage medium has stored the business data in a non-volatile manner, the controller can delete the volatile stored business data, that is, delete the cached business data, thereby freeing up volatile storage space and avoiding additional occupation of volatile storage space.
[0036] In a possible implementation, the data processing instruction is used to instruct reading of service data; the storage medium is further used to send the read service data to the controller, where the read service data has a different sending path from the first identifier;
[0037] The controller is further configured to receive the read service data and the first identifier through different transmission paths, and determine the priority of the read service data based on the first identifier;
[0038] In response to the priority of the read business data being higher than the priority of other data currently being processed by the controller, the controller is further configured to interrupt the processing of the other data and process the read business data.
[0039] The controller identifies the priority of the service data based on the first identifier. When the priority of the service data is higher, the service data can interrupt the controller's processing of other data with lower priority. As a result, the controller can process the higher priority service data first, and the data processing flexibility is higher.
[0040] In a possible implementation, the data processing instruction is used to instruct reading of service data, and the controller is further used to execute an error correction process in response to the fault state indicated by the second identifier indicating that a fault exists, so as to restore the service data.
[0041] The controller can promptly identify a faulty data reading process based on the second identifier and execute an error correction process to restore the business data, thereby avoiding errors in the business data and ensuring the reliability of data processing.
[0042] In a second aspect, a data processing method is provided, which is applied to a storage device including a controller, wherein the storage device also includes a storage medium interconnected with the controller. The method includes:
[0043] The controller first sends a data processing instruction to the storage medium and then receives a target identifier from the storage medium. The target identifier is at least one of a first identifier and a second identifier. The first identifier indicates the data processing instruction, and the second identifier indicates a fault state. The second identifier is generated based on the execution of the data processing instruction by the storage medium. The controller then confirms, based on the target identifier, that the storage medium has executed the data processing instruction.
[0044] In a possible implementation, the method further includes: the controller sending a third identifier corresponding to the data processing instruction to the storage medium, where the target identifier is at least one of the third identifier and the second identifier.
[0045] In a possible implementation, the first identifier includes at least one of an identifier of a storage unit and an identifier of a storage medium, the storage unit is at least one of the storage units included in the storage medium, and the storage unit is used for the execution process of the data processing instruction.
[0046] In one possible implementation, a data processing instruction is used to instruct the writing of business data, and the data processing instruction corresponds to a first storage unit. The method also includes: in response to the fault state indicated by the second identifier as a fault, the controller sends an updated data processing instruction to the storage medium, and the updated data processing instruction is used to instruct the writing of business data to the second storage unit. The first storage unit and the second storage unit are different storage units included in the storage medium.
[0047] In a possible implementation manner, the method further includes: the controller marking the first storage unit as an unreliable storage unit.
[0048] In one possible implementation, after the controller marks the first storage unit as an unreliable storage unit, the method further includes: in response to the number of errors occurring in the first storage unit being greater than or equal to a threshold number, the controller marks the first storage unit as a damaged storage unit and stops using the first storage unit.
[0049] In a possible implementation, the data processing instruction is used to instruct writing of business data, the storage medium is used to store the business data in a non-volatile manner, and the method further includes: the controller deleting the volatile stored business data based on the target identifier.
[0050] In one possible implementation, the data processing instruction is used to instruct reading of service data, and the method further includes: a controller receiving the service data read by the storage medium and the first identifier through different transmission paths, and determining the priority of the read service data based on the first identifier;
[0051] In response to the priority of the read service data being higher than the priority of other data currently being processed by the controller, the controller interrupts the processing of the other data and processes the read service data.
[0052] In a possible implementation, the data processing instruction is used to instruct reading of business data, and the method further includes: the controller executes an error correction process in response to the fault state indicated by the second identifier as the presence of a fault, to restore the business data.
[0053] In a third aspect, a data processing method is provided. The method is applied to a storage medium included in a storage device, and the storage device also includes a controller interconnected with the storage medium. The method includes:
[0054] First, a storage medium receives a data processing instruction sent by a controller. Thereafter, the storage medium executes the data processing instruction and sends a target identifier to the controller. The target identifier is at least one of a first identifier and a second identifier, wherein the first identifier indicates the data processing instruction and the second identifier indicates a fault state, and the second identifier is generated based on the execution of the data processing instruction.
[0055] In a possible implementation, the method further includes: the storage medium receives a third identifier corresponding to the data processing instruction sent by the controller, and the target identifier is at least one of the third identifier and the second identifier.
[0056] In a possible implementation, the first identifier includes at least one of an identifier of a storage unit and an identifier of a storage medium, the storage unit is at least one of the storage units included in the storage medium, and the storage unit is used for the execution process of the data processing instruction.
[0057] In a possible implementation, the method further includes: the storage medium acquiring characteristic data during execution of the data processing instruction, comparing the characteristic data with reference data, and generating a second identifier.
[0058] In a possible implementation, the storage medium acquires characteristic data during the execution of the data processing instruction, including: the storage medium acquires characteristic data based on data generated by components included in the storage medium during the execution of the data processing instruction.
[0059] In a possible implementation, the characteristic data includes at least one of current data, voltage data, temperature data, and component attribute data.
[0060] In a possible implementation, the data processing instruction is used to instruct reading of business data, and the storage medium obtains characteristic data during the execution of the data processing instruction, including: the storage medium obtains characteristic data based on the read business data during the execution of the data processing instruction.
[0061] In one possible implementation, a data processing instruction is used to instruct the writing of business data, and the storage medium obtains characteristic data during the execution of the data processing instruction, including: during the execution of the data processing instruction, the storage medium reads the written business data and obtains characteristic data based on the read business data.
[0062] In one possible implementation, in response to the difference between the characteristic data and the reference data being less than or equal to a difference threshold, the fault state indicated by the second identifier is that no fault exists; or, in response to the difference between the characteristic data and the reference data being greater than the difference threshold, the fault state indicated by the second identifier is that a fault exists.
[0063] In one possible implementation, the data processing instruction is used to instruct the reading of business data, and the method also includes: the storage medium sends the read business data to the controller, the sending path of the read business data is different from that of the first identifier, the controller is used to receive the read business data and the first identifier through different sending paths, determine the priority of the read business data based on the first identifier, and in response to the priority of the read business data being higher than the priority of other data currently being processed by the controller, interrupt the processing process of other data and process the read business data. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic diagram of the structure of a storage device provided in an embodiment of the present application;
[0065] Figure 2 A schematic diagram of the structure of another storage device provided in an embodiment of the present application;
[0066] Figure 3 A schematic structural diagram of another storage device provided in an embodiment of the present application;
[0067] Figure 4 A schematic structural diagram of another storage device provided in an embodiment of the present application;
[0068] Figure 5 A schematic structural diagram of another storage device provided in an embodiment of the present application;
[0069] Figure 6 A flowchart of a data processing method provided in an embodiment of the present application;
[0070] Figure 7 A schematic diagram of a process for generating a second identifier provided in an embodiment of the present application;
[0071] Figure 8 A schematic diagram of another process for generating a second identifier provided in an embodiment of the present application;
[0072] Figure 9 A schematic diagram of a process for generating a second identifier according to another embodiment of the present application;
[0073] Figure 10 A schematic diagram of a data reading process in a related technology provided in an embodiment of the present application;
[0074] Figure 11 A schematic diagram of a data reading process provided in an embodiment of the present application;
[0075] Figure 12 A schematic diagram of another data reading process provided in an embodiment of the present application;
[0076] Figure 13A schematic diagram of another data reading process provided in an embodiment of the present application;
[0077] Figure 14 A schematic diagram of another data reading process provided in an embodiment of the present application;
[0078] Figure 15 A schematic diagram of another data reading process provided in an embodiment of the present application;
[0079] Figure 16 A schematic diagram of a data writing process in a related technology provided in an embodiment of the present application;
[0080] Figure 17 A schematic diagram of a data writing process provided in an embodiment of the present application. DETAILED DESCRIPTION
[0081] 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.
[0082] The embodiment of the present application provides a storage device, such as Figure 1 As shown, the storage device includes a controller 101 and a storage medium 102, which are interconnected. The controller 101 is configured to send a data processing instruction to the storage medium 102. The storage medium 102 is configured to execute the data processing instruction and send a target identifier to the controller 101. The controller 101 is further configured to confirm, based on the target identifier, that the storage medium 102 has executed the data processing instruction. The target identifier is at least one of a first identifier and a second identifier. The first identifier is configured to indicate the data processing instruction, and the second identifier is configured to indicate a fault state. The second identifier is generated based on the execution of the data processing instruction.
[0083] The roles played by the controller 101 and the storage medium 102 are described below. Figures 6 to 9 、 Figures 11 to 15 and Figure 17 The corresponding method embodiments will be described in detail. Next, the connection relationship between the multiple components included in the storage medium 102 and some of the multiple components and the controller 101 will be described.
[0084] A storage medium 102 is a logical unit (LUN), which is also called a Die. Figure 2As shown, the storage medium 102 includes a command decoder, at least one volatile storage unit, at least one non-volatile storage unit, a row address decoder, a column address decoder, and an IO circuit interface. A non-volatile storage unit includes at least one minimum operation unit, the column address decoder is also called the address decoder of the minimum operation unit, and the IO circuit interface is also called the IO circuit.
[0085] The instruction decoder is connected to the row address decoder, column address decoder, and IO loop interface, respectively. The row address decoder and column address decoder are also connected to the non-volatile storage unit. The non-volatile storage unit is also connected to the volatile storage unit, which is also connected to the IO loop interface. In addition, the instruction decoder is also connected to the controller 101 to receive data processing instructions sent by the controller 101. The IO loop interface is also connected to the controller 101 to exchange business data corresponding to the data processing instructions with the controller 101.
[0086] Exemplarily, the storage medium 102 further includes a multiplexer (MUX). Accordingly, the column address decoder is connected to at least one minimum operation unit of the non-volatile storage unit via the MUX. For example, see Figure 3 , Figure 3 It shows that the minimum number of operation units included in the non-volatile storage unit is at least two (that is, Figure 3 Wherein the value of N is an integer not less than 1, and the number of minimum operation units is N+1, the column address decoder is respectively connected to at least two minimum operation units through the MUX.
[0087] In some embodiments, the volatile storage unit includes at least one of a centralized volatile storage unit and a distributed volatile storage unit. A centralized volatile storage unit can be connected to all or part of the minimum operation units in the non-volatile storage unit. For example, Figure 3 The volatile storage unit shown is a centralized volatile storage unit. A distributed volatile storage unit can be connected to the minimum operation unit of a non-volatile storage unit. For example, Figure 4The volatile storage unit shown is a distributed volatile storage unit. The embodiments of the present application do not limit the centralized volatile storage unit and the distributed volatile storage unit. For example, the centralized volatile storage unit includes but is not limited to static random access memory (RAM), i.e., SRAM. The distributed volatile storage unit includes but is not limited to page registers.
[0088] For example, at least two decoders among the instruction decoder, the row address decoder, and the address decoder of the minimum operation unit can be integrated into one decoder. For example, the instruction decoder and the address decoder of the minimum operation unit are integrated into one decoder, and the integrated decoder is the instruction and address decoder of the minimum operation unit.
[0089] For example, see Figure 5 The storage medium 102 further includes an on-die comparator. The non-volatile storage unit, the volatile storage unit, and the IO cycle interface are respectively connected to the comparator. In some embodiments, the comparator can be integrated with the volatile storage unit.
[0090] For example, see Figure 5 The storage medium 102 further includes a sensor. The sensor is connected to the comparator and is also connected to the instruction decoder, the row address decoder, the column address decoder, and at least one element in the non-volatile storage unit. In some embodiments, the sensor is a sensing circuit.
[0091] Illustratively, non-volatile storage units include, but are not limited to, storage class memory (SCM), read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Flash memory, for example, is NAND flash memory.
[0092] Exemplarily, in addition to the above-mentioned page registers and SRAM, the volatile memory unit may also include, but is not limited to: dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).
[0093] Above, combined Figures 2 to 5 The plurality of elements included in the storage medium 102 and the connection relationship between some of the plurality of elements and the controller 101 are described.
[0094] It should be understood that Figures 1 to 5 The structures shown are exemplary storage devices. Figures 1 to 5 This does not constitute a limitation on the structure of the storage device. Storage devices with other structures that are applicable to the embodiments of the present application should also be included in the protection scope of the embodiments of the present application.
[0095] The embodiment of the present application provides a data processing method. Figures 1 to 5 Taking the storage device shown in FIG. 1 as an example, the data processing method is implemented through the interaction between the controller 101 and the storage medium 102. Figure 6 As shown, the data processing method includes the following steps 601 to 604.
[0096] Step 601: The controller sends a data processing instruction to a storage medium.
[0097] The data processing instruction sent by the controller to the storage medium is used to instruct the processing of business data, where the business data is the data to be processed. Exemplarily, the data processing instruction includes a storage unit identifier and a processing method identifier. The storage unit identifier indicates that the business data is to be processed using a non-volatile storage unit included in the storage medium. The processing method identifier indicates the processing method corresponding to the business data.
[0098] In some embodiments, the processing mode includes but is not limited to reading, writing, etc., which are not limited here. When the processing mode indicated by the processing mode identifier is reading, the data processing instruction is used to instruct reading business data. In other words, the data processing instruction is a data read instruction. When the processing mode indicated by the processing mode identifier is writing, the data processing instruction is used to instruct writing business data. In other words, the data processing instruction is a data write instruction. Exemplarily, the processing mode identifier is a first numerical value, which is used to indicate that the processing mode is reading, and the processing mode identifier is a second numerical value, which is used to indicate that the processing mode is writing, and the first numerical value is different from the second numerical value. The embodiment of the present application does not limit the first numerical value and the second numerical value, and these numerical values can be set according to experience or actual needs.
[0099] In an exemplary embodiment, the data processing instruction also corresponds to an address, and the controller also sends the address to the storage medium. The address is an address for processing business data. Exemplarily, the address is the storage unit indicated by the above-mentioned storage unit identifier, that is, the address in the non-volatile storage unit. In some embodiments, the controller sends the data processing instruction and the address corresponding to the data processing instruction to the storage medium respectively in different transmission cycles. For example, the data processing instruction is first sent to the storage medium in a transmission cycle, and then the address is sent to the storage medium in other transmission cycles after the transmission cycle. In other embodiments, the address may also be carried in the data processing instruction, and the controller sends the data processing instruction carrying the address to the storage medium in a transmission cycle. In particular, the embodiment of the present application does not limit the duration of the transmission cycle, and the duration of the transmission cycle can be set according to experience or actual needs.
[0100] For example, see Figures 2 to 5 The storage device shown in FIG. 1 includes a storage medium comprising an instruction decoder. Then, the controller sends the data processing instruction and the address to the instruction decoder.
[0101] Step 602: The storage medium executes the data processing instruction.
[0102] After the controller sends a data processing instruction to the storage medium, the storage medium receives the data processing instruction and executes the instruction. Exemplarily, the storage medium executes the data processing instruction by parsing the instruction to obtain a storage unit identifier and a processing method identifier, determining a storage unit to be used for processing the business data based on the storage unit identifier, and determining a processing method based on the processing method identifier, thereby processing the business data in the determined storage unit according to the determined processing method.
[0103] In some embodiments, in addition to receiving the data processing instruction, the storage medium also receives the address sent by the controller. In other embodiments, the data processing instruction carries the address, and the storage medium parses the data processing instruction to obtain the address. Regardless of how the storage medium obtains the address, the storage medium can process the business data in the determined storage unit according to the address and the determined processing method. In the case where the data processing instruction is a data read instruction, the storage medium reads the business data from the address in the determined storage unit. Thereafter, the storage medium sends the read business data to the controller. In the case where the data processing instruction is a data write instruction, the storage medium writes the business data to the address in the determined storage unit. The business data is sent by the controller to the storage medium.
[0104] For example, if the data processing instruction is a data write instruction, the storage medium may not obtain an address, but may randomly select an unoccupied address in the determined storage unit and write the service data using the selected address. Accordingly, the storage medium also sends the selected address to the controller, so that the controller obtains the address for writing the service data.
[0105] For example, see Figures 2 to 5 The storage device shown in the figure has a storage medium comprising multiple elements. Next, an exemplary process of executing data processing instructions by each element in the storage medium is described.
[0106] After the controller sends the data processing instruction and address to the instruction decoder included in the storage medium, the instruction decoder receives the data processing instruction and address, and parses the data processing instruction to obtain the storage unit identifier and the processing mode identifier. Then, the instruction decoder determines the first instruction group and the second instruction group based on the address, storage unit identifier and processing mode identifier. The first instruction group is used for the row address decoder and the column address decoder to enable at least one row of at least one minimum operation unit of the non-volatile storage unit to exchange business data between the non-volatile storage unit and the volatile storage unit. The non-volatile storage unit is the storage unit indicated by the storage unit identifier, and the at least one row of the at least one minimum operation unit is determined based on the address. When exchanging business data, the transmission direction of the business data is determined by the processing mode indicated by the processing mode identifier. The second instruction group is used for exchanging business data between the IO cycle interface and the controller, and for exchanging business data with the volatile storage unit. When exchanging business data, the transmission direction of the business data is also determined by the processing mode indicated by the processing mode identifier.
[0107] Exemplarily, the data processing instruction is a data read instruction. Then, the instruction decoder sends a first instruction group to the row address decoder and the column address decoder, so that the row address decoder and the column address decoder enable at least one row of at least one minimum operation unit in the non-volatile storage unit. Afterwards, the row in the enabled minimum operation unit sends the business data stored in itself to the corresponding volatile storage unit, and the volatile storage unit caches the business data. The instruction decoder also sends a second instruction group to the IO cycle interface, so that the IO cycle interface reads the cached business data from the volatile storage unit, and the IO cycle interface sends the business data to the controller. That is to say, during the data reading process, the transmission direction of the business data is: non-volatile storage unit, volatile storage unit, IO cycle interface and controller.
[0108] Exemplarily, the data processing instruction is a data write instruction. Then, the controller sends the business data to the IO cycle interface, and the instruction decoder sends the second instruction group to the IO cycle interface, so that the IO cycle interface writes the received business data into the cache in the volatile storage unit. Afterwards, the instruction decoder sends the first instruction group to the row address decoder and the column address decoder, so that the row address decoder and the column address decoder enable at least one row of at least one minimum operation unit in the non-volatile storage unit. Then, the row of the enabled minimum operation unit reads the business data from the corresponding volatile storage unit and stores it. That is to say, during the data writing process, the transmission direction of the business data is: controller, IO cycle interface, volatile storage unit and non-volatile storage unit.
[0109] In an exemplary embodiment, the first instruction group includes at least one pair of instructions, each pair of instructions including an instruction for a row address decoder and an instruction for a column address decoder. Each pair of instructions corresponds to an execution cycle, and the execution cycles corresponding to the pairs of instructions occur at different times. In some embodiments, the instruction decoder sends each pair of instructions sequentially in chronological order. After receiving the instructions, the row address decoder and the column address decoder execute the instructions to enable at least one row of at least one minimum operation unit in the non-volatile storage unit. After enabling, business data is read or written. In other embodiments, the instruction decoder directly sends all pairs of instructions. After receiving the instructions, the row address decoder and the column address decoder execute the instructions in chronological order to enable at least one row of at least one minimum operation unit in the non-volatile storage unit. After enabling, business data is read or written. When sending a pair of instructions, the instruction decoder sends the instruction for the row address decoder in the pair to the row address decoder, and sends the instruction for the column address decoder in the pair to the column address decoder.
[0110] In one execution cycle, the column address decoder enables at least one minimum operation unit of the non-volatile storage unit through the MUX, and the row address decoder enables a row, thereby enabling a row of at least one minimum operation unit in the non-volatile storage unit through the cooperation of the column address decoder and the row address decoder. After that, business data can be exchanged between the row of the enabled minimum operation unit and the corresponding volatile storage unit. Then, the execution cycle ends and enters the next execution cycle, which will not be repeated here. Among them, the embodiment of the present application does not limit the duration of an execution cycle. The duration of an execution cycle can be flexibly determined according to the performance of the storage medium, as long as it is ensured that the above-mentioned enabling process and reading (or writing) process can be completed within the duration of an execution cycle.
[0111] For example, see Figure 3 and Figure 4 , an example is given in which it is necessary to enable the 0th and 1st rows of the minimum operation unit 0 and the 0th and 1st rows of the minimum operation unit N in the non-volatile storage medium.
[0112] In the first execution cycle, the instruction decoder sends the first pair of instructions to the row address decoder and the column address decoder. The column address decoder enables the minimum operation unit 0 and the minimum operation unit N through the MUX, and the row address decoder enables row 0. Thus, through the cooperation of the column address decoder and the row address decoder, the row 0 of the minimum operation unit 0 and the row 0 of the minimum operation unit N are enabled, so that business data can be exchanged between the enabled row 0 of the minimum operation unit 0 and the row 0 of the minimum operation unit N and the corresponding volatile storage unit. Figure 3 , the minimum operation unit 0 and the minimum operation unit N both correspond to volatile storage units. Figure 4 , the minimum operation unit 0 corresponds to the volatile storage unit 0, and the minimum operation unit N corresponds to the volatile storage unit N.
[0113] During the second execution cycle, the instruction decoder sends a second pair of instructions to the row address decoder and column address decoder. The column address decoder then enables minimum operation unit 0 and minimum operation unit N through the MUX, and the row address decoder enables row 1. Thus, through the cooperation of the column address decoder and the row address decoder, the first row of minimum operation unit 0 and the first row of minimum operation unit N are enabled, so that business data can be exchanged between the enabled first row of minimum operation unit 0 and the first row of minimum operation unit N and the corresponding volatile storage units. The volatile storage units corresponding to minimum operation unit 0 and minimum operation unit N are described above and will not be repeated here.
[0114] In step 603, the storage medium sends a target identifier to the controller. The target identifier is at least one of a first identifier and a second identifier. The first identifier is used to indicate a data processing instruction, and the second identifier is used to indicate a fault state. The second identifier is generated based on the execution process of the data processing instruction.
[0115] Wherein, after executing the data processing instruction, or in other words, after the storage medium has completed executing the data processing instruction, the storage medium sends a target identifier to the controller, and the target identifier is at least one of the first identifier and the second identifier. The first identifier is used to indicate the data processing instruction, and the data processing instruction indicated by the first identifier is the data processing instruction that has been executed by the storage medium. The second identifier is used to indicate a fault state, and the fault state includes the presence of a fault (i.e., abnormal) or the absence of a fault (i.e., normal). The second identifier is generated based on the execution process of the data processing instruction. For example, although the second identifier is generated based on the execution process of the data processing instruction, the second identifier itself is only used to indicate a fault state, and is not used to indicate which data processing instruction corresponds to the fault state.
[0116] In some embodiments, the data processing instruction is a data read instruction. According to the description in step 602, the storage medium needs to send the read business data to the controller. Therefore, the storage medium sends the read business data and the target identifier to the controller. Exemplarily, at least one signal line is included between the storage medium and the controller, and the business data and the target identifier can be sent through different signal lines or through the same signal line. For the case of sending through different signal lines, if the target identifier includes a first identifier and a second identifier, the business data, the first identifier, and the second identifier can be sent through three different signal lines respectively, or the business data and the first identifier can be sent through one signal line and the second identifier can be sent through another signal line, or the business data and the second identifier can be sent through one signal line and the first identifier can be sent through another signal line.
[0117] In other embodiments, the data processing instruction is a data write instruction, and the storage medium only sends the target identifier to the controller, and does not send business data to the controller. Exemplarily, at least one signal line is included between the storage medium and the controller. If the target identifier includes only the first identifier or only the second identifier, the target identifier can be sent via a single signal line. If the target identifier includes the first identifier and the second identifier, the first identifier and the second identifier can be sent via different signal lines or the same signal line.
[0118] Exemplarily, for a case where at least two objects among the business data, the first identifier, and the second identifier are sent through the same signal line, it is necessary to specify the order in which they are sent through the same signal line so that the controller can identify each object in this order after receiving them. That is to say, the storage medium sends at least two objects among the business data, the first identifier, and the second identifier to the controller through the same signal line in a certain sending order. The sending order can be set based on experience or actual needs, and is not limited here, as long as the storage medium and the controller can support the sending order. Taking the case where the business data, the first identifier, and the second identifier are all sent through the same signal line as an example, the storage medium sends the first identifier, the second identifier, and the business data to the controller in sequence. Accordingly, after receiving them, the controller identifies the first identifier, the second identifier, and the business data in sequence.
[0119] Exemplarily, in the case where at least two objects among the business data, the first identifier and the second identifier are sent through different signal lines, they need to be sent within the same transmission cycle so that the controller can identify the correspondence between the different objects after receiving them. That is, the storage medium sends at least two objects among the business data, the first identifier and the second identifier to the controller through different signal lines within the same transmission cycle, and the controller identifies the objects received within the same transmission cycle as corresponding objects. Taking the case where the business data, the first identifier and the second identifier are sent through different signal lines respectively as an example, the storage medium sends the business data, the first identifier and the second identifier to the controller within the same transmission cycle. Accordingly, after the controller receives the business data, the first identifier and the second identifier within the same transmission cycle, it identifies that the business data, the first identifier and the second identifier are corresponding to each other.
[0120] The process of the controller sending data processing instructions to the storage medium and the process of the controller and the storage medium exchanging business data have been described in step 602 above and will not be repeated here. Figures 2 to 5 The storage device shown in FIG. 1 is configured such that the first identifier is sent by the instruction decoder to the IO cycle interface so that when the target identifier includes the first identifier, the IO cycle interface sends the first identifier to the controller. Figure 5 In the storage device shown, the second identifier is generated by the comparator and sent to the IO cycle interface, so that when the target identifier includes the second identifier, the IO cycle interface sends the second identifier to the controller. In addition, the signal lines in the above description are signal lines included in the IO cycle interface.
[0121] Next, the first identifier and the second identifier are described in sequence.
[0122] In an exemplary embodiment, the first identifier includes but is not limited to the following two types.
[0123] In type 1, the first identifier is a third identifier corresponding to the data processing instruction, and the third identifier is sent by the controller to the storage medium. That is, the method further includes: the controller sending the third identifier corresponding to the data processing instruction to the storage medium, and the storage medium receiving the third identifier corresponding to the data processing instruction, and the target identifier is at least one of the third identifier and the second identifier.
[0124] Among them, the third identifier can be generated by the controller, or the third identifier is obtained by the controller through other means, which is not limited here. The controller stores a first correspondence between the third identifier and the data processing instruction, and the first correspondence is used for the controller to identify the corresponding data processing instruction based on the received third identifier, as described in step 604 below. For example, the controller sends the data processing instruction and the third identifier to the storage medium respectively in different transmission cycles. Alternatively, the third identifier is carried in the data processing instruction, and the controller sends the data processing instruction carrying the third identifier to the storage medium in one transmission cycle. In some embodiments, for the case where the controller sends the data processing instruction, the address and the third identifier to the storage medium, the controller can send the data processing instruction to the storage medium in one transmission cycle, and send the address and the third identifier to the storage medium in the next transmission cycle adjacent to the transmission cycle.
[0125] For example, see Figures 2 to 5 In the storage device shown, the controller sends the third identifier to the instruction decoder. After receiving the third identifier, the instruction decoder sends the third identifier to the IO cycle interface. The third identifier is the first identifier for indicating the data processing instruction. Therefore, when the target identifier includes the first identifier, the IO cycle interface can send the third identifier to the controller.
[0126] Type 2: The first identifier includes at least one of an identifier of a storage unit and an identifier of a storage medium. The storage unit is at least one of the storage units included in the storage medium. The storage unit is used for the execution process of the data processing instruction.
[0127] Unlike Type 1, in Type 2, the first identifier is no longer sent by the controller to the storage medium. Instead, it is generated by the storage medium itself based on the execution of the data processing instruction. The first identifier includes at least one of an identifier of a storage unit used during the execution of the data processing instruction and an identifier of the storage medium. The storage unit is the storage unit used during the execution of the data processing instruction, and the storage medium is the storage medium that receives and executes the data processing instruction.
[0128] In type two, before sending the data processing instruction to the storage medium, the controller determines the storage medium used to execute the data processing instruction and the storage unit included in the storage medium, uses at least one of the determined identification of the storage medium and the identification of the storage unit as a reference identification, and stores a second correspondence between the reference identification and the data processing instruction. The second correspondence is used by the controller to identify the corresponding data processing instruction based on the received first identification. See the description in step 604 below for details. In some embodiments, the identification type included in the reference identification is the same as the identification type included in the first identification, and the identification type includes the identification of the above-mentioned storage unit and the identification of the storage medium. For example, if the first identification includes the identification of the storage unit and the identification of the storage medium, then the reference identification also includes the identification of the storage unit and the identification of the storage medium. In other embodiments, the identification type included in the reference identification includes the identification type included in the first identification, and also includes the identification type not included in the first identification. For example, the first identification only includes the identification of the storage unit, while the reference identification includes the identification of the storage unit and the identification of the storage medium. In the embodiment of the present application, the identification type included in the reference identification and the identification type included in the first identification can be obtained through negotiation between the controller and the storage medium, or the reference identification can be set by default, which is not limited here.
[0129] See also Figures 2 to 5 In the storage device shown, the instruction decoder determines the storage unit used during the execution of the data processing instruction, and uses at least one of the identifier of the storage unit and the identifier of the storage medium where the instruction decoder is located as a first identifier. The instruction decoder then sends the generated first identifier to the IO cycle interface. Thus, when the target identifier includes the first identifier, the IO cycle interface can send the first identifier to the controller.
[0130] In an exemplary embodiment, the second identifier is generated by the storage medium based on the execution of the data processing instruction. Therefore, the method further includes: the storage medium obtains characteristic data during the execution of the data processing instruction, compares the characteristic data with the reference data, and generates the second identifier.
[0131] Since the characteristic data is acquired during the execution of the data processing instruction, the characteristic data can represent the execution process of the data processing instruction in the form of data. Therefore, by comparing the characteristic data with the reference data, it is possible to determine whether there is a fault in the execution process of the data processing instruction, thereby generating a second identifier indicating the fault state.
[0132] In an exemplary embodiment, in response to the difference between the characteristic data and the reference data being less than or equal to the difference threshold, the fault state indicated by the second identifier is that there is no fault. Alternatively, in response to the difference between the characteristic data and the reference data being greater than the difference threshold, the fault state indicated by the second identifier is that there is a fault. In some embodiments, the difference threshold is zero. If the characteristic data is exactly the same as the reference data, the fault state indicated by the second identifier is that there is no fault; if the characteristic data is not exactly the same as the reference data, the fault state indicated by the second identifier is that there is a fault. In other embodiments, the difference threshold is not zero. If the characteristic data is close enough to the reference data, the fault state indicated by the second identifier is that there is no fault; if the characteristic data is significantly different from the reference data, the fault state indicated by the second identifier is that there is a fault. In the embodiment of the present application, the difference threshold is not limited.
[0133] In some embodiments, the storage medium acquires characteristic data only once during the execution of the data processing instruction, and if the difference between the characteristic data and the reference data is greater than the difference threshold, a second identifier for indicating the presence of a fault is directly generated. In other embodiments, the storage medium acquires characteristic data at least twice during the execution of the data processing instruction, and if the difference between the characteristic data acquired for the first time and the reference data is greater than the difference threshold, the data processing instruction is repeatedly executed at least once, and the characteristic data is reacquired during each re-execution, and the reacquired characteristic data is compared with the reference data. If the number of times the data processing instruction is repeatedly executed reaches the repetition threshold, and the difference between the characteristic data reacquired each time and the reference data is greater than the difference threshold, a second identifier for indicating the presence of a fault is generated again. If the difference between the characteristic data reacquired and the reference data is less than or equal to the difference threshold before the number of times the data processing instruction is repeatedly executed reaches the repetition threshold, a second identifier for indicating the presence of a fault is no longer generated, but a second identifier for indicating the absence of a fault is generated. The embodiment of the present application does not limit the repetition threshold, and the repetition threshold can be set based on experience or actual needs.
[0134] Exemplarily, the execution mode adopted when repeatedly executing the data processing instruction is different from the execution mode when the data processing instruction is executed for the first time. In some embodiments, if the parameters adopted when executing the data processing instruction are different, it is considered that the execution modes are different. For example, if the first parameter is adopted when the data processing instruction is executed for the first time, the second parameter may be adopted when the data processing instruction is repeatedly executed. When the number of times the data processing instruction is repeatedly executed is at least twice, the execution mode adopted each time the data processing is repeated is the same or different. For example, the first parameter is adopted when the data processing instruction is executed for the first time, the second parameter may be adopted when the data processing instruction is repeated for the first time, and the third parameter may be adopted when the data processing is repeated for the second time. Exemplarily, the first parameter, the second parameter and the third parameter include current parameters, voltage parameters, etc., which can be determined based on experience and are not limited here.
[0135] Exemplarily, the reference data is cached in a volatile storage unit. The volatile storage unit may be a storage unit connected to a non-volatile storage unit, such as Figure 5 The volatile storage unit shown is used to cache both reference data and service data during the execution of data processing instructions. Alternatively, the volatile storage unit may be another dedicated storage unit for caching reference data, in which case the volatile storage unit is not used to cache service data.
[0136] In an exemplary embodiment, the storage medium obtains characteristic data during the execution of the data processing instruction, including but not limited to the following three methods.
[0137] Acquisition method 1 is applicable when a data processing instruction is used to instruct the reading or writing of business data. Specifically, it is used to determine whether a fault exists during the data reading or writing process. During the execution of the data processing instruction, the storage medium acquires characteristic data based on data generated by components included in the storage medium.
[0138] According to the description of executing the data processing instruction on the storage medium in step 602, during the execution of the data processing instruction, the components included in the storage medium will perform parsing (for example, the instruction decoder parses the data processing instruction), enabling (for example, the row address decoder and the column address decoder enable the storage unit) and other processes. Therefore, the components included in the storage medium will generate data. Exemplarily, the characteristic data is the data generated by the components included in the storage medium. Alternatively, the data generated by the components included in the storage medium are processed according to the first processing method to obtain the characteristic data. In some embodiments, the first processing method includes but is not limited to screening, calculation, etc., which are not limited here.
[0139] In an exemplary embodiment, the characteristic data includes at least one of current data, voltage data, temperature data and component attribute data. Exemplarily, the current data includes but is not limited to at least one of the current magnitude (i.e., current effective value), the amplitude of the current pulse (i.e., current peak value), the pulse width of the current pulse and the leakage current. Exemplarily, the voltage data includes but is not limited to at least one of the voltage magnitude (i.e., voltage effective value), the amplitude of the voltage pulse (i.e., voltage peak value), and the pulse width of the voltage pulse. Exemplarily, the component attribute data is component-specific attribute data. If the components are different, the component attribute data may also be different, and the component attribute data is not limited here. Of course, the above characteristic data are only examples, and the embodiments of the present application do not limit the characteristic data.
[0140] It should be understood that the baseline data matches the characteristic data, or in other words, the baseline data and the characteristic data belong to the same type of data. For example, if the characteristic data includes leakage current and component attribute data, then the baseline data includes the leakage current of the baseline and the component attribute data of the baseline. For another example, if the characteristic data is temperature data, then the baseline data is the temperature data of the baseline. In some embodiments, the difference threshold may be a quantity threshold. If the number of data in the characteristic data that is different from the baseline data is less than or equal to the quantity threshold, a second identifier is generated to indicate that there is no fault. If the number of data in the characteristic data that is different from the baseline data is greater than the data threshold, a second identifier is generated to indicate that there is a fault.
[0141] See also Figure 5 The storage device shown, the storage medium includes a sensor, the sensor detects the data generated by each element included in the storage medium, and sends the detected data to the comparator. Afterwards, the comparator obtains characteristic data based on the data detected by the sensor, and the comparator also obtains reference data from the volatile storage unit. Then, the comparator compares the characteristic data and the reference data, generates a second identifier and sends it to the IO cycle interface. Exemplarily, the reference data can be stored in the volatile storage unit in the form of an exception table, and the exception table can be generated during the production process of the storage medium.
[0142] For example, see Figure 7 , Figure 7 A schematic diagram of a process for generating a second identifier is shown. On one hand, business data is exchanged between the minimum operation unit 0 of the non-volatile storage unit, page register 0, and the IO loop interface. On the other hand, the comparator uses the data detected by the sensor as feature data and retrieves the anomaly table from the SRAM as reference data. By comparing the feature data with the reference data, the comparator generates a second identifier and sends the second identifier to the IO loop interface.
[0143] Acquisition method 2 is applicable to the case where the data processing instruction is used to instruct the reading of business data, that is, it is used to determine whether there is a fault in the data reading process. In this case, the storage medium obtains feature data based on the read business data during the execution of the data processing instruction.
[0144] Because the data processing instruction is used to instruct the reading of business data, the storage medium executes the data processing instruction to read the business data, thereby obtaining feature data based on the read business data. Exemplarily, the feature data is the read business data. Alternatively, the read business data is processed according to the second processing method to obtain the feature data. In some embodiments, the second processing method includes extracting a check digit, performing calculations, etc., which are not limited herein.
[0145] For example, when the second processing method is to extract the check bit, the characteristic data is the check bit extracted from the read business data, and the check bit is written into the storage medium together with the business data. The reference data is an odd number or an even number. In some embodiments, the difference threshold can be zero. If the number of check bits is the same as the reference data, it means that the difference between the characteristic data and the reference data is equal to the difference threshold, and a second identifier is generated to indicate that there is no fault. If the number of check bits is different from the reference data, it means that the difference between the characteristic data and the reference data is greater than the difference threshold, and a second identifier is generated to indicate that there is a fault. For example, taking the reference data as an odd number as an example, if the number of check bits is also an odd number, the number of check bits is the same as the reference data. If the number of check bits is an even number, the number of check bits is different from the reference data. This method is also called parity check.
[0146] See also Figure 5 As can be seen from the description in step 602, during the data reading process, the data stored in the non-volatile storage unit is written to the cache in the volatile storage unit. The comparator then reads the business data from the volatile storage unit and obtains feature data based on the read business data. The comparator also obtains reference data from the volatile storage unit. Next, the comparator compares the feature data with the reference data, generates a second identifier, and sends it to the IO loop interface.
[0147] For example, see Figure 8 , Figure 8A flow chart of generating a second identifier is shown. On the one hand, the minimum operation unit 0 of the non-volatile storage unit writes the business data into the page register 0 cache, and the IO cycle interface reads the business data from the page register 0. On the other hand, the comparator obtains the cached business data from the page register 0 and extracts the check bit, and uses the check bit as the characteristic data. The comparator also obtains an odd number or an even number from the SRAM as the reference data, compares the characteristic data and the reference data (i.e., the comparator performs a parity check) to generate a second identifier, and sends the second identifier to the IO cycle interface.
[0148] Acquisition method three applies to situations where a data processing instruction instructs the writing of business data. This method is used to determine whether a fault exists during the data writing process. During the execution of the data processing instruction, the storage medium reads the written business data and acquires the feature data based on the read business data.
[0149] Because the data processing instruction instructs the writing of business data, the storage medium executes the data processing instruction, thereby writing the business data to the storage medium. Subsequently, the written business data is read, thereby obtaining feature data based on the read business data. Exemplarily, the feature data is the read business data. Alternatively, the read business data is processed according to a third processing method to obtain the feature data. In some embodiments, the third processing method includes calculation, which is not limited here.
[0150] In addition, the reference data matches the characteristic data. Exemplarily, the reference data is data to be written that the storage medium receives from the controller. Exemplarily, the difference threshold can be a specified bit greater than or equal to zero. When the difference between the characteristic data and the reference data is less than or equal to the specified bit, a second identifier is generated to indicate that a fault does not exist. When the difference between the characteristic data and the reference data is greater than the specified bit, a second identifier is generated to indicate that a fault exists.
[0151] In some embodiments, the difference between the moment when the business data is written to the storage medium and the moment when the written business data is read should be less than or equal to the time threshold. That is, after the business data is written to the storage medium, the written business data is read within a relatively short time. In this way, the impact on the written business data caused by changes in the properties of the storage medium itself can be avoided, and the read business data is guaranteed to be the same as the written business data. Since the characteristic data is obtained based on the read business data, when the read business data is the same as the written business data, the use of the characteristic data to determine whether there is a fault in the data writing process has a higher accuracy. Among them, the embodiment of the present application does not limit the time threshold, and the time threshold can be set according to experience or actual needs.
[0152] See also Figure 5 The storage device shown, according to the description in step 602, during the data writing process, the IO cycle interface writes the business data into the volatile storage unit cache, and the non-volatile storage unit then reads the cached business data from the volatile storage unit and stores it. The comparator then reads the stored business data from the non-volatile storage unit and obtains feature data based on the read business data. The comparator also reads the cached business data from the volatile storage unit as reference data. Afterwards, the comparator compares the feature data and the reference data, generates and sends a second identifier to the IO cycle interface.
[0153] For example, see Figure 9 , Figure 9 A schematic diagram of a process for generating a second identifier is shown. On the one hand, the IO cycle interface writes business data into the cache of page register 0, and the minimum operation unit 0 of the non-volatile storage unit reads the business data from page register 0 and stores it. On the other hand, the comparator uses the business data read from the minimum operation unit 0 of the non-volatile storage unit as characteristic data and reads the cached business data from page register 0 as reference data, thereby comparing the characteristic data and the reference data to generate a second identifier, which is then sent to the IO cycle interface.
[0154] It should be noted that the above acquisition method one can be combined with acquisition method two or acquisition method three. For example, in the case where the data processing instruction is a data read instruction, a second identifier can be generated by acquisition method one and acquisition method two. For example, if the difference between the characteristic data obtained by acquisition method one and the reference data is less than the difference threshold, and / or the difference between the characteristic data obtained by acquisition method two and the reference data is less than the difference threshold, then a second identifier is generated to indicate that there is no fault. For another example, in the case where the data processing instruction is a data write instruction, a second identifier can be generated by acquisition method one and acquisition method three. For example, if the difference between the characteristic data obtained by acquisition method one and the reference data is less than the difference threshold, and / or the difference between the characteristic data obtained by acquisition method three and the reference data is less than the difference threshold, then a second identifier is generated to indicate that there is no fault.
[0155] The first identifier and the second identifier are described above. The above description is for example only and does not limit the first identifier and the second identifier. Regardless of which first identifier and second identifier the storage medium uses, the target identifier can be obtained, and the storage medium will send the target identifier to the controller after executing the data processing instruction. If the controller only sends one data processing instruction to the storage medium, the storage medium only sends one target identifier corresponding to the data processing instruction to the controller. If the controller sends more than two data processing instructions to the storage medium, the storage medium sends the target identifier corresponding to each data processing instruction to the controller respectively.
[0156] Step 604: The controller confirms, based on the target identifier, that the storage medium has executed the data processing instruction.
[0157] After the storage medium sends the target identifier to the controller, the controller receives the target identifier, which is at least one of the first identifier and the second identifier. Based on the target identifier, the controller can confirm the data processing instruction corresponding to the target identifier, thereby confirming that the storage medium has executed the data processing instruction corresponding to the target identifier.
[0158] Among them, when the target identifier only includes the first identifier, since the first identifier itself is used to indicate the data processing instruction, the controller can determine the data processing instruction corresponding to the first identifier. In some embodiments, the type of the first identifier is type one described in step 603 above, the first identifier is the third identifier sent by the controller to the storage medium, and the controller stores a first correspondence between the third identifier and the data processing instruction. Then, the controller queries the first correspondence based on the received first identifier to confirm the data processing instruction corresponding to the first identifier. In other embodiments, the type of the first identifier is type two described in step 603 above, the first identifier includes at least one identifier of the storage unit identifier and the storage medium identifier, and the controller stores a second correspondence between the reference identifier and the data processing instruction. Then, the controller queries the second correspondence based on the received first identifier, and takes the data processing instruction corresponding to the hit reference identifier as the data processing instruction corresponding to the first identifier, thereby confirming the data processing instruction corresponding to the first identifier.
[0159] Alternatively, for example, when the target identifier only includes the second identifier, since the second identifier itself is only used to indicate a fault state, and is not used to indicate which data processing instruction corresponds to the fault state, when the controller only sends one data processing instruction to the storage medium, that is, when the storage medium only returns one target identifier to the controller, the controller can confirm the data processing instruction corresponding to the second identifier based on the second identifier, and the data processing instruction corresponding to the second identifier is also a data processing instruction sent by the controller.
[0160] It should be understood that if it is necessary to send at least two data processing instructions to the storage medium by the controller, that is, when the storage medium returns at least two target identifiers to the controller, the controller can also identify the data processing instructions corresponding to each target identifier. Then the target identifier can include only the first identifier, or the target identifier can include the first identifier and the second identifier. Then the controller can identify the data processing instructions corresponding to each target identifier based on the first identifier in accordance with the above description, and no further details will be given here.
[0161] In the related art, after the controller sends a data processing instruction to the storage medium, the controller waits for a fixed period of time, which means that the storage medium has executed the data processing instruction by default. However, the actual time taken by the storage medium to execute the data processing instruction may be less than or greater than the fixed period of time. If the actual time taken is less than the fixed period of time, the controller has waited for an unnecessary period of time, resulting in low data processing efficiency. If the actual time taken is greater than the fixed period of time, after the controller waits for a fixed period of time and assumes that the storage medium has executed the data processing instruction, the storage medium has not yet executed or has not yet completed executing the data processing instruction, resulting in low data processing reliability. This shows that the data processing process of the related art is not flexible enough.
[0162] Compared to the related art, in the embodiment of the present application, the storage medium returns a target identifier to the controller after executing the data processing instruction, and the controller confirms that the storage medium has executed the data processing instruction based on the target identifier. That is, when the controller receives the target identifier, it can confirm that the storage medium has completed the data processing instruction. If the actual time consumption is less than the above-mentioned fixed time length, the controller will receive the target identifier before waiting for the fixed time length, and the controller does not need to continue to wait for an extra time length, and can confirm that the storage medium has completed the data processing instruction based on the target identifier, thereby improving data processing efficiency. If the actual time consumption is greater than the above-mentioned fixed time length, the controller will also confirm that the storage medium has completed the data processing instruction after receiving the data processing instruction, avoiding the situation where the storage medium has not yet executed or has not yet completed the data processing instruction, thereby improving the reliability of data processing. It can be seen that the data processing method provided by the embodiment of the present application is more flexible.
[0163] In an exemplary embodiment, the data processing instruction is used to instruct the writing of business data, and the storage medium is used to perform non-volatile storage of the business data, that is, the storage medium uses a non-volatile storage unit to store the business data. The method also includes: the controller deletes the volatile stored business data based on the target identifier. In particular, since the controller confirms that the storage medium has executed the data processing instruction after receiving the target identifier, the storage medium has performed non-volatile storage of the business data for the controller, and it is no longer necessary to perform volatile storage of the business data. Therefore, the controller can delete the volatile stored business data based on the target identifier, that is, the business data is no longer cached through the volatile storage unit included in the storage medium. As a result, the storage space of the volatile storage unit is released, and redundant occupation of the storage space is avoided.
[0164] It should be noted that, in addition to being used by the controller to confirm that the storage medium has executed the data processing instruction, the first identifier and the second identifier also have other functions, which are described below.
[0165] For the first identifier, when the controller sends multiple data processing instructions for instructing to read business data, that is, when multiple data read instructions are sent, the storage medium can send the first identifier and the read business data corresponding to each other to the controller, and the controller can determine which data read instruction the received business data corresponds to based on the first identifier. Therefore, no matter in what order the controller sends multiple data read instructions, no matter when and in what order the storage medium sends the read business data to the controller, the controller can identify the data read instruction corresponding to the received business data. Therefore, the controller does not need to plan the order in which to send multiple data read instructions, nor does it need to command the storage medium to return the read business data at a specified time and in a specified order, thereby simplifying the design complexity of the controller. Moreover, since the storage medium does not need to return the read business data at a specified time and in a specified order, the storage medium does not need to accurately control the time taken to execute each data read instruction, that is, the storage medium does not need to ensure delay consistency within the life cycle. This delay consistency includes the delay consistency of a storage medium itself and the delay consistency between different storage media.
[0166] In an exemplary embodiment, the data processing instruction is used to instruct the reading of business data. The method further includes: the storage medium sends the read business data to the controller, where the read business data and the first identifier are sent via different paths. The controller receives the read business data and the first identifier via different transmission paths, and determines the priority of the read business data based on the first identifier. In response to the priority of the read business data being higher than the priority of other data currently being processed by the controller, the controller is further configured to interrupt the processing of the other data and process the read business data.
[0167] That is to say, the storage medium sends the read business data and the first identifier to the controller respectively through different signal lines. If the storage medium also sends the second identifier, the signal line used to send the second identifier is not limited. After the controller receives the business data and the first identifier through different signal lines, it can determine the priority of the business data based on the first identifier. When the priority of the business data is higher than the priority of other data currently processed by the controller, the controller can interrupt the processing of other data and give priority to the read business data. Exemplarily, after the read business data has been processed, the controller resumes the processing of other data. For example, the controller interrupts the process of sending other data to the processor and gives priority to sending the read business data to the processor. After the read business data has been successfully sent to the processor, the controller continues to send the other data to the processor.
[0168] In some embodiments, the type of the first identifier is type 1 described in step 603 above, the first identifier is the third identifier sent by the controller to the storage medium, and the controller stores a first correspondence between the third identifier and the data processing instruction. Based on the first identifier, the controller may use the priority of the data processing instruction corresponding to the first identifier as the priority of the read business data. The priority of the data processing instruction may be set by the controller or determined by the controller through other means, which are not limited herein.
[0169] In other embodiments, the first identifier is of type 2 described in step 603 above, and the first identifier includes at least one of an identifier of a storage unit and an identifier of a storage medium. The controller may use at least one of the priority of the storage unit and the priority of the storage medium as the priority of the read service data. The priority of the storage unit and the priority of the storage medium can be flexibly set based on actual needs and are not limited here.
[0170] As for the second identifier, since the second identifier is used to indicate a fault state, the controller can determine whether the data processing instruction has a fault based on the second identifier. If the data processing instruction does not have a fault, the controller can continue to perform other operations. For example, in a case where the data processing instruction is used to indicate the writing of business data, and the storage medium is used to perform non-volatile storage of the business data, if the second identifier indicates that the data processing instruction does not have a fault, the controller can confirm that the storage medium has safely performed non-volatile storage of the business data, thereby deleting the volatile stored business data. If the data processing instruction has a fault, the controller can take corresponding measures in a timely manner to avoid errors or losses in the business data, thereby ensuring the reliability of the data processing process.
[0171] In some embodiments, the data processing instruction is used to instruct the reading of business data. The method further includes: the controller, in response to the fault status indicated by the second identifier being a fault, executing an error correction process to restore the business data. Since the fault status indicated by the second identifier is a fault, the controller can determine that a fault exists in the reading process of the business data. Therefore, it is necessary to execute an error correction process to restore the business data. This avoids errors in the business data and ensures the reliability of the data processing process.
[0172] Illustratively, the error correction process includes, but is not limited to, error checking and correcting (ECC) encoding and other methods. The embodiments of the present application do not limit the error correction process.
[0173] In other embodiments, the data processing instruction is used to instruct the writing of business data, and the data processing instruction corresponds to the first storage unit, or in other words, the address corresponding to the data processing instruction is an address in the first storage unit. Therefore, the storage medium writes the business data to the first storage unit according to the data processing instruction. Accordingly, the method further includes: the controller sends an updated data processing instruction to the storage medium in response to the fault state indicated by the second identifier being a fault, the updated data processing instruction being used to instruct the writing of business data to the second storage unit, the first storage unit and the second storage unit being different storage units included in the storage medium. The storage medium executes the updated data processing instruction.
[0174] That is to say, when the fault state indicated by the second identifier is that there is a fault, the controller can confirm that there is a fault in the data writing process. The controller does not need to wait for the next time to read the data written this time to confirm that there is a fault in the data writing process. Therefore, the controller updates the storage unit used to store business data from the first storage unit to a different second storage unit. Among them, the controller instructs the storage medium to write the business data to the second storage unit by sending an updated data processing instruction to the storage medium. As a result, the business data can be safely stored in the second storage unit, avoiding the loss of business data and ensuring the reliability of data processing. In addition, the way the controller sends the updated data processing instruction to the storage medium can be found in the description of steps 601 and 603. The way the storage medium executes the updated data processing instruction can be found in the way the storage medium executes the data processing instruction described in step 602. No further details will be given here.
[0175] In some embodiments, the controller further updates an address mapping relationship, where the address mapping relationship includes a mapping relationship between business data and an address. Prior to the controller performing the update, the address mapping relationship includes a mapping relationship between the business data and the address of the first storage unit. After the controller performs the update, the address mapping relationship includes a mapping relationship between the business data and the address of the second storage unit.
[0176] In an exemplary embodiment, the controller is further configured to mark the first storage unit as an unreliable storage unit. It should be noted that marking the first storage unit as an unreliable storage unit does not necessarily mean that the first storage unit will no longer be used. Instead, the first storage unit can continue to be used after marking, thereby avoiding wasting storage space in the storage medium (i.e., the storage space corresponding to the first storage unit).
[0177] In some embodiments, the controller stores a third correspondence between each storage unit included in the storage medium and its state. Before the controller receives a second identifier indicating a fault, each storage unit corresponds to a reliable state. After the controller receives the second identifier indicating a fault, the state of the storage unit used to execute the data processing instruction corresponding to the second identifier, i.e., the state of the first storage unit, is updated from a reliable state to an unreliable state in the third correspondence, thereby marking the first storage unit as an unreliable storage unit.
[0178] Furthermore, illustratively, the method further includes: the controller protecting the first storage unit marked as an unreliable storage unit. For example, the protection method includes, but is not limited to, at least one of mirror protection, enhanced ECC coding protection, and multi-level ECC coding protection. The protection method is not limited herein.
[0179] In an exemplary embodiment, the method further includes: after the controller marks the first storage unit as an unreliable storage unit, in response to the number of errors occurring in the first storage unit being greater than or equal to a number threshold, marking the first storage unit as a damaged storage unit and stopping use of the first storage unit. If the unreliable first storage unit has a high number of errors, continued use of the first storage unit may affect the security of business data, and thus the controller stops use of the first storage unit. This embodiment of the present application does not limit the number threshold.
[0180] In some embodiments, when the controller stores the above-mentioned third correspondence, in response to the number of errors occurring in the first storage unit being greater than or equal to a threshold number, the controller can update the state of the first storage unit from an unreliable state to a damaged state in the third correspondence to mark the first storage unit as a damaged storage unit.
[0181] It should be understood that the above unreliable state and damaged state are only examples. For example, the controller can also mark the first storage unit as a plurality of other states based on the number of errors that occur in the first storage unit. Each state can correspond to a different measure. The other multiple states and corresponding measures are not limited here.
[0182] In summary, in the embodiments of the present application, after the storage medium executes the data processing instruction sent by the controller, it returns a target identifier to the controller. The controller can then confirm that the storage medium has executed the data processing instruction after receiving the target identifier. Therefore, the controller does not need to wait for a fixed period of time before assuming that the storage medium has executed the data processing instruction, thereby balancing the efficiency and reliability of the data processing process and increasing the flexibility of the data processing process.
[0183] The target identifier is at least one of a first identifier and a second identifier, the first identifier is used to indicate a data processing instruction, and the second identifier is used to indicate a fault state. When the number of data processing instructions is one, the target identifier is only the first identifier, or only the second identifier, or both the first identifier and the second identifier, and the controller can identify the data processing instruction executed by the storage medium based on the target identifier. When the number of data processing instructions is at least two, the target identifier is only the first identifier, or both the first identifier and the second identifier, and the controller can identify the data processing instruction executed by the storage medium based on the target identifier.
[0184] Moreover, for the first identifier, in addition to being used by the controller to confirm that the storage medium has executed the data processing instruction, it can also be used by the controller to identify the data reading instruction corresponding to the business data returned by the storage medium when the data processing instruction is a data reading instruction. Therefore, the controller does not need to plan the order in which the data reading instructions are sent, nor does it need to command the storage medium to return the business data at a specified time and in a specified order, thereby simplifying the design complexity of the controller. Moreover, since the storage medium does not need to return the business data at a specified time and in a specified order, the storage medium does not need to control the time consumption of executing each data reading instruction, that is, the storage medium does not need to ensure the consistency of the delay within the life cycle. For the second identifier, in addition to being used by the controller to confirm that the storage medium has executed the data processing instruction, it can also be used by the controller to promptly confirm whether there is a fault in the execution process of the data processing instruction.
[0185] Next, taking the target identifier including the first identifier and the second identifier as an example, the data processing method provided in the embodiment of the present application and the data processing process of the related technology are compared, and the data processing method provided in the embodiment of the present application is illustrated by examples.
[0186] See also Figure 10 , Figure 10A schematic diagram of the data reading process in the related art is shown. Among them, the controller sends data read instruction 1, address 1 corresponding to data read instruction 1, data read instruction 2, and address 2 corresponding to data read instruction 2 to the storage medium in sequence. Afterwards, the storage medium needs to ensure its own delay consistency to return business data 1 corresponding to data read instruction 1 and business data 2 corresponding to data read instruction 2 in sequence, so as to ensure that the controller can identify which data read instruction the received business data corresponds to. Accordingly, the controller reads business data 1 and business data 2 by default and identifies them after waiting for a fixed period of time. Moreover, the controller cannot determine whether the storage medium has successfully executed data read instruction 1 and data read instruction 2 before performing error correction.
[0187] When the data processing method provided in the embodiment of the present application is used to read data, see Figure 11 , Figure 11 The figure shows the situation where different minimum operation units in the non-volatile memory unit execute data read instructions in parallel. In which, the storage medium uses the minimum operation unit 0 of the non-volatile memory unit to execute data read instruction 1, and uses the minimum operation unit N of the non-volatile memory unit to execute data read instruction 2. Figure 12 and Figure 13 The controller sends data read instruction 1, address 1 and identifier 1 (corresponding to the third identifier described above) corresponding to data read instruction 1, data read instruction 2, address 2 and identifier 2 (corresponding to the third identifier described above) corresponding to data read instruction 2 to the storage medium in sequence.
[0188] In the case that both data read instruction 1 and data read instruction 2 are executed successfully, see Figure 12 , the storage medium sends the business data 1 read based on the data read instruction 1, the identifier 1 corresponding to the data read instruction 1 (corresponding to the first identifier described above) and the success identifier for indicating that there is no fault (corresponding to the second identifier described above) to the controller through different signal lines in one transmission cycle, and the storage medium sends the business data 2 read based on the data read instruction 2, the identifier 2 corresponding to the data read instruction 2 (corresponding to the first identifier described above) and the success identifier for indicating that there is no fault (corresponding to the second identifier described above) to the controller through different signal lines in another transmission cycle. After receiving the business data 1, the controller confirms that the business data 1 is the business data read based on the data read instruction 1, and that the data read instruction 1 is successfully executed based on the identifier 1 and the success identifier. The controller also confirms that the business data 2 is the business data read based on the data read instruction 2, and that the data read instruction 2 is successfully executed based on the identifier 2 and the success identifier.
[0189] It should be noted that Figure 12In the illustrated example, service data 1, identifier 1, and a success indicator are sent first, followed by service data 2, identifier 2, and a success indicator. In practice, service data 2, identifier 2, and a success indicator can also be sent first, followed by service data 1, identifier 1, and a success indicator. Regardless of the order, the controller can recognize the data read instructions corresponding to service data 1 and service data 2.
[0190] In the case where data read instruction 1 is executed successfully and data read instruction 2 fails to execute, see Figure 13 , the business data 2 read based on the data read instruction 2 is unreliable data, and the read delay of executing the data read instruction 2 is small, then the business data 2 may be returned first. Therefore, the storage medium first sends the business data 2, identification 2 and a failure identification (corresponding to the second identification described above) to the controller through different signal lines in one transmission cycle. Then, the storage medium sends the business data 1, identification 1 and success identification to the controller through different signal lines in another transmission cycle. The controller first receives the business data 2, identification 2 and failure identification, and then determines that the business data 2 is the business data read based on the data read instruction 2 according to the identification 2 and the failure identification, and that the data read instruction 2 fails to execute. Afterwards, the controller receives the business data 1, identification 1 and success identification again, and confirms that the business data 1 is the business data read based on the data read instruction 1 according to the identification 1 and the success identification, and that the data read instruction 1 is successfully executed.
[0191] In addition, when using the data processing method provided in the embodiment of the present application to read data, you can also refer to Figure 14 , Figure 14 The figure shows a situation in which different minimum operation units in a non-volatile storage unit execute data read instructions in parallel, and the same minimum operation unit executes data read instructions in series. In which, the storage medium needs to use the minimum operation unit 0 of the non-volatile storage unit to execute data read instruction 1 and data read instruction 2, and use the minimum operation unit N of the non-volatile storage unit to execute data read instruction 3. In which, data read instruction 1 and data read instruction 2 use the same minimum operation unit 0, so data read instruction 1 and data read instruction 2 need to be executed serially. Data read instruction 3 uses another minimum operation unit N, so data read instruction 3 can be executed in parallel with data processing instruction 1 (or data processing instruction 2). In which, the controller sends data read instruction 1, address 1 and identification 1, as well as data read instruction 2, address 2 and identification 2, and data read instruction 3, address 3 and identification 3 to the storage medium in sequence.
[0192] For example, the storage medium first executes data read instruction 1 and data read instruction 3 in parallel, and then executes data read instruction 2 in serial, and all three data read instructions are successfully executed. First, the storage medium can return business data 1, identification 1, and a success identification to the controller, and the controller recognizes that business data 1 corresponds to data read instruction 1, and data read instruction 1 is successfully executed. Afterwards, the storage medium returns business data 3, identification 3, and a success identification to the controller, and the controller recognizes that business data 3 corresponds to data read instruction 3, and data read instruction 3 is successfully executed. Next, the storage medium returns business data 2, identification 2, and a success identification to the controller, and the controller recognizes that business data 3 corresponds to data read instruction 3, and data read instruction 3 is successfully executed.
[0193] It should be noted that if Figure 14 If the situation shown is applied in the related art, the controller will send data read instruction 1 and address 1, data read instruction 2 and address 2, and data read instruction 3 and address 3 to the storage medium in sequence, and default the data returned by the storage medium to be business data 1, business data 2, and business data 3, in the same order as the data read instructions sent by the controller to the storage medium. However, the data returned by the storage medium is actually business data 1, business data 3, and business data 2, which is different from the default order of the controller, resulting in the controller being unable to identify each business data. Furthermore, the controller cannot determine whether the storage medium has successfully executed each data read instruction 1.
[0194] In addition, when using the data processing method provided in the embodiment of the present application to read data, you can also refer to Figure 15 , Figure 15 The figure shows a situation where two non-volatile storage units coexist and share the same IO cycle interface. The controller sends a data read instruction 1, address 1 and identifier 1 to the non-volatile storage unit 0. The non-volatile storage unit 0 returns business data 1, identifier 1 and a success identifier to the controller. The controller identifies business data 1 as the business data corresponding to the data read instruction 1, and the data read instruction 1 is successfully executed. The controller also sends a data read instruction 2, address 2 and identifier 2 to the non-volatile storage unit 1. The storage medium 1 returns business data 2, identifier 2 and a success identifier to the controller. The controller identifies business data 2 as the business data corresponding to the data read instruction 2, and the data read instruction 2 is successfully executed. Among them, the non-volatile storage unit 0 and the non-volatile storage unit 1 do not need to ensure consistent latency. They can execute the corresponding data read instructions according to their respective latency. Regardless of whether the non-volatile storage unit 0 returns business data 1 first and then the non-volatile storage unit 1 returns business data 2, or whether the non-volatile storage unit 1 returns business data 2 first and then the non-volatile storage unit 0 returns business data 1, the controller can recognize the data read instructions corresponding to business data 1 and business data 2. Figure 15The two non-volatile memory cells shown are only examples, and the number of non-volatile memory cells may be three or more.
[0195] See also Figure 16 , Figure 16 The following figure shows a schematic diagram of the data writing process in the related art. The controller sends data writing instruction 1, address 1 corresponding to data writing instruction 1, data writing instruction 2, and address 2 corresponding to data writing instruction 2 to the storage medium in sequence. The controller also sends business data 1 and business data 2 to be written to the storage medium in sequence. After that, the controller considers that both data writing instruction 1 and data writing instruction 2 have been executed after waiting for a fixed period of time. Figure 16 The controller cannot determine whether the storage medium has successfully executed the data write instruction 1 until the next time the service data 1 is read (if it is successfully executed, the service data 1 can be read normally the next time; if it is not successfully executed, the service data 1 cannot be read normally the next time). The controller cannot determine whether the storage medium has successfully executed the data write instruction 2 until the next time the service data 2 is read.
[0196] When data is written using the data processing method provided in the embodiment of the present application, see Figure 17 , the controller sends data write instruction 1, address 1 and identifier 1 (corresponding to the third identifier described above) corresponding to data write instruction 1, data write instruction 2, address 2 and identifier 2 (corresponding to the third identifier described above) corresponding to data write instruction 2 to the storage medium in sequence, and the controller also sends business data 1 corresponding to data write instruction 1 and business data 2 corresponding to data write instruction 2 to the storage medium in sequence. Accordingly, after successfully executing data write instruction 1, the storage medium returns identifier 1 and a success identifier indicating that there is no fault to the controller. After receiving the identifier, the controller can determine that data write instruction 1 has been successfully executed without waiting for the next time business data 1 is read to determine whether data write instruction 1 has been successfully executed. After successfully executing data write instruction 2, the storage medium returns identifier 2 and a failure identifier indicating that there is a fault to the controller. After receiving the identifier, the controller can determine that data write instruction 2 has failed to execute. There is no need to wait for the next time business data 2 is read to determine whether data write instruction 2 has been successfully executed.
[0197] It should be noted that Figure 17 In the illustrated example, flag 1 and a success flag are sent first, followed by flag 2 and a failure flag. In practice, flag 2 and a failure flag can also be sent first, followed by flag 1 and a success flag. Regardless of the order, the controller can identify that data read instruction 1 was successfully executed, while data read instruction 2 failed.
[0198] In this application, the terms "first," "second," and the like are used to distinguish between identical or similar items having substantially the same function or effect. It should be understood that "first," "second," and "nth" do not have a logical or temporal dependency, nor do they limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," and the like to describe various elements, these elements should not be limited by these terms. These terms are simply used to distinguish one element from another.
[0199] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0200] In this application, the term "at least one" means one or more, and the term "plurality" means two or more. For example, a plurality of data processing instructions means two or more data processing instructions.
[0201] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0202] It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the listed items. The term "and / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this application generally indicates that the associated objects are in an "or" relationship.
[0203] It should also be understood that the terms “if” and “if” may be interpreted to mean “when” or “upon” or “in response to determining” or “in response to detecting.” Similarly, the phrases “if it is determined that ” or “if [stated condition or event] is detected” may be interpreted to mean “upon determining ” or “in response to determining ” or “upon detecting [stated condition or event]” or “in response to detecting [stated condition or event],” depending on the context.
[0204] The above description is merely an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A storage device, characterized in that: The storage device includes a controller and a storage medium connected to each other; The controller is used to send a first data processing instruction and a second data processing instruction to the storage medium in sequence; The storage medium is used to execute the first data processing instruction and the second data processing instruction, and determine a first identifier of the first data processing instruction and a first identifier of the second data processing instruction according to the first data processing instruction and the second data processing instruction, respectively, wherein the first identifier of the first data processing instruction is used to identify the first data processing instruction and indicate that the first data processing instruction has been completed, and the first identifier of the second data processing instruction is used to identify the second data processing instruction and indicate that the second data processing instruction has been completed; The storage medium is further configured to send a first identifier of the first data processing instruction and a first identifier of the second data processing instruction respectively according to the order in which the execution of the first data processing instruction and the second data processing instruction is completed; The controller is further configured to identify the first data processing instruction based on the first identifier of the first data processing instruction and confirm that the first data processing instruction has been completed, and to identify the second data processing instruction based on the first identifier of the second data processing instruction and confirm that the second data processing instruction has been completed.
2. The storage device according to claim 1, wherein The storage medium is also used to generate a second identifier based on the execution process of the first data processing instruction, and the second identifier is used to indicate whether there is a fault in the corresponding data during the execution of the first data processing instruction, and send the second identifier to the controller. The controller is also used to confirm that a fault occurs during the execution of the first data processing instruction based on the second identifier.
3. The storage device according to claim 1, wherein The first data processing instruction carries the first identifier, and the second data processing instruction carries the first identifier; The storage medium is specifically used to obtain the first identifier carried in the first data processing instruction to determine the first identifier of the first data processing instruction and obtain the first identifier carried in the second data processing instruction to determine the first identifier of the second data processing instruction.
4. The storage device according to claim 1, wherein The storage medium is specifically used to determine the first identifier of the first data processing instruction based on the identifier of the storage unit operated when executing the first data processing instruction, and to determine the first identifier of the second data processing instruction based on the identifier of the storage unit operated when executing the second data processing instruction.
5. The storage device according to claim 2, wherein: The storage medium is further configured to obtain characteristic data during the execution of the first data processing instruction, compare the characteristic data with reference data, and generate the second identifier. The storage device according to claim 5 , wherein: The storage medium is used to obtain the characteristic data based on data generated by the elements included in the storage medium during the execution of the first data processing instruction.
7. The storage device according to claim 5, wherein: The first data processing instruction is used to instruct reading of business data; The storage medium is used to obtain the feature data based on the read business data during the execution of the first data processing instruction.
8. The storage device according to claim 5, wherein: The first data processing instruction is used to instruct writing of business data; The storage medium is used to read the written business data during the execution of the first data processing instruction, and obtain the feature data based on the read business data.
9. The storage device according to claim 5, wherein: In response to a difference between the characteristic data and the reference data being less than or equal to a difference threshold, the second flag indicates that there is no fault in the corresponding data during the execution of the first data processing instruction; Alternatively, in response to a difference between the characteristic data and the reference data being greater than the difference threshold, the second identifier indicates that a fault exists in the corresponding data during the execution of the first data processing instruction.
10. The storage device according to claim 2, wherein: The first data processing instruction is used to instruct writing of business data, and the first data processing instruction corresponds to the first storage unit; The controller is further configured to send an updated data processing instruction to the storage medium in response to the second identifier indicating that a fault exists in the corresponding data during the execution of the first data processing instruction, wherein the updated data processing instruction is configured to instruct the business data to be written into a second storage unit, the first storage unit and the second storage unit being different storage units included in the storage medium; The storage medium is further configured to execute the updated data processing instructions. The storage device according to claim 10 , wherein: The controller is further configured to mark the first storage unit as an unreliable storage unit.
12. The storage device according to claim 11, wherein: The controller is further configured to, after marking the first storage unit as an unreliable storage unit, mark the first storage unit as a damaged storage unit and stop using the first storage unit in response to a number of errors occurring in the first storage unit being greater than or equal to a number threshold.
13. The storage device according to claim 1, wherein: The first data processing instruction is used to instruct writing of business data, the storage medium is used to perform non-volatile storage of the business data, and the controller is further used to delete the volatile stored business data based on the first identifier.
14. The storage device according to claim 1, wherein: The first data processing instruction is used to instruct reading of business data; The storage medium is further configured to send the read business data to the controller, wherein the read business data has a different sending path from the first identifier; The controller is further configured to receive the read service data and the first identifier through different transmission paths, and determine the priority of the read service data based on the first identifier; In response to the priority of the read business data being higher than the priority of other data currently being processed by the controller, the controller is further configured to interrupt the processing of the other data and process the read business data.
15. The storage device according to claim 5, wherein: The first data processing instruction is used to instruct reading of business data, and the controller is further used to execute an error correction process to recover the business data in response to the second identifier indicating that there is a fault in the corresponding data during the execution of the first data processing instruction.
16. A data processing method, characterized in that: The method is applied to a controller included in a storage device, wherein the storage device further includes a storage medium interconnected with the controller, and the method includes: The controller sends a first data processing instruction and a second data processing instruction to the storage medium in sequence; The controller receives a first identifier of the first data processing instruction and a first identifier of the second data processing instruction sent by the storage medium in the order in which the first data processing instruction and the second data processing instruction are completed, wherein the first identifier of the first data processing instruction is used to identify the first data processing instruction and indicates that the first data processing instruction has been completed, and the first identifier of the second data processing instruction is used to identify the second data processing instruction and indicates that the second data processing instruction has been completed; The controller identifies the first data processing instruction based on the first identifier of the first data processing instruction and confirms that the first data processing instruction has been completed, and identifies the second data processing instruction based on the first identifier of the second data processing instruction and confirms that the second data processing instruction has been completed.
17. The method according to claim 16, characterized in that The method further comprises: The controller receives a second identifier sent by the storage medium, where the second identifier is generated by the storage medium according to the execution process of the first data processing instruction, and is used to indicate whether corresponding data has a fault during the execution of the first data processing instruction; The controller confirms, based on the second identifier, that a fault occurs during execution of the first data processing instruction.
18. The method according to claim 16, characterized in that The first data processing instruction carries the first identifier, and the second data processing instruction carries the first identifier.
19. The method according to claim 16, wherein The first identifier includes at least one of an identifier of a storage unit and an identifier of the storage medium. The storage unit is at least one of the storage units included in the storage medium, and the storage unit is used for the execution process of the first data processing instruction.
20. The method according to claim 17, wherein The first data processing instruction is used to instruct writing of business data, the first data processing instruction corresponds to a first storage unit, and the method further includes: In response to the second identifier indicating that there is a fault in the corresponding data during the execution of the first data processing instruction, the controller sends an updated data processing instruction to the storage medium, and the updated data processing instruction is used to instruct the business data to be written to the second storage unit. The first storage unit and the second storage unit are different storage units included in the storage medium.
21. The method according to claim 20, characterized in that The method further comprises: The controller marks the first storage unit as an unreliable storage unit.
22. The method according to claim 16, wherein The first data processing instruction is used to instruct writing of business data, and the storage medium is used to perform non-volatile storage on the business data. The method further includes: The controller deletes the volatile stored business data based on the first identifier.
23. The method according to claim 16, wherein The first data processing instruction is used to instruct reading business data, and the method further includes: The controller receives the service data read by the storage medium and the first identifier through different transmission paths, and determines the priority of the read service data based on the first identifier; In response to the priority of the read business data being higher than the priority of other data currently being processed by the controller, the controller interrupts the processing of the other data and processes the read business data.
24. The method according to claim 20, characterized in that The first data processing instruction is used to instruct reading business data, and the method further includes: The controller performs an error correction process in response to the second identifier indicating that a fault exists in the corresponding data during the execution of the first data processing instruction to restore the business data.
25. A data processing method, characterized in that: The method is applied to a storage medium included in a storage device, wherein the storage device further includes a controller interconnected with the storage medium, and the method includes: The storage medium sequentially receives the first data processing instruction and the second data processing instruction sent by the controller; The storage medium executes the first data processing instruction and the second data processing instruction, and determines a first identifier of the first data processing instruction and a first identifier of the second data processing instruction according to the first data processing instruction and the second data processing instruction, respectively, wherein the first identifier of the first data processing instruction is used to identify the first data processing instruction and indicates that the first data processing instruction has been completed, and the first identifier of the second data processing instruction is used to identify the second data processing instruction and indicates that the second data processing instruction has been completed; The storage medium sends the first identifier of the first data processing instruction and the first identifier of the second data processing instruction respectively according to the order in which the execution of the first data processing instruction and the second data processing instruction is completed, so that the controller identifies the first data processing instruction and the second data processing instruction respectively according to the first identifier of the first data processing instruction and the first identifier of the second data processing instruction.
26. The method according to claim 25, characterized in that The method further comprises: The storage medium generates a second identifier according to the execution process of the first data processing instruction, where the second identifier is used to indicate whether corresponding data has a fault during the execution of the first data processing instruction; The second identifier is sent to the controller, so that the controller confirms, based on the second identifier, that a fault occurs during execution of the first data processing instruction.
27. The method according to claim 25, characterized in that The method further includes: the first data processing instruction carries the first identifier, and the second data processing instruction carries the first identifier.
28. The method according to claim 25, characterized in that The first identifier includes at least one of an identifier of a storage unit and an identifier of the storage medium. The storage unit is at least one of the storage units included in the storage medium, and the storage unit is used for the execution process of the first data processing instruction.
29. The method according to claim 26, wherein The method further comprises: The storage medium acquires characteristic data during the execution of the first data processing instruction, compares the characteristic data with reference data, and generates the second identifier.
30. The method according to claim 29, wherein The storage medium acquires characteristic data during the execution of the first data processing instruction, including: During the execution of the first data processing instruction, the storage medium acquires the characteristic data based on data generated by the elements included in the storage medium.
31. The method according to claim 28, wherein The first data processing instruction is used to instruct reading of business data, and the storage medium obtains characteristic data during the execution of the first data processing instruction, including: During the execution of the first data processing instruction, the storage medium obtains the feature data based on the read business data.
32. The method according to claim 28, wherein The first data processing instruction is used to instruct writing of business data, and the storage medium obtains characteristic data during the execution of the first data processing instruction, including: During the execution of the first data processing instruction, the storage medium reads the written business data and obtains the feature data based on the read business data.
33. The method according to claim 29, wherein In response to a difference between the characteristic data and the reference data being less than or equal to a difference threshold, the second flag indicates that there is no fault in the corresponding data during the execution of the first data processing instruction; Alternatively, in response to a difference between the characteristic data and the reference data being greater than the difference threshold, the second identifier indicates that a fault exists in the corresponding data during the execution of the first data processing instruction.
34. The method according to claim 25, wherein The first data processing instruction is used to instruct reading business data, and the method further includes: The storage medium sends the read business data to the controller, and the read business data has a different sending path from the first identifier. The controller is used to receive the read business data and the first identifier through different sending paths, determine the priority of the read business data based on the first identifier, and in response to the priority of the read business data being higher than the priority of other data currently being processed by the controller, interrupt the processing of the other data and process the read business data.
35. A controller connected to a storage medium, characterized in that The controller includes: a communication interface, configured to communicate with the storage medium; A control chip for executing the method according to any one of claims 16 to 24.
36. A storage medium connected to a controller, characterized in that The storage medium includes: a communication interface, configured to communicate with the controller; A memory chip for executing the method according to any one of claims 25 to 34.
Citation Information
Patent Citations
Data transmission control method, device and equipment and readable storage medium
CN113157611A
Intelligent cache allocation method and control component
CN113867615A