Data processing method, flash memory, and storage device

By executing different operations in parallel in the flash memory and using different page registers, the problem of low performance caused by sequential execution is solved, and the performance and instruction execution efficiency of the flash memory are improved.

WO2024198461A1PCT designated stage expired Publication Date: 2024-10-03XFUSION DIGITAL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/135728
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-27
Filing Date
2023-11-30
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

Because flash memory adopts a sequential execution strategy, the operation to be executed needs to wait for the current operation to be completed, resulting in poor performance.

Method used

During the execution of one operation, by executing another operation in parallel, different page registers are used to execute different instructions respectively, avoiding waiting and resource occupation, and improving performance.

Benefits of technology

This effectively avoids waiting delays and improves the performance of flash memory and the number of instructions executed per unit time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023135728_03102024_PF_FP_ABST
    Figure CN2023135728_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, a flash memory, and a storage device, pertaining to the technical field of data storage. In the method, a target plane of the flash memory comprises a first page register, a second page register, a first storage space, and a second storage space. On the basis of this, the flash memory, while executing a first instruction on the basis of the first page register, can simultaneously execute a second instruction on the basis of the second page register, thereby achieving parallel execution of the first instruction and the second instruction. Since the flash memory can execute the first instruction and the second instruction in parallel on the basis of different page registers, the second instruction does not need to wait for the first instruction to be completed before execution and does not need to occupy the first page register required for executing the first instruction. Therefore, the invention allows for the waiting time delay of the second instruction to be effectively avoided while also ensuring the first instruction can be executed normally, thereby improving the performance of the flash memory.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method, flash memory and storage device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 27, 2023, with application number 202310309686.1 and application name “Data processing method, flash memory and storage device”, the entire contents of which are incorporated by reference into this application. Technical Field

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

[0003] Currently, flash memory storage is typically composed of multiple logical units (LUNs), each of which is typically composed of planes. Related technologies employ a sequential execution strategy for multiple operations within a plane. In this scenario, pending operations must wait until the currently executing operation completes before they can begin. This prolongs the execution time of pending operations, resulting in poor flash memory performance.

[0004] Therefore, how to improve the performance of flash memory has become a technical problem that needs to be solved urgently.

[0005] Summary of the Invention

[0006] Embodiments of the present application provide a data processing method, a flash memory, and a storage device, which can execute another operation in parallel during the execution of one operation, thereby helping to improve the performance of the flash memory.

[0007] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0008] In a first aspect, a data processing method is provided for a flash memory of a storage device, the flash memory including a target plane, the target plane including a first page register, a second page register, a first storage space and a second storage space; the method including: in response to a first instruction, performing a first operation on the first storage space based on the first page register; the first instruction is used to indicate the execution of the first operation on the first storage space, the first instruction includes a read instruction, a write instruction or an erase instruction; in the process of executing the first instruction, in response to a second instruction, performing a second operation on the second storage space based on the second page register; the second instruction is used to indicate the execution of the second operation on the second storage space; the second instruction includes a read instruction, a write instruction or an erase instruction.

[0009] In this embodiment, the target plane of the flash memory includes a first page register, a second page register, a first storage space, and a second storage space. Based on this, while the flash memory executes a first instruction (such as a write instruction, a read instruction, or an erase instruction) based on the first page register, that is, performing a first operation on the first storage space based on the first page register, the flash memory can simultaneously execute a second instruction based on the second page register, that is, performing a second operation on the second storage space based on the second page register, thereby achieving parallel execution of the first instruction and the second instruction.

[0010] On the one hand, because the flash memory executes the first and second instructions in parallel based on different page registers, the second instruction does not have to wait for the first instruction to complete execution before executing. In other words, it does not have to wait for the first page register to be idle before executing the second instruction based on the first page register, nor does it have to occupy the first page register required for executing the first instruction. Therefore, while ensuring the normal execution of the first instruction, the waiting delay of the second instruction is effectively avoided, thereby improving the performance of the flash memory. On the other hand, because the second instruction is executed in parallel during the execution of the first instruction, the number of second instructions executed per unit time by the flash memory can be increased.

[0011] In a possible implementation, the first storage space is a first page, and the second storage space is a second page, wherein the first page and the second page are different pages.

[0012] In this implementation, the first storage space is the first page, the second storage space is the second page, and the first page and the second page are different pages. In this way, the flash memory executes different instructions in parallel on different pages. Compared with executing different instructions in parallel on the same page, it can avoid the executed first instruction affecting the data accuracy of the second instruction.

[0013] In another possible implementation, the first storage space is a first block, the second storage space is a page in a second block, and the first block and the second block are different blocks.

[0014] In this implementation, the first storage space is the first block, the second storage space is the page in the second block, and the first block and the second block are different blocks. In this way, the flash memory executes different instructions in parallel on different blocks. Compared with executing different instructions in parallel on the same block, it can avoid the executed first instruction affecting the data accuracy of the second instruction.

[0015] In another possible implementation, the first instruction is a write instruction, which includes the data to be written and the address to be written, the address to be written is the address corresponding to the first storage space, and the write instruction is used to indicate that the data to be written is written into the first storage space; based on the first page register, a first operation is performed on the first storage space, including: writing the data to be written into the first page register; writing the data to be written in the first page register into the first storage space.

[0016] This implementation provides a specific execution method for a write instruction. In this execution method, the flash memory writes the data to be written into the first page register and then writes the data to be written in the first page register into the first storage space, thereby implementing the writing of the data to be written into the first storage space based on the first page register. Because the execution of the write instruction does not require the use of the second page register, the second page register is ensured to be used for executing the second instruction, thereby avoiding the inability of the flash memory to execute the second instruction due to a lack of free page registers during the execution of the write instruction.

[0017] In another possible implementation, the first instruction is an erase instruction, which includes an address to be erased, which is an address corresponding to the first storage space, and the erase instruction is used to instruct erasure of the first storage space; based on the first page register, a first operation is performed on the first storage space, including: writing a preset value to the first page register; writing the preset value in the first page register to the first storage space; the preset value is used to indicate that the first storage space is in an erased state.

[0018] This implementation provides a specific execution method for an erase instruction. Since the data in the erased storage space on the flash memory is a preset value (e.g., FFH), in this execution method, the flash memory writes the preset value to the first page register and then writes the preset value in the first page register to the first storage space, thereby erasing the first storage space based on the first page register. Since the execution of the erase instruction does not require the use of the second page register, the second page register is ensured to be used to execute the second instruction, thereby avoiding the inability to execute the second instruction due to the lack of a free page register during the flash memory execution of the erase instruction.

[0019] In another possible implementation, the second instruction is a read instruction, which includes an address to be read, which is an address corresponding to the second storage space. The read instruction is used to indicate a read operation on the second storage space; based on the second page register, a second operation is performed on the second storage space, including: reading the data in the second storage space to the second page register; and returning the data in the second page register to the device that sends the read instruction.

[0020] This implementation provides a specific execution method for a read instruction. In this execution method, the flash memory reads data from the second storage space into the second page register and returns the data in the second page register to the device that sent the read instruction, thereby returning the to-be-read data to the device that sent the read instruction based on the second page register. Because the execution of the read instruction does not require the first page register, the first page register is guaranteed to be used to execute the first instruction, avoiding the flash memory from occupying the first page register required for the first instruction during the execution of the read instruction, thereby preventing the later-executed read instruction from affecting the execution performance of the first instruction that was executed earlier.

[0021] In another possible implementation, the method further includes: in response to a target read instruction, returning the data in the second page register to the device that sends the target read instruction; the target read instruction is used to instruct to read the data in the second storage space.

[0022] In this implementation, since the write / erase instructions and the read instructions are executed based on different page registers, after the flash memory executes the read instruction, the second page register stores the data in the second storage space. Therefore, upon receiving the target read instruction, the flash memory can directly return the data in the second page register, improving the hit rate of the second page register. Furthermore, since the operation of reading the data in the second storage space into the second page register does not need to be repeatedly executed, this helps shorten the execution time of the target read instruction, thereby improving the execution efficiency of the target read instruction.

[0023] In another possible implementation, the read instruction is a sequential read instruction, the address to be read is the starting address of the sequential read instruction, and the sequential read instruction also includes a target value, which is used to indicate the amount of data to be read; based on the second page register, a second operation is performed on the second storage space, including: based on the second page register, starting from the starting space corresponding to the starting address, performing read operations on multiple subspaces of the second storage space in sequence, wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address in the multiple subspaces, and the number of times the read operation is performed corresponds to the target value.

[0024] In this implementation, by setting the read instruction as a sequential read instruction, the amount of data read by the flash memory during the process of executing the first instruction is the target value. In this way, during the process of the flash memory executing the first instruction, it not only helps to increase the amount of data read by the flash memory, but also helps to increase the diversity of the types of read instructions executed.

[0025] In another possible implementation, the second instruction is a write instruction, which includes the data to be written and the address to be written, the address to be written is the address corresponding to the second storage space, and the write instruction is used to indicate that the data to be written is written into the second storage space; based on the second page register, a second operation is performed on the second storage space, including: writing the data to be written into the second page register; writing the data to be written in the second page register into the first storage space.

[0026] In this implementation, a specific execution method for a write instruction is provided. In this execution method, the flash memory writes the data to be written into the second page register, and writes the data to be written in the second page register into the second storage space, thereby implementing the writing of the data to be written into the second storage space based on the second page register. Since the execution of the write instruction does not require the use of the first page register, the first page register is guaranteed to be used to execute the first instruction, thereby avoiding the flash memory from occupying the first page register required for executing the first instruction during the execution of the write instruction, thereby avoiding the write instruction executed later affecting the performance of the first instruction (such as a write instruction or an erase instruction) executed earlier.

[0027] In another possible implementation, the write instruction is a sequential write instruction, the address to be written is the starting address of the sequential write instruction, and the sequential write instruction also includes a target value, which is used to indicate the amount of data to be written; based on the second page register, a second operation is performed on the second storage space, including: based on the second page register, starting from the starting space corresponding to the starting address, write operations are performed on multiple subspaces of the second storage space in sequence, wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address in the multiple subspaces, and the number of write operations performed corresponds to the target value.

[0028] In this implementation, by setting the write instruction as a sequential write instruction, the amount of data written by the flash memory during the process of executing the first instruction is the target value. In this way, during the process of executing the first instruction in the flash memory, it not only helps to increase the amount of data written by the flash memory, but also helps to increase the diversity of the types of write instructions executed.

[0029] In another possible implementation, the target plane also includes at least one third storage space. When the execution time of the first instruction is greater than the execution time of the second instruction, the method also includes: during the execution of the first instruction and after the execution of the second instruction, in response to at least one third instruction, at least one third operation is performed on at least one third storage space based on the second page register; wherein the third instruction includes a read instruction, a write instruction or an erase instruction.

[0030] In this implementation, when the execution time of the first instruction is longer than the execution time of the second instruction, such as the first instruction is a write instruction / erase instruction and the second operation is a read instruction, the flash memory responds to at least one third instruction and performs at least one third operation on at least one third storage space. In this way, during the process of the flash memory executing the write instruction / erase instruction, as many other instructions as possible, such as read instructions, can be executed in parallel, which helps to improve the bandwidth of other instructions of the flash memory.

[0031] In another possible implementation, the method further includes: receiving a query instruction; the query instruction is used to indicate a query of an execution result of a first instruction; in response to the query instruction, returning the execution result of the first instruction to the device that sent the query instruction; the execution result of the first instruction includes execution success or execution failure.

[0032] In this implementation, when the first instruction is a write instruction / erase instruction and the second instruction is a read instruction, the flash memory returns the execution result of the first instruction in response to the query instruction, thereby converting the first instruction and the second instruction into asynchronous operations.

[0033] In another possible implementation, the target plane also includes a third page register and a fourth storage space, the third page register is used to cache data to be written to the target plane or to cache data read from the target plane, and the method also includes: in the process of executing the first instruction and / or the second instruction, in response to the fourth instruction, based on the third page register, performing a fourth operation on the fourth storage space; the fourth instruction is used to instruct the execution of a fourth operation on the fourth storage space; wherein the fourth instruction includes a read instruction, a write instruction or an erase instruction, and the fourth operation includes a read operation, a write operation or an erase operation.

[0034] In this implementation, by setting the target plane to also include a third page register and a fourth storage space, the flash memory can execute three instructions in parallel, such as the first instruction, the second instruction, and the fourth instruction, which helps to further improve the performance of the flash memory.

[0035] In a second aspect, a data processing method is provided for a flash memory of a storage device, the flash memory including a target plane, the target plane including a first page register, a second page register, a first storage space and a second storage space; the method includes: in response to a write instruction, writing the data to be written into the first page register, and writing the data to be written in the first page register into the first storage space; wherein the write instruction includes the data to be written and the address to be written, and the address to be written is the address corresponding to the first storage space; in the process of executing the write instruction, in response to a read instruction, reading the data in the second storage space into the second page register, and returning the data in the second page register to the device that sent the read instruction; wherein the read instruction includes the address to be read, and the address to be read is the address corresponding to the second storage space.

[0036] In this solution, the target plane of the flash memory includes a first page register, a second page register, a first storage space, and a second storage space. Based on this, while the flash memory executes a write instruction based on the first page register (i.e., writing the data to be written to the first page register and writing the data to be written in the first page register to the first storage space), the flash memory can simultaneously execute a read instruction based on the second page register (i.e., reading the data in the second storage space into the second page register and returning the data in the second page register to the device that sent the read instruction), thereby enabling the parallel execution of write and read instructions. On the one hand, because the flash memory executes write and read instructions in parallel based on different page registers, the read instruction does not have to wait for the write instruction to complete before executing. In other words, it does not have to wait for the first page register to be idle before executing the read instruction based on the first page register, nor does it have to occupy the first page register required for executing the write instruction. Therefore, while ensuring that the write instruction can be executed normally, the waiting delay of the read instruction is effectively avoided, thereby improving the performance of the flash memory. On the other hand, because the read instruction is executed in parallel with the write instruction, the bandwidth of the read instruction can also be improved.

[0037] In a possible implementation, the first storage space is a first page, and the second storage space is a second page, wherein the first page and the second page are different pages.

[0038] In another possible implementation, the read instruction is a sequential read instruction, the address to be read is the starting address of the sequential read instruction, and the sequential read instruction also includes a target value, which is used to indicate the amount of data to be read; in response to the read instruction, the data in the second storage space is read to the second page register, and the data in the second page register is returned to the device that sent the read instruction, including: in response to the sequential read instruction, starting from the starting space corresponding to the starting address, the data of multiple subspaces of the second storage space are read to the second page register in sequence, and the data in the second page register are returned in sequence to the device that sent the sequential read instruction; wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address among the multiple subspaces, and the number of the multiple subspaces corresponds to the target value.

[0039] In another possible implementation, the target plane also includes at least one third storage space; the method also includes: during the execution of the write instruction, and after the read instruction is executed, in response to at least one third read instruction, performing at least one read operation on at least one third storage space based on the second page register.

[0040] In another possible implementation, the method further includes: receiving a query instruction; the query instruction is used to indicate a query result of the write instruction; in response to the query instruction, returning the execution result of the write instruction to the device that sent the query instruction; the execution result of the write instruction includes execution success or execution failure.

[0041] In another possible implementation, the target plane also includes a third page register and a third storage space, and the method also includes: in the process of executing a write instruction and / or a read instruction, in response to an erase instruction, writing a preset value into the third page register; writing the preset value in the third page register into the third storage space; the preset value is used to indicate that the third storage space is in an erased state.

[0042] It should be noted that in the second aspect, the technical effects of any possible implementation method can be referred to the first aspect and will not be repeated here.

[0043] According to a third aspect, a data processing method is provided for a flash memory of a storage device, the flash memory including a target plane, the target plane including a first page register, a second page register, a first storage space and a second storage space; the method includes: in response to an erase instruction, writing a preset value into the first page register, and writing the preset value in the first page register into the first storage space; wherein, the erase instruction includes an erase address, and the erase address is an address corresponding to the first storage space; in the process of executing the erase instruction, in response to a read instruction, reading the data in the second storage space into the second page register, and returning the data in the second page register to the device that sends the read instruction; wherein, the read instruction includes an address to be read, and the address to be read is an address corresponding to the second storage space.

[0044] In this solution, the target plane of the flash memory includes a first page register, a second page register, a first storage space, and a second storage space. Based on this, while the flash memory executes an erase instruction based on the first page register, that is, writing a preset value to the first page register and writing the preset value in the first page register to the first storage space, the flash memory can simultaneously execute a read instruction based on the second page register, that is, reading data from the second storage space into the second page register and returning the data in the second page register to the device that sent the read instruction, thereby achieving parallel execution of the erase instruction and the read instruction.

[0045] On the one hand, because the flash memory executes erase and read instructions in parallel based on different page registers, the read instruction does not have to wait for the erase instruction to complete before executing. In other words, there is no need to wait for the first page register to be free before executing the read instruction based on the first page register, nor does it occupy the first page register required for executing the erase instruction. Therefore, while ensuring the normal execution of the erase instruction, the waiting delay of the read instruction is effectively avoided, thereby improving the performance of the flash memory. On the other hand, because the read instruction is executed in parallel with the erase instruction, the bandwidth of the read instruction can also be improved.

[0046] In a possible implementation, the first storage space is a first block, the second storage space is a page of the second block, and the first block and the second block are different blocks.

[0047] In another possible implementation, the read instruction is a sequential read instruction, the address to be read is the starting address of the sequential read instruction, and the sequential read instruction also includes a target value, which is used to indicate the amount of data to be read; in response to the read instruction, the data in the second storage space is read to the second page register, and the data in the second page register is returned to the device that sent the read instruction, including: in response to the sequential read instruction, starting from the starting space corresponding to the starting address, the data of multiple subspaces of the second storage space are read to the second page register in sequence, and the data in the second page register are returned in sequence to the device that sent the sequential read instruction; wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address among the multiple subspaces, and the number of the multiple subspaces corresponds to the target value.

[0048] In another possible implementation, the target plane also includes at least one third storage space; the method also includes: during the execution of the write instruction, and after the read instruction is executed, in response to at least one third read instruction, performing at least one read operation on at least one third storage space based on the second page register.

[0049] In another possible implementation, the method further includes: receiving a query instruction; the query instruction is used to indicate a query of an execution result of an erase instruction; in response to the query instruction, returning an execution result of the erase instruction to the device that sent the query instruction; the execution result of the erase instruction includes execution success or execution failure.

[0050] In another possible implementation, the target plane also includes a third page register and a third block, and the method also includes: in the process of executing an erase instruction and / or a read instruction, in response to a write instruction, writing the data to be written into the third page register; writing the data to be written in the third page register into the third storage space.

[0051] It should be noted that in the third aspect, the technical effects of any possible implementation method can be referred to the first aspect and will not be repeated here.

[0052] In a fourth aspect, a data processing method is provided for a controller of a storage device, the storage device also including a flash memory, the flash memory including a target plane, the target plane including a first page register, a second page register, a first storage space and a second storage space; the method includes: sending a first instruction to the flash memory; the first instruction is used to instruct the flash memory to perform a first operation on the first storage space, the first instruction includes a read instruction, a write instruction or an erase instruction; sending a second instruction to the flash memory; the second instruction is used to instruct the flash memory to perform a second operation on the second storage space during the execution of the first instruction; wherein the second instruction includes a read instruction, a write instruction or an erase instruction.

[0053] In this embodiment, the target plane of the flash memory includes a first page register, a second page register, a first storage space, and a second storage space. Based on this, after sending the first instruction to the flash memory, the controller continues to send a second instruction to the flash memory. The second instruction is used to instruct the flash memory to execute the second instruction based on the second page register while executing the first instruction. In this way, the flash memory can simultaneously respond to the second instruction and execute the second instruction (such as a read instruction, a write instruction, or an erase instruction) on the second storage space based on the second page register while executing the first instruction (such as a read instruction, a write instruction, or an erase instruction) based on the first page register, thereby achieving parallel execution of the first instruction and the second instruction.

[0054] On the one hand, because the flash memory executes the first and second instructions in parallel based on different page registers, the second instruction does not have to wait for the first instruction to complete execution before executing. In other words, it does not have to wait for the first page register to be idle before executing the second instruction based on the first page register, nor does it have to occupy the first page register required for executing the first instruction. Therefore, while ensuring the normal execution of the first instruction, the waiting delay of the second instruction is effectively avoided, thereby improving the performance of the flash memory. On the other hand, because the second instruction is executed in parallel during the execution of the first instruction, the bandwidth of the second instruction can also be improved.

[0055] In one possible implementation, the first storage space is a first page, and the second storage space is a second page, wherein the first page and the second page are different pages; or the first storage space is a first block, and the second storage space is a page in the second block, and the first block and the second block are different blocks.

[0056] In another possible implementation, the first instruction is a write instruction, which includes the data to be written and the address to be written, and the address to be written is the address corresponding to the first storage space; the first instruction is used to instruct the data to be written to be written to the first storage space; or the first instruction is an erase instruction, which includes the address to be erased, and the address to be erased is the address corresponding to the first storage space, and the first instruction is used to write a preset value to the first storage space.

[0057] In this implementation, since the execution time of a write instruction is 12 times that of a read instruction, and the execution time of an erase instruction is 180 times that of a read instruction, by setting the first instruction to indicate that the data to be written is written into the first storage space or the first instruction is used to write a preset value to the first storage space, this helps to avoid the first instruction with a longer execution time affecting the performance of the flash memory when executing the second instruction.

[0058] In another possible implementation, the second instruction is a read instruction, the read instruction includes a to-be-read address, and the to-be-read address is an address of the second storage space; the second instruction is used to instruct to read data from the second storage space.

[0059] In this implementation, by setting a second instruction to indicate reading data in the second storage space, it is possible to avoid affecting the performance of the flash memory when executing read instructions when executing instructions with long execution time, such as write instructions or erase instructions.

[0060] In another possible implementation, the second page register stores data in the second storage space; the method also includes: sending a target read instruction to the flash memory, the target read instruction is used to instruct to read the data stored in the second storage space; receiving the data in the second page register returned by the flash memory, the data in the second page register is returned by the flash memory in response to the target read instruction.

[0061] In this implementation, since the write / erase instructions and the read instructions are executed based on different page registers, after the flash memory executes the read instruction, the second page register stores the data in the second storage space. Based on this, when the controller sends a target read instruction to the flash memory to instruct it to read the data stored in the second storage space, the flash memory can directly return the data in the second page register, thereby improving the hit rate of the second page register. Moreover, since it is not necessary to repeatedly execute the operation of reading the data in the second storage space into the second page register, it helps to shorten the execution time of the target read instruction, thereby improving the execution efficiency of the target read instruction.

[0062] In another possible implementation, the read instruction is a sequential read instruction, the address to be read is the starting address of the sequential read instruction, and the sequential read instruction also includes a target value, which is used to indicate the amount of data to be read; the sequential read instruction is used to instruct the flash memory to perform read operations on multiple subspaces of the second storage space in sequence, starting from the starting space corresponding to the starting address during the execution of the first instruction, wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address among the multiple subspaces, and the number of times the read operation is performed corresponds to the target value.

[0063] In this implementation, by setting the read instruction to be a sequential read instruction, and using it to instruct the flash memory to execute a first instruction, a sequential read operation is performed. In this way, during the process of the flash memory executing the first instruction, it not only helps to increase the amount of data read by the flash memory, but also helps to increase the diversity of the types of read instructions executed.

[0064] In another possible implementation, the second instruction is a write instruction, the second instruction includes data to be written and an address to be written, and the address to be written is the address of the second storage space; the second instruction is used to instruct writing the data to be written into the second storage space.

[0065] In this implementation, by setting a second instruction to indicate reading data in the second storage space, it is possible to avoid affecting the performance of the flash memory when executing read instructions when executing instructions with long execution time, such as write instructions or erase instructions.

[0066] In another possible implementation, the write instruction is a sequential write instruction, the address to be written is the starting address of the sequential write instruction, and the write instruction also includes a target value, which is used to indicate the amount of data to be written; the sequential write instruction is used to instruct the flash memory to perform write operations on multiple subspaces of the second storage space in sequence, starting from the starting space corresponding to the starting address during the execution of the first instruction, wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address among the multiple subspaces, and the number of write operations performed corresponds to the target value.

[0067] In this implementation, the read instruction is specifically a sequential write instruction, and is used to instruct the flash memory to perform a sequential write operation during the process of executing the first instruction. In this way, during the process of the flash memory executing the write instruction / erase instruction, it not only helps to increase the amount of data written to the flash memory, but also helps to increase the diversity of the types of write instructions executed.

[0068] In another possible implementation, the target plane also includes at least one third storage space; when the execution time of the first instruction is greater than the execution time of the second instruction, the method also includes: sending at least one third instruction to the flash memory, and the at least one third instruction is used to indicate that in the process of executing the first operation on the target plane, at least one third operation is performed on at least one third storage space; wherein the third instruction includes a read instruction, a write instruction or an erase instruction.

[0069] In this implementation, when the execution time of the first instruction is longer than the execution time of the second instruction, such as the first instruction is a write instruction / erase operation instruction and the second operation is a read instruction, the controller sends at least one third instruction to the flash memory to instruct the flash memory to perform at least one third operation on at least one third storage space during the process of executing the first instruction. In this way, the flash memory can execute as many other instructions as possible, such as read instructions, during the process of executing the write instruction / erase instruction, which helps to improve the bandwidth of other instructions of the flash memory.

[0070] In another possible implementation, the method further includes: sending a query instruction to the flash memory, the query instruction being used to instruct querying the execution result of the first instruction; and receiving the execution result of the first instruction returned by the flash memory, the execution result of the first instruction including execution success or execution failure.

[0071] In this implementation, when the first instruction is a write instruction / erase instruction and the second instruction is a read instruction, the controller sends a query instruction to the flash memory so that the flash memory can return the execution result of the first instruction, thereby turning the first instruction and the second instruction into asynchronous operations, thereby avoiding the first instruction blocking the data return during the execution of the second instruction.

[0072] In another possible implementation, sending a query instruction to the flash memory includes: sending the query instruction to the flash memory within a preset time after the first instruction is issued; the preset time is the execution time of the first instruction.

[0073] In this implementation, by setting the query instruction to be sent to the flash memory within the preset time length of sending the first instruction, it helps to ensure that the flash memory receives the query instruction after executing the first instruction, thereby helping to ensure the accuracy of the execution result.

[0074] In another possible implementation, when the second instruction is a read instruction, sending a query instruction to the flash memory includes: after receiving data of a preset value returned by the flash memory, sending the query instruction to the flash memory.

[0075] In this implementation, the controller is set to send a query instruction to the flash memory after receiving data of a preset value returned by the flash memory. This helps the flash memory to execute as many read instructions as possible (i.e., the preset value) during the execution of write instructions / erase instructions, thereby helping to improve the bandwidth of the read instructions.

[0076] In a fifth aspect, a data processing device is provided, comprising: a functional unit for executing any one of the methods provided in the first aspect, wherein the actions performed by each functional unit are implemented through hardware or through hardware executing corresponding software implementations. For example, the data processing device may include: a processing unit; the processing unit is configured to, in response to a first instruction, perform a first operation on a first storage space based on a first page register; the first instruction is configured to instruct the first operation to be performed on the first storage space, the first instruction including a read instruction, a write instruction, or an erase instruction; the processing unit is further configured to, during the execution of the first instruction, in response to a second instruction, perform a second operation on a second storage space based on a second page register; the second instruction is configured to instruct the second operation to be performed on the second storage space; wherein the second instruction includes a read instruction, a write instruction, or an erase instruction.

[0077] In a sixth aspect, a data processing device is provided, the device comprising: a functional unit for executing any one of the methods provided in the second aspect, wherein the actions executed by each functional unit are implemented by hardware or by hardware executing corresponding software implementations. For example, the data processing device may include a processing unit; the processing unit is configured to write the data to be written into a first page register in response to a write instruction, and write the data to be written in the first page register into a first storage space; wherein the write instruction includes the data to be written and the address to be written, and the address to be written is the address corresponding to the first storage space; the processing unit is further configured to read the data in the second storage space into the second page register in response to a read instruction during the execution of the write instruction, and return the data in the second page register to the device that sent the read instruction; wherein the read instruction includes the address to be read, and the address to be read is the address corresponding to the second storage space.

[0078] In a seventh aspect, a data processing device is provided, comprising: a functional unit for executing any one of the methods provided in the third aspect, wherein the actions executed by each functional unit are implemented by hardware or by hardware executing corresponding software implementations. For example, the data processing device may include a processing unit; the processing unit is configured to write a preset value to a first page register in response to an erase instruction, and write the preset value in the first page register to a first storage space; wherein the erase instruction includes an erase address, and the erase address is an address corresponding to the first storage space; the processing unit is further configured to read data in the second storage space into the second page register in response to a read instruction during the execution of the erase instruction, and return the data in the second page register to the device that sent the read instruction; wherein the read instruction includes a to-be-read address, and the to-be-read address is an address corresponding to the second storage space.

[0079] In an eighth aspect, a data processing device is provided, comprising: a functional unit for executing any one of the methods provided in the second aspect, wherein the actions performed by each functional unit are implemented through hardware or through hardware executing corresponding software implementations. For example, the data processing device may include: a sending unit; the sending unit is configured to send a first instruction to a flash memory; the first instruction is configured to instruct the flash memory to perform a first operation on a first storage space, the first instruction including a read instruction, a write instruction, or an erase instruction; the sending unit is further configured to send a second instruction to the flash memory; the second instruction is configured to instruct the flash memory to perform a second operation on a second storage space during the execution of the first instruction; wherein the second instruction includes a read instruction, a write instruction, or an erase instruction.

[0080] In the ninth aspect, a flash memory is provided, including: a target plane, the target plane including a microprocessor, a first page register, a second page register, a first storage space and a second storage space, the microprocessor is connected to both the first page register and the second page register, the first page register is connected to the first storage space, and the second page register is connected to the second storage space.

[0081] It should be noted that in the ninth aspect, the flash memory can be used to execute any one of the methods provided in the first aspect, or any one of the methods provided in the second aspect, or any one of the methods provided in the third aspect.

[0082] In the tenth aspect, a storage device is provided, including: a controller and a flash memory, the controller being communicatively connected to the flash memory; the controller being used to send a read instruction, a write instruction or an erase instruction to the flash memory; wherein the flash memory includes a target plane, the target plane includes a microprocessor, a first page register, a second page register, a first storage space and a second storage space, the microprocessor is connected to both the first page register and the second page register, the first page register is connected to the first storage space, and the second page register is connected to the second storage space.

[0083] Optionally, the storage device includes a solid state drive SSD, an external flash memory TF card, a secure data SD memory card or an embedded multimedia card EMMC.

[0084] It should be noted that in the tenth aspect, the flash memory can be used to execute any one of the methods provided in the first aspect, or any one of the methods provided in the second aspect, or any one of the methods provided in the third aspect. The controller can be used to execute any one of the methods provided in the fourth aspect.

[0085] In the eleventh aspect, a computer device is provided, comprising: a mainboard and a storage device, the storage device being connected to the mainboard; the storage device comprising a controller and a flash memory, the controller being communicatively connected to the flash memory; wherein the flash memory comprises a target plane, the target plane comprising a microprocessor, a first page register, a second page register, a first storage space and a second storage space, the microprocessor being connected to both the first page register and the second page register, the first page register being connected to the first storage space, and the second page register being connected to the second storage space.

[0086] Optionally, the storage device includes a solid state drive SSD, an external flash memory TF card, a secure data SD memory card or an embedded multimedia card EMMC.

[0087] It should be noted that in the seventh aspect, the flash memory can be used to execute any one of the methods provided in the first aspect, or any one of the methods provided in the second aspect, or any one of the methods provided in the third aspect. The controller can be used to execute any one of the methods provided in the fourth aspect.

[0088] In a twelfth aspect, a computer device is provided, comprising: a processor and a memory, wherein the processor is connected to the memory. The memory is configured to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory, thereby implementing any one of the methods provided in the first, second, third, or fourth aspects.

[0089] In the thirteenth aspect, a chip is provided, which includes: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute any one of the methods provided in the first, second, third or fourth aspects above.

[0090] In the fourteenth aspect, a computer-readable storage medium is provided, which stores computer execution instructions. When the computer execution instructions are run on a computer, the computer executes any one of the methods provided in the first, second, third or fourth aspects above.

[0091] In the fifteenth aspect, a computer program product is provided, comprising computer execution instructions, which, when the computer execution instructions are run on a computer, enable the computer to execute any one of the methods provided in the first, second, third or fourth aspects above.

[0092] Among them, the technical effects brought about by any implementation method in the fifth to fifteenth aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] FIG1 is an architecture diagram of a computer device provided in an embodiment of the present application;

[0094] FIG2 is a schematic diagram of a storage device provided in an embodiment of the present application;

[0095] FIG3 is a schematic diagram of another computer device provided in an embodiment of the present application;

[0096] FIG4 is a schematic diagram of a flash memory provided in an embodiment of the present application;

[0097] FIG5 is a flow chart of a data processing method provided in an embodiment of the present application;

[0098] FIG6 is a flowchart of another data processing method provided in an embodiment of the present application;

[0099] FIG7 is a schematic diagram of interaction between a controller and a flash memory provided in an embodiment of the present application;

[0100] FIG8 is a schematic diagram of another interaction between a controller and a flash memory provided by an embodiment of the present application;

[0101] FIG9 is a flowchart of another data processing method provided in an embodiment of the present application;

[0102] FIG10 is a flowchart of another data processing method provided in an embodiment of the present application;

[0103] FIG11 is a schematic diagram of another data processing device provided in an embodiment of the present application;

[0104] FIG12 is a schematic diagram of another data processing device provided in an embodiment of the present application;

[0105] FIG13 is a schematic diagram of another data processing device provided in an embodiment of the present application;

[0106] FIG14 is a schematic diagram of another data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0107] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0108] In the description of this application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0109] Furthermore, in the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0110] In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0111] First, the application scenarios of the embodiments of the present application are exemplarily introduced.

[0112] Flash memory is a type of non-volatile memory (NVRAM). In other words, the data in the flash memory will not disappear after power is turned off.

[0113] Currently, flash memory typically consists of multiple logical units, each of which is composed of multiple planes. Flash memory uses a sequential execution strategy for multiple instructions within a plane based on access protocols (ONFI / TOGGLE). In other words, the flash memory can only execute another instruction on a plane after it has completed executing one instruction on the same plane.

[0114] Exemplarily, the multiple planes include a first plane, the first plane includes multiple storage spaces and a page register. After receiving a first instruction (such as a write instruction or an erase instruction) for the multiple storage spaces, the flash memory executes the first instruction based on the page register. After executing the first instruction, the flash memory receives a second instruction for the multiple storage spaces, and after executing the second instruction based on the page register, receives a third instruction for the multiple storage spaces.

[0115] In this case, when flash memory is used in scenarios with high performance requirements, such as artificial intelligence (AI) and virtual reality (VR), the performance of the flash memory usually cannot meet the requirements.

[0116] Therefore, how to improve the performance of flash memory has become a technical problem that needs to be solved urgently.

[0117] In view of this, an embodiment of the present application provides a data processing method, wherein the target plane of the flash memory includes a first page register, a second page register, a first storage space, and a second storage space. Based on this, when the flash memory responds to the first instruction and executes the first operation (such as a write instruction, a read instruction, or an erase instruction) on the first storage space based on the first page register, it can simultaneously respond to the second instruction and execute the second instruction (such as a write instruction, a read instruction, or an erase instruction) on the second storage space based on the second page register, thereby achieving parallel execution of the first instruction and the second instruction. On the one hand, since the flash memory executes the first instruction and the second instruction in parallel based on different page registers, the second instruction does not have to wait for the first instruction to be executed before executing, that is, it does not have to wait for the first page register to be idle before executing the second instruction based on the first page register, nor does it have to occupy the first page register required for executing the first instruction. Therefore, while ensuring that the first instruction can be executed normally, the waiting delay of the second instruction is effectively avoided, thereby improving the performance of the flash memory. On the other hand, since the second instruction is executed in parallel during the execution of the first instruction, the number of second instructions executed per unit time by the flash memory can also be increased.

[0118] Next, the system architecture of the embodiment of the present application is exemplarily introduced.

[0119] As shown in FIG1 , it is an architecture diagram of a computer device provided in an embodiment of the present application.

[0120] Referring to Figure 1 , a computer device may include a motherboard, a processor, and a storage device. The processor is disposed on the motherboard, and the processor is connected to the storage device via the motherboard. The number of storage devices may be one or more, and Figure 1 illustrates one storage device.

[0121] In an embodiment of the present application, the processor is mainly used to send a read request, a write request, etc. to the storage device to read data stored in the storage device, write data to be written to the storage device, etc.

[0122] Optionally, the computer device includes a terminal device and a network device.

[0123] Terminal devices may include mobile phones, augmented reality (AR) devices, virtual reality (VR) devices, personal digital assistants (PDAs), ultra-mobile personal computers (UMPCs), tablet computers, laptops, netbooks, desktop computers, all-in-one computers, etc.

[0124] The network device may include a server, etc. The server may be a single physical or logical server, or may be two or more physical or logical servers that share different responsibilities and work together to implement various server functions.

[0125] Optionally, the processor may include a central processing unit (CPU) or a management controller.

[0126] The management controller is completely independent of the CPU of the computer device and can communicate with the CPU through the out-of-band management interface of the computer device. In addition, the management controller can remotely maintain and manage the data of the computer device through a dedicated data channel.

[0127] Exemplarily, the management controller may include a monitoring management unit external to the computer device, a management system in a management chip external to the processor, a baseboard management controller (BMC), a system management module (SMM), etc. It should be noted that the embodiments of the present application do not limit the form of the management controller, and the above is only an example. In the following embodiments, the management controller is only described as a BMC.

[0128] It should be noted that different computer devices have different names for BMC. For example, some computer devices call it BMC, some computer devices call it iLO, and some computer devices call it iDRAC. Regardless of whether it is called BMC, iLO or iDRAC, it can be understood as the BMC in the embodiments of the present invention.

[0129] FIG2 is a schematic structural diagram of the storage device shown in FIG1 .

[0130] 2 , the storage device may include a controller and a flash memory. The controller is connected to the flash memory via an interface that complies with the ONFI / TOGGLE protocol.

[0131] In an embodiment of the present application, the controller is used to receive read requests, write requests, etc. sent by the processor, and in response to the read requests, write requests, etc., send read instructions, write instructions, etc. to the flash memory to read data stored in the flash memory, write data to be written to the flash memory, etc.

[0132] In addition, the controller can also be used to send an erase instruction to the flash memory to instruct the flash memory to erase data in a specified storage block.

[0133] In this embodiment, the storage device may further include volatile memory (VM). The volatile memory is located within the storage device; in other words, the volatile memory is part of the storage device. The volatile memory is communicatively connected to the controller. The volatile memory is used to store the firmware program. The controller performs the above-described actions by running the firmware program in the volatile memory.

[0134] Alternatively, the storage device may not include volatile memory, and the computer device may include volatile memory, which is set on the motherboard and located outside the storage device. The controller can communicate with the volatile memory on the motherboard and run the firmware program in the volatile memory to perform the above actions.

[0135] It should be noted that the embodiment of the present application does not limit the location of the volatile memory. The following is only an exemplary description, and the following description is based on the example of the volatile memory being located inside the storage device.

[0136] In this embodiment, the volatile memory may be a static random-access memory (SRAM) or a dynamic random access memory (DRAM).

[0137] Optionally, the storage device may be a solid state drive (SSD), an embedded multimedia card (EMMC), an external flash memory card (TF card), or a secure digital memory card (SD memory card).

[0138] It should be noted that a storage device may include one or more flash memories, and the number of flash memories configured for different types of storage devices may be the same or different, and the embodiments of the present application do not impose any restrictions on this.

[0139] Based on the above, in the first case, the embodiment of the present application can be implemented by the first computer device shown in (a) of Figure 3. In the first computer device, the storage device is an SSD and the processor is a CPU.

[0140] In the second case, the embodiment of the present application can be implemented by the second computer device shown in (b) of Figure 3. In the second computer device, the storage device is an EMMC, and the processor is a management controller.

[0141] In the third case, the embodiment of the present application can be implemented by the third computer device shown in (c) of Figure 3. In the third computer device, the storage device is a TF card and the processor is a CPU.

[0142] In the fourth case, the embodiment of the present application can be implemented by the fourth computer device shown in (d) of Figure 3. In the third computer device, the storage device is an SD memory card, and the processor is a CPU.

[0143] It should be noted that the embodiments of the present application do not limit the specific form of the computer device that implements the data processing method in the following embodiments. The above is only an exemplary description. In the following embodiments, only the first computer device is used as an example for description.

[0144] Optionally, the flash memory (Flash) may be a NAND flash memory (NandFlash).

[0145] It should be noted that the embodiments of the present application do not limit the specific form of the flash memory, and the above is only an exemplary description.

[0146] FIG4 is a schematic diagram showing the structure of the flash memory shown in FIG2 .

[0147] In the embodiment of the present application, the flash memory can be divided into logical units (LUNs), planes, blocks, pages, and cells from the upper level to the lower level.

[0148] 4 , the flash memory may include a plurality of logic units. For example, the plurality of logic units are logic unit 1, . . . , logic unit N, where N is a positive integer greater than 1.

[0149] In this embodiment, the flash memory further includes a microprocessor that is in communication with the controller and configured to receive read instructions, write instructions, erase instructions, etc. sent by the controller and execute the read instructions, write instructions, erase instructions, etc.

[0150] Exemplarily, the microprocessor may be a microcontroller unit (MCU) or the like.

[0151] It should be noted that the embodiments of the present application do not limit the specific form of the microprocessor, and the above is only an exemplary description.

[0152] For example, the execution time of a read operation is about 50 microseconds, the execution time of a write operation is about 630 microseconds, and the execution time of an erase operation is about 9000 microseconds. That is to say, the execution time of a read operation is the shortest, the execution time of a write operation is about 12 times that of a read operation, and the execution time of an erase operation is about 180 times that of a read operation.

[0153] The following uses logic unit 1 as an example to illustrate the structures of multiple logic units.

[0154] The logic unit 1 may include a plurality of planes, for example, the plurality of planes include plane 0 and plane 1.

[0155] Optionally, plane 0 includes multiple blocks, for example, the multiple blocks are block 0, block 2, ..., block B, where B is an even number greater than 2.

[0156] Each of the multiple blocks may include multiple pages, for example, the multiple pages are page 0, page 1, . . . , page K, where K is a positive integer greater than 1.

[0157] In this embodiment, plane 0 may further include a first page register (page register 1) and a second page register (page register 2).

[0158] The first page register and the second page register are respectively connected to each page in plane 0 for communication.

[0159] In this embodiment, the first page register is used to cache data to be written to plane 0, and the second page register is used to cache data read from plane 0. Based on this, the flash memory executes a write instruction or an erase instruction based on the first page register and executes a read instruction based on the second page register.

[0160] Exemplarily, after the flash memory receives a write instruction from the controller, it first writes the data to be written carried by the write instruction into the first page register, and then writes the data to be written in the first page register into page 0 (i.e., the page indicated by the address to be written carried by the write instruction). After the flash memory receives a read instruction from the controller, it first reads the data in page 1 (i.e., the page indicated by the address to be read carried by the read instruction) into the second page register, and then returns the data in the second page register to the controller.

[0161] Alternatively, in the embodiment of the present application, both the first page register and the second page register can be used to cache data to be written to plane 0, and can also be used to cache data read from plane 0. Based on this, the flash memory can execute a read instruction, a write instruction, or an erase instruction based on any free register.

[0162] For example, when the first page register is not idle, that is, the first page register is processing a write instruction, a read instruction, or an erase instruction, the idle second page register can process another write instruction, a read instruction, or an erase instruction.

[0163] It can be understood that the idle page register refers to a page register on which no read instruction, write instruction, or erase instruction has been executed.

[0164] Exemplarily, after the flash memory receives a write instruction from the controller, it first writes the data to be written carried by the write instruction into the idle page register (such as the first page register), and then writes the data to be written in the first page register into page 0 (i.e., the page indicated by the address to be written carried by the write instruction). After the flash memory receives a read instruction from the controller, it first reads the data in page 1 (i.e., the page indicated by the address to be read carried by the read instruction) into the idle page register (i.e., the second page register), and then returns the data in the second page register to the controller.

[0165] It should be noted that the write instructions, read instructions or erase instructions executed by the flash memory can be specifically executed by a microprocessor on the flash memory, or can also be executed by other hardware or software programs on the flash memory. The embodiments of the present application do not limit this.

[0166] For the relevant description of plane 1, please refer to the above description of plane 0, which will not be repeated here.

[0167] It should be noted that the embodiments of the present application do not limit the number of logical units in the flash memory, the number of planes in the logical unit, the number of blocks in the plane, and the number of pages in the block. The above is only an example.

[0168] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0169] For ease of understanding, the data processing method provided by this application is exemplarily described below with reference to the accompanying drawings. The data processing method is applicable to the computer device, storage device, and flash memory shown in Figures 1 to 4 above.

[0170] It should be noted that the data processing method of the embodiment of the present application will be described below using an SSD as an example of a storage device.

[0171] The following embodiments of this application will be divided into four parts to exemplarily introduce the scheme of the data processing method.

[0172] The first part, in conjunction with FIG5 , introduces a process in which a storage device executes a first instruction and a second instruction simultaneously and in parallel.

[0173] The second part, in conjunction with FIG6 to FIG8, introduces a process in which the storage device executes a write instruction and a read instruction in parallel when the first operation is a write instruction and the second operation is a read instruction.

[0174] The third part, in conjunction with FIG9 , introduces a process in which the storage device executes the erase instruction and the read instruction in parallel when the first operation is an erase instruction and the second operation is a read instruction.

[0175] The fourth part, in conjunction with FIG10 , introduces the process in which the first operation is an erase instruction, the second operation is a write instruction, and the storage device executes the erase instruction and the write instruction.

[0176] The following introduces the first part of the embodiment of the present application in conjunction with FIG5 .

[0177] Fig. 5 is a flow chart showing a data processing method according to an exemplary embodiment. Exemplarily, the method includes S501-S504.

[0178] In this embodiment, the flash memory includes at least one plane, and the at least one plane includes a target plane, wherein the target plane can be any one of the at least one plane.

[0179] It should be noted that, in this embodiment, the data processing method is exemplarily described by taking the target plane as an example.

[0180] The target plane includes a first page register, a second page register, a first storage space, and a second storage space.

[0181] S501: The controller sends a first instruction to the flash memory, where the first instruction is used to instruct to perform a first operation on a first storage space.

[0182] Optionally, the first instruction includes a write instruction, an erase instruction, or a read instruction.

[0183] The write instruction is used to instruct a write operation to be performed on the first storage space, the erase instruction is used to instruct an erase operation to be performed on the first storage space, and the read instruction is used to instruct a read operation to be performed on the first storage space.

[0184] Based on the above, it can be understood that the first operation includes a write operation, an erase operation, or a read operation.

[0185] In this embodiment, after receiving the first request sent by the CPU, the controller sends a first instruction to the flash memory in response to the first request. When the first request is a write request, the first instruction is a write instruction or an erase instruction. When the first request is a read request, the first instruction is a read instruction.

[0186] In one example, the write request is used to request writing the data to be written to the first storage space, and the first storage space is empty or erased, then the first instruction is a write instruction, in other words, the controller directly instructs the flash memory to write the data to be written to the first storage space.

[0187] In another example, a write request is used to request writing to-be-written data to a first storage space, and old data is stored in the first storage space. In this case, the first instruction is an erase instruction. In other words, the controller first instructs the flash memory to erase the old data in the first storage space, thereby placing the first storage space in an erased state. Thereafter, the controller instructs the flash memory to write the to-be-written data to the first storage space.

[0188] S502: The flash memory executes a first operation on a first storage space based on a first page register in response to a first instruction.

[0189] In this embodiment, after receiving the first instruction, the flash memory performs the first operation on the first storage space based on the first page register in response to the first instruction. In other words, the flash memory executes the first instruction based on the first page register.

[0190] Exemplarily, the microprocessor, which may be a flash memory, receives a first instruction and executes the first instruction based on a first page register in response to the first instruction.

[0191] It should be noted that, in this embodiment, the first instruction executed by the flash memory may be specifically executed by a microprocessor of the flash memory, which will not be further explained later.

[0192] Optionally, S502 includes multiple implementation methods, which are exemplified below using Methods 1 to 3.

[0193] Mode 1: The first instruction is a write instruction, the first instruction includes an address to be written and data to be written, and the address to be written is an address corresponding to the first storage space.

[0194] Based on this, S502 includes: the flash memory writes the to-be-written data into the first page register in response to the write instruction, and writes the data in the first page register into the first storage space.

[0195] In this embodiment, after receiving the write instruction, the flash memory first writes the data to be written into the first page register, and then writes the data to be written in the first page register into the first storage space.

[0196] In method 1, the flash memory writes the data to be written into the first page register and then writes the data to be written in the first page register into the first storage space, thereby writing the data to be written into the first storage space based on the first page register. Because the flash memory does not need to use the second page register when executing a write instruction, the second page register can be kept idle, thereby ensuring that there is no resource (i.e., page register) conflict between the first instruction and the second instruction. In this way, the second page register can be used to execute the second instruction, thus avoiding the situation where the flash memory cannot execute the second instruction due to a lack of idle page registers during the execution of the write instruction.

[0197] Mode 2: The first instruction is an erase instruction, and the first instruction includes an address to be erased, and the address to be erased is an address corresponding to the first storage space.

[0198] Based on this, S502 includes: the flash memory writes the preset value into the first page register in response to the erase instruction, and writes the preset value in the first page register into the first storage space.

[0199] The preset value is used to indicate that the first storage space is in an erased state.

[0200] It should be noted that the preset value is a value stored in an erased storage space in the related art. For example, the preset value is FFH, where H is used to indicate that FF is a hexadecimal value.

[0201] Exemplarily, after receiving the erase instruction, the flash memory first writes a preset value (such as FFH) into the first page register, and then writes the preset value in the first page register into the first storage space.

[0202] It can be understood that, since in the related art, the flash memory only writes data to the storage space that is empty or in an erased state, therefore, writing the preset value to the first storage space is equivalent to marking the first storage space as erased, so that the flash memory can write data to the first storage space.

[0203] It should be noted that the embodiments of the present application may also set the data in the first storage space to a preset value in other ways, for example, by discharging the first storage space based on the first page register. Furthermore, the embodiments of the present application may also erase the first storage space using an erase operation known in the related art. In other words, the embodiments of the present application do not limit how the first storage space is erased.

[0204] In Method 2, based on the data in the erased storage space of the flash memory being a preset value, the flash memory writes the preset value into the first page register and then writes the preset value in the first page register into the first storage space, thereby erasing the old data in the first storage space based on the first page register. Because the flash memory does not need to use the second page register when executing the erase instruction, the second page register can be kept idle, thereby ensuring that there is no resource (i.e., register) conflict between the first instruction and the second instruction. In this way, the second page register can be used to execute the second instruction, thus avoiding the situation where the flash memory cannot execute the second instruction due to a lack of idle page registers during the execution of the erase instruction.

[0205] Mode 3: The first instruction is a read instruction, and the first instruction includes an address to be read, and the address to be read is an address corresponding to the first storage space.

[0206] Based on this, S502 includes: the flash memory reads the data in the first storage space into the first page register in response to the read instruction, and returns the data in the first page register to the controller.

[0207] In this embodiment, after receiving the read instruction, the flash memory reads the data in the first storage space into the first page register, and then returns the data in the first page register to the controller.

[0208] It should be noted that for other related instructions of Method 3, please refer to Method 1 to Method 2 above, which will not be repeated here.

[0209] S503: The controller sends a second instruction to the flash memory.

[0210] In the process of the flash memory executing the first instruction, the second instruction is used to instruct the flash memory to perform a second operation on the second storage space.

[0211] In this embodiment, if the first instruction is a write instruction, the process of executing the first instruction includes: writing the data to be written into the first page register and writing the data to be written in the first page register into the first storage space. If the first instruction is an erase instruction, the process of executing the first instruction includes: writing a preset value into the first page register and writing the preset value in the first page register into the first storage space. If the first instruction is a read instruction, the process of executing the first instruction includes: reading the data in the first storage space into the first page register and returning the data in the first page register to the device that sent the first instruction (i.e., the controller).

[0212] In this embodiment, after receiving the second request from the CPU, the controller sends the second instruction to the flash memory in response to the second request, without waiting for the flash memory to complete executing the first instruction. Therefore, compared to the related art where the controller waits until the flash memory has completed executing the first instruction before sending the second instruction to the flash memory, this helps improve the bandwidth of the flash memory, allowing the flash memory to receive more instructions per unit time, thereby allowing the flash memory to execute different instructions in parallel, thereby improving the performance of the flash memory.

[0213] It should be noted that after the controller sends the first instruction to the flash memory, it can send the second instruction to the flash memory without confirming whether the flash memory is executing the first instruction. In other words, the controller can send the second instruction to the flash memory regardless of whether the flash memory starts executing the first instruction.

[0214] It should be noted that for the relevant descriptions about the second request, the second instruction, and the second operation, reference may be made to the relevant descriptions about the first request, the first instruction, and the first operation in the above S501, which will not be repeated here.

[0215] S504: The flash memory performs a second operation on the second storage space based on the second page register in response to the second instruction during the execution of the first instruction.

[0216] In this embodiment, the flash memory receives the second instruction while executing the first instruction. Since the execution of the first instruction only occupies the first page register, and the second page register is in an idle state, the flash memory can immediately respond to the second instruction and perform the second operation on the second storage space based on the second page register in the idle state. In other words, while the flash memory is executing the first instruction based on the first page register, the flash memory can execute the second instruction based on the second page register in the idle state.

[0217] Compared with the related art, since the second instruction does not have to wait for the first instruction to be executed before it can be executed, the execution time of the second instruction does not include the time waiting for the first operation to be completed. In other words, the waiting time of the second instruction is avoided. Obviously, this can significantly reduce the execution time of the second instruction and help improve the performance of the flash memory in executing the second operation.

[0218] It should be noted that, in this embodiment, the second instruction executed by the flash memory may be specifically executed by a microprocessor of the flash memory, which will not be further explained later.

[0219] Based on this, S504 includes multiple implementation methods, and the following is exemplified by methods A to C.

[0220] Mode A: The second instruction is a read instruction, and the second instruction includes an address to be read, and the address to be read is an address corresponding to the second storage space.

[0221] Based on this, S504 includes: the flash memory reads the data in the second storage space into the second page register in response to the read instruction, and returns the data in the second page register to the controller.

[0222] In this embodiment, when the flash memory executes the first instruction based on the first page register, the second page register is in an idle state. Based on this, after the flash memory receives the read instruction, it reads the data in the second storage space into the second page register, and then returns the data in the second page register to the controller.

[0223] In method A, the flash memory reads data from the second storage space into the second page register and returns the data in the second page register to the controller, thereby returning the to-be-read data to the controller based on the second page register. Since the first page register is not required to execute the read instruction, the first page register is guaranteed to be used to execute the first instruction. This prevents the flash memory from occupying the first page register required for executing the first instruction during the execution of the read instruction, thereby preventing the later executed read instruction from affecting the first instruction that was executed earlier.

[0224] In this embodiment, the second storage space and the second storage space are different storage spaces.

[0225] In this embodiment, by setting the first storage space and the second storage space as different storage spaces, the flash memory will not use the data in the first storage space during the process of executing the first instruction on the first storage space. In this way, the flash memory can be prevented from using erroneous data, thereby helping to improve the data accuracy of the second instruction executed later.

[0226] In one example, the first storage space is a first block, the second storage space is a page in the second block, and the first block and the second block are different blocks. For example, the first instruction is an erase instruction, and the second instruction is a read instruction or a write instruction.

[0227] In this embodiment, by setting the first block and the second block as different blocks, the flash memory will not read the data in the first block during the process of executing the erase instruction (i.e., the first instruction) on the first block. In this way, the flash memory can avoid reading erroneous data, such as reading the preset value in the first block, thereby helping to improve the data accuracy of the read instruction (i.e., the second instruction) executed later.

[0228] In another example, the first storage space is a first page, and the second storage space is a second page. The first page and the second page may be different pages on different blocks, or they may be different pages on the same block. For example, the first instruction is a write instruction, and the second instruction is a read instruction.

[0229] In this embodiment, by setting the first page and the second page as different pages, the flash memory will not read the data in the first page during the process of executing the write instruction (i.e., the first instruction) on the first page. In this way, the flash memory can avoid reading erroneous data, thereby helping to improve the data accuracy of the read instruction (i.e., the second instruction) executed later.

[0230] For example, the second instruction is originally intended to read new data in the first storage space (i.e., the data to be written in the first instruction). However, if the first instruction has not been executed, in other words, the data to be written in the first instruction has not yet been written to the first storage space, the second page register reads the data in the first storage space, which will cause the second instruction to read incorrect data.

[0231] Mode B: The second instruction is a write instruction, and the second instruction includes an address to be written and data to be written, and the address to be written is an address corresponding to the second storage space.

[0232] Based on this, S504 includes: the flash memory writes the to-be-written data into the second page register in response to the write instruction, and writes the to-be-written data in the second page register into the second storage space.

[0233] It should be noted that for other relevant instructions of Method B, please refer to the above Method A and will not be repeated here.

[0234] Mode C: The second instruction is an erase instruction, and the second instruction includes an address to be erased, and the address to be erased is an address corresponding to the second block.

[0235] Based on this, S504 includes: the flash memory writes the preset value into the second page register in response to the erase instruction, and writes the preset value in the second page register into the second block.

[0236] The preset value is used to indicate that the second block is in an erased state.

[0237] It should be noted that for other relevant instructions of Method C, please refer to the above Method A and will not be repeated here.

[0238] In this embodiment, the first instruction and the second instruction may be instructions of the same type, in other words, the first operation and the second operation are operations of the same type. Exemplarily, the first operation and the second operation are both write operations, or both read operations, or both erase operations.

[0239] Alternatively, the first instruction and the second instruction may be instructions of different types. In other words, the first operation and the second operation may be operations of different types. For example, the first operation may be a write operation or an erase operation, and the second operation may be a write operation, or the first operation may be an erase operation and the second operation may be a write operation.

[0240] In the above embodiment, after the controller sends the first instruction to the flash memory, it continues to send the second instruction to the flash memory, so that the flash memory can receive the second instruction while executing the first instruction on the first storage space. Because the target plane of the flash memory includes a first page register, a second page register, a first storage space, and a second storage space, the flash memory can simultaneously execute the second instruction based on the second page register while executing the first instruction based on the first page register, thereby achieving parallel execution of the first and second instructions. On the one hand, because the flash memory executes the first and second instructions in parallel based on different page registers, the second instruction does not have to wait for the first instruction to complete execution before executing. In other words, it does not have to wait for the first page register to be idle before executing the second instruction based on the first page register, nor does it have to occupy the first page register required for executing the first instruction. Therefore, while ensuring that the first instruction can be executed normally, the waiting delay of the second instruction is effectively avoided, thereby improving the performance of the flash memory. On the other hand, because the second instruction is executed in parallel during the execution of the first instruction, the number of second instructions executed per unit time by the flash memory can also be increased.

[0241] The second part of the embodiment of the present application is introduced below with reference to FIG. 6 to FIG. 8 .

[0242] Fig. 6 is a flow chart showing a data processing method according to an exemplary embodiment. Exemplarily, the method includes S601-S610.

[0243] It should be noted that for the relevant description of the flash memory in this embodiment, please refer to the first part above, which will not be repeated here.

[0244] S601: The controller sends a write instruction to the flash memory.

[0245] It should be noted that for the relevant description of S601, please refer to the relevant description of the write instruction in S501, which will not be repeated here.

[0246] S602: The flash memory performs a write operation on the first storage space based on the first page register in response to the write instruction.

[0247] It should be noted that for the relevant description of S602, please refer to the relevant description of the write instruction in S502, which will not be repeated here.

[0248] S603: The controller sends a first read instruction to the flash memory.

[0249] The first read instruction is used to instruct the flash memory to perform a first read operation on the second storage space.

[0250] Exemplarily, the first read instruction includes an address to be read, which is an address corresponding to the second storage space. In other words, the first read instruction is used to instruct reading data in the second storage space of the target plane.

[0251] In this embodiment, the first read instruction may be a sequential read instruction, which includes a to-be-read address and a target value. The to-be-read address is the starting address of the sequential read instruction, and the target value is used to indicate the amount of data to be read.

[0252] In which, during the process of the flash memory executing a write instruction, the sequential read instruction is used to instruct the flash memory to perform a sequential read operation. In other words, the sequential read instruction is used to instruct the flash memory to start from the starting space corresponding to the starting address and perform read operations on multiple subspaces of the second storage space in sequence, wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address among the multiple subspaces, and the number of times the read operation is performed corresponds to the target value.

[0253] Exemplarily, the number of times the read operation is performed corresponds to the target value, and may be the same as the target value. For example, if the target value is 5, then 5 read operations are performed. In addition, it is understood that the amount of data read by the sequential read operation is the same as the number of times the read operation is performed.

[0254] Based on the above, it can be understood that when the first instruction is a sequential read instruction, the first read operation is a sequential read operation.

[0255] In this embodiment, the storage space read by the sequential read operation is different from the storage space into which the to-be-written data is written by the write operation.

[0256] Exemplarily, a write instruction instructs writing the data to be written to page 0 of the target plane, and a sequential read operation reads data from pages 1 to N of the target plane, where N is a positive integer greater than 2. Pages 1 to N are multiple subspaces in the second storage space, and the second storage space may be a block, where each page included in the block is a subspace, and page 0 is different from page 1, ..., page N.

[0257] In this embodiment, by setting the first read instruction as a sequential read instruction, the amount of data read by the flash memory during the process of executing the write instruction is the target value, which not only helps to increase the amount of data read by the flash memory during the process of executing the write instruction, but also helps to increase the diversity of the types of read instructions executed.

[0258] Optionally, the target plane further includes at least one third storage space. The data processing method further includes: the controller sending at least one second read instruction to the flash memory. The at least one second read instruction is used to instruct execution of at least one second read operation on the at least one third storage space.

[0259] In an embodiment of the present application, after receiving the data requested to be read by the second read instruction returned by the flash memory, the controller sends at least one second read instruction to the flash memory.

[0260] It should be noted that the third storage space and the second storage space can be the same storage space, or they can be different storage spaces, and this embodiment of the present application does not limit this.

[0261] In this embodiment, the total execution time of the at least one second read instruction is less than or equal to the execution time of the write instruction.

[0262] For example, if the execution time of a write instruction is approximately 12 times that of a read instruction, then at least one second read instruction can be 11 read instructions. In this way, the flash memory can execute 12 read instructions (i.e., 1 first read instruction and 11 second read instructions) during the execution of the write instruction, which helps to make full use of the execution time period of the write instruction and maximize the bandwidth of the read instruction.

[0263] Exemplarily, the at least one second read instruction includes read instruction 1, ..., read instruction N, where N is a positive integer greater than 1.

[0264] Among them, read instruction 1 is used to instruct reading data 1 in page 1 of the target plane, ..., and read instruction N is used to instruct reading data N in page N of the target plane.

[0265] For example, after sending read instruction 1 to the flash memory, the controller receives data 1 in page 1 returned by the flash memory, and then sends read instruction 2 to the flash memory. Based on the same principle, after receiving data N-1 in page N-1 returned by the flash memory, the controller sends read instruction N to the flash memory. At this point, the controller has sent N read instructions to the flash memory.

[0266] Since the execution time of a write instruction is approximately 12 times that of a read instruction, based on this, during the process of the flash memory executing a write instruction, the controller sends at least one second read instruction to the flash memory. In this way, during the process of the flash memory executing a write instruction, at least one read instruction can be executed, which helps to increase the number of read instructions executed by the flash memory per unit time.

[0267] It should be noted that "the controller sends at least one second read instruction to the flash memory" can be considered as a specific implementation method of "sending at least one third instruction to the flash memory when the execution time of the first instruction is greater than the execution time of the second instruction."

[0268] It should be noted that for the relevant description of S603, refer to the relevant description of the read instruction in S503, which will not be repeated here.

[0269] S604: The flash memory performs a first read operation on the second storage space based on the second page register in response to the first read instruction during the execution of the write instruction.

[0270] In this embodiment, based on the second page register, a first read operation is performed on the second storage space, including: reading the data instructed to be read by the first read instruction into the second page register, and returning the data in the second page register to the controller.

[0271] Exemplarily, the first read instruction indicates reading data in the second storage space of the target plane. In the process of executing the write instruction, the flash memory reads the data in the second storage space to the second page register in response to the received first read instruction, and returns the data in the second page register to the controller.

[0272] Optionally, S604 includes: in the process of executing the write instruction, the flash memory responds to the sequential read instruction and performs a sequential read operation based on the second page register.

[0273] In this embodiment, during the process of executing a write instruction, the flash memory responds to a sequential read instruction and sequentially performs a read operation on multiple subspaces of the second storage space starting from the starting space corresponding to the starting address based on the second page register.

[0274] Exemplarily, the second page register is divided into multiple subspaces in sequence according to addresses, and the multiple subspaces are page 1, ..., page K, wherein the subspace with the address ranked first is page 1.

[0275] If the address to be read indicates page 1, the starting space corresponding to the start address is page 1. If the target value carried by the sequential read instruction is K, after receiving the sequential read instruction, the flash memory performs a sequential read operation on pages 1, ..., and K, starting from page 1. It can be understood that the flash memory performs K read operations. In other words, this sequential read operation is equivalent to K read operations.

[0276] FIG7 is a schematic diagram showing the interaction between the controller and the flash memory.

[0277] Referring to Figure 7 , after receiving a sequential read command, the flash memory first reads data 1 from page 1 into the second page register and then returns data 1 from the second page register to the controller. The flash memory then sequentially reads data 2 from page 2, ..., and data K from page K into the second page register and returns data 2, ..., and data K from the second page register to the controller.

[0278] In this embodiment, sequential read instructions are sent to the flash memory so that the flash memory can perform sequential read operations on multiple pages in sequence. This not only helps to increase the amount of data read during the flash memory's execution of write instructions, but also helps to improve the diversity of read instruction types executed in parallel by the flash memory.

[0279] Optionally, the data processing method further includes: in the process of executing the write instruction, the flash memory performs at least one second read operation on at least one third storage space based on the second page register in response to at least one second read instruction received.

[0280] There is a one-to-one correspondence between at least one second read instruction and at least one second read operation.

[0281] FIG8 is another schematic diagram of interaction between the controller and the flash memory.

[0282] Referring to Figure 8 , after receiving read command 1, the flash memory first reads data 1 from page 1 into the second page register and then returns data 1 from the second page register to the controller. Based on the same principle, the flash memory sequentially receives read commands 2, ..., and N and, based on the second page register, sequentially returns data 2, ..., and N to the controller.

[0283] In this embodiment, since the execution time of a write instruction is approximately 12 times that of a read instruction, during the process of the flash memory executing a write instruction, by responding to at least one second read instruction received, at least one second read operation is performed on at least one third storage space based on a second page register, which helps to improve the bandwidth of the read instructions executed by the flash memory.

[0284] It should be noted that for the relevant description of S604, refer to the relevant description of the read instruction in S504, which will not be repeated here.

[0285] S605: The controller receives data returned by the flash memory, where the data is the data instructed to be read by the first read instruction.

[0286] Exemplarily, the first read instruction is used to instruct to read data in the second storage space of the target plane, and the data is the data in the second storage space.

[0287] In the above embodiment, after sending a write instruction to the flash memory, the controller continues to send a read instruction to the flash memory. This allows the flash memory to receive a read instruction while executing the write instruction on the first storage space. The read instruction is used to instruct the flash memory to execute the read instruction simultaneously with the execution of the write instruction. Because the target plane of the flash memory includes a first page register, a second page register, a first storage space, and a second storage space, the flash memory can simultaneously execute a read instruction based on the second page register while executing the write instruction based on the first page register, thereby achieving parallel execution of the write and read instructions.

[0288] On the one hand, because the flash memory executes write and read instructions in parallel based on different page registers, read instructions do not have to wait for the write instruction to complete before executing. In other words, there is no need to wait for the first page register to be free before executing the read instruction based on the first page register, nor does it occupy the first page register required for executing the write instruction. Therefore, while ensuring that the write instruction can be executed normally, the waiting delay of the read instruction is effectively avoided, thereby improving the performance of the flash memory. On the other hand, because the read instruction is executed in parallel with the write instruction, the number of read instructions executed per unit time by the flash memory can be increased.

[0289] Optionally, S606: the controller sends a target read instruction to the flash memory.

[0290] The target read instruction is used to instruct to read data in the second storage space.

[0291] In this embodiment, after receiving the data in the second page register returned by the flash memory, the controller sends a target read instruction to the flash memory to instruct it to read the data in the second storage space.

[0292] Optionally, S607: the flash memory returns the data in the second page register to the controller in response to the target read instruction.

[0293] In some embodiments, since the second page register already stores data in the second storage space, after receiving the target read instruction, the flash memory does not need to perform the operation of reading the data in the second storage space into the second page register, but directly performs the operation of returning the data in the second page register to the controller.

[0294] In the above embodiment, since the write instruction and the read instruction are executed based on different page registers, after the flash memory executes the read instruction, the second page register stores the data in the second storage space. Based on this, after the flash memory receives the target read instruction, it can directly return the data in the second page register to the controller, thereby improving the hit rate of the second page register. Moreover, since it is not necessary to repeatedly perform the operation of reading the data in the second storage space into the second page register, this helps to shorten the execution time of the target read instruction, thereby improving the execution efficiency of the target read instruction.

[0295] Optionally, S608: the controller sends a query instruction to the flash memory to request to query the execution result of the write instruction.

[0296] In some embodiments, after the first read instruction is executed, for example, after the controller receives data returned by the flash memory, it sends a query instruction to the flash memory to query the execution result of the write instruction.

[0297] In an example, the first read instruction is a sequential read instruction. After the controller receives the data K returned by the flash memory, it sends a query instruction to the flash memory.

[0298] In another example, the controller further sends at least one second read instruction to the flash memory. Then, after receiving the data N returned by the flash memory, the controller sends a query instruction to the flash memory.

[0299] S608 includes multiple implementation methods, and the following is an exemplary description using methods a and b.

[0300] Mode a, S608 includes: the controller sends a query instruction to the flash memory within a preset time after the write instruction is sent.

[0301] In this embodiment, the preset duration may be the execution duration of the write instruction. For example, if the execution duration of the write instruction is 630 microseconds, the controller sends the query instruction to the flash memory 630 microseconds after the write instruction is issued.

[0302] In this embodiment, by setting a preset time period after a write instruction is sent, the query instruction is sent to the flash memory. This not only helps ensure that the flash memory receives the query instruction after completing the write instruction, but also helps ensure the accuracy of the execution results. For example, this can prevent the flash memory from returning an execution failure to the controller before completing the write instruction, causing the controller to believe that the write instruction failed to execute successfully. In addition, it helps to terminate the execution of the write instruction as soon as possible so that the next operation instruction can be sent to the flash memory.

[0303] Mode b, S608 includes: when the second instruction is a read instruction, after the controller receives data returned by the flash memory for a preset number of times, it sends a query instruction to the flash memory.

[0304] It should be noted that the embodiment of the present application does not limit the specific value of the preset number of times.

[0305] Exemplarily, the preset number of times can be determined based on the read instruction sent by the controller. As shown above, if the first read instruction is a sequential read instruction, the preset number of times can be K. If the controller also sends at least one second read instruction to the flash memory, the preset number of times can be N+1.

[0306] Exemplarily, the user can set a preset number of times based on the execution time of the write instruction and the execution time of the read instruction. For example, the product of the preset number of times and the execution time of the read instruction can be set to be greater than or equal to the execution time of the write instruction.

[0307] For example, the execution time of a write instruction is 12 times that of a read instruction. In other words, while the flash memory executes one write instruction, 12 read instructions can be executed in parallel. Then, while the flash memory executes the write instruction, the controller can send 12 read instructions to the flash memory. In this way, after the controller receives the 12 data returned by the flash memory, it sends a query instruction to the flash memory.

[0308] In this method, after receiving the data returned by the flash memory a preset number of times, a query instruction is sent to the flash memory. This not only helps to make full use of the time period of the flash memory to execute write instructions, but also allows the execution of as many read instructions as possible (i.e., the preset number of times) during the execution of the write instructions, thereby improving the bandwidth of the read instructions.

[0309] Optionally, S609: the flash memory returns an execution result of the write instruction to the controller in response to the query instruction.

[0310] The execution result includes execution success or execution failure.

[0311] Successful execution indicates that the data to be written has been written to the first storage space. Failed execution indicates that the data to be written has not been written to the first storage space. Failure to write to the first storage space may be due to a write failure or incomplete writing of the data to be written to the first storage space.

[0312] It can be understood that in the related art, the principle of asynchronous operation is: each task has one or more callback functions. After the previous task is completed, the callback function is executed instead of the next task. The next task is executed without waiting for the previous task to be completed.

[0313] Based on the above principle, the controller sends a query instruction to the flash memory, so that the flash memory returns the execution result of the write instruction to the controller. In this way, after the flash memory executes the write instruction, it does not execute the next instruction (i.e., the read instruction), but executes the execution result of the write instruction returned to the controller, that is, executes the callback function, and the read instruction does not need to wait for the write instruction to be executed before it can start execution, thereby making the execution of the write instruction and the execution of the read instruction of the flash memory asynchronous operations.

[0314] Optionally, S610: the controller receives an execution result of the write instruction returned by the flash memory.

[0315] Based on the above, the controller sends a query instruction to the flash memory. On the one hand, the flash memory responds to the query instruction and returns the execution result of the write operation to the controller, thereby realizing asynchronous operation of the write operation and the read operation. On the other hand, based on the execution result returned by the flash memory, the controller can determine whether the write instruction has been executed, thereby determining whether the flash memory has free page registers. If the flash memory has free registers, the controller can continue to send other instructions to the flash memory, thereby further improving the performance of the flash memory.

[0316] The third part of the embodiment of the present application is introduced below in conjunction with FIG9 .

[0317] Fig. 9 is a flow chart showing another data processing method according to an exemplary embodiment. Exemplarily, the method includes S901-S910.

[0318] It should be noted that for the relevant description of the flash memory in this embodiment, please refer to the first part above, which will not be repeated here.

[0319] S901: The controller sends an erase instruction to the flash memory.

[0320] It should be noted that for the relevant description of S901, please refer to the description of the erase instruction in S501, which will not be repeated here.

[0321] S902: The flash memory performs an erase operation on the first storage space based on the first page register in response to the erase instruction.

[0322] It should be noted that for the relevant description of S902, please refer to the description of the erase instruction in S502, which will not be repeated here.

[0323] S903: The controller sends a first read instruction to the flash memory.

[0324] It should be noted that for the relevant description of S903, reference can be made to the relevant description in the above S603, which will not be repeated here.

[0325] S904: The flash memory performs a first read operation on the second storage space based on the second page register in response to the first read instruction during the execution of the erase instruction.

[0326] It should be noted that for the relevant description of S904, reference can be made to the relevant description in the above S604, which will not be repeated here.

[0327] S905: The controller receives data returned by the flash memory, where the data is the data read as instructed by the first read instruction.

[0328] It should be noted that for the relevant description of S905, reference can be made to the relevant description in the above S605, which will not be repeated here.

[0329] It should be noted that for the technical effects of the third part, please refer to the above second part and will not be repeated here.

[0330] S906-S907: See above S606-S607.

[0331] S908: The controller sends a query instruction to the flash memory to query the execution result of the erase instruction.

[0332] S909: The flash memory returns the execution result of the erase instruction to the controller in response to the query instruction.

[0333] The execution result of the erase instruction includes execution success or execution failure.

[0334] Successful execution indicates that the first storage space has been successfully erased, while failed execution indicates that the first storage space has not been successfully erased.

[0335] S910: The controller receives the execution result of the erase instruction returned by the flash memory.

[0336] It should be noted that for the relevant instructions of S908-S910, reference can be made to the above-mentioned S608-S610, which will not be repeated here.

[0337] The fourth part of the embodiment of the present application is introduced below in conjunction with FIG10 .

[0338] Fig. 10 is a flow chart showing another data processing method according to an exemplary embodiment. Exemplarily, the method includes S1001-S1010.

[0339] It should be noted that for the relevant description of the flash memory in this embodiment, please refer to the first part above, which will not be repeated here.

[0340] S1001: The controller sends an erase instruction to the flash memory.

[0341] It should be noted that for the relevant description of S1001, please refer to the description of the erase instruction in S501, which will not be repeated here.

[0342] S1002: The flash memory executes the erase instruction on the first storage space based on the first page register in response to the erase instruction.

[0343] It should be noted that for the relevant description of S1002, please refer to the description of the erase instruction in S502, which will not be repeated here.

[0344] S1003: The controller sends a first write instruction to the flash memory.

[0345] Wherein, during the process of executing the erase instruction in the flash memory, the first write instruction is used to instruct to execute the first write operation on the second storage space.

[0346] It should be noted that for the relevant description of S1003, reference can be made to the relevant description in the above S603, which will not be repeated here.

[0347] S1004: During execution of the erase instruction, the flash memory performs a first write operation on the second storage space based on the second page register in response to the first write instruction.

[0348] It should be noted that for the relevant description of S1004, reference can be made to the relevant description in the above S604, which will not be repeated here.

[0349] It should be noted that for the technical effects of the fourth part, please refer to the above second part and will not be repeated here.

[0350] S1005: The controller sends a first query instruction to the flash memory, where the first query instruction is used to write the execution result of the instruction.

[0351] S1006: The flash memory returns the execution result of the write instruction to the controller in response to the first query instruction.

[0352] S1007: The controller receives the execution result of the write instruction returned by the flash memory.

[0353] It should be noted that for the relevant instructions of S1005-S1007, please refer to the above-mentioned S608-S610, which will not be repeated here.

[0354] S1008-S1010: See above S908-S910.

[0355] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, the data processing device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0356] In the embodiment of the present application, the data processing device can be divided into functional modules according to the above method. For example, the data processing device can include functional modules corresponding to the functional divisions, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.

[0357] For example, FIG11 shows a possible structural diagram of a data processing device (denoted as data processing device 1100) involved in the above embodiment. The actions performed by the data processing device 1100 are implemented through the flash memory of a storage device or through the flash memory executing corresponding software. The flash memory includes a target plane, which includes a first page register, a second page register, a first storage space, and a second storage space. The data processing device includes a processing unit 1101. The processing unit 1101 is configured to, in response to a first instruction, perform a first operation on the first storage space based on the first page register; the first instruction is configured to instruct the execution of the first operation on the first storage space, and the first instruction includes a read instruction, a write instruction, or an erase instruction. For example, S502 shown in FIG5, S602 shown in FIG6, S902 shown in FIG9, and S1002 shown in FIG10. The processing unit 1101 is further configured to, during the execution of the first instruction, perform a second operation on the second storage space based on the second page register in response to a second instruction; the second instruction is configured to instruct the execution of the second operation on the second storage space, and the second instruction includes a read instruction, a write instruction, or an erase instruction. For example, S504 shown in FIG. 5 , S604 shown in FIG. 6 , S904 shown in FIG. 9 , and S1004 shown in FIG. 10 .

[0358] Optionally, the first storage space is a first page, and the second storage space is a second page, wherein the first page and the second page are different pages; or the first storage space is a first block, and the second storage space is a page in the second block, and the first block and the second block are different blocks.

[0359] Optionally, the first instruction is a write instruction, which includes the data to be written and the address to be written, the address to be written is the address corresponding to the first storage space, and the write instruction is used to indicate that the data to be written is written into the first storage space; the processing unit 1101 is specifically used to: write the data to be written into the first page register; write the data to be written in the first page register into the first storage space.

[0360] In another possible implementation, the first instruction is an erase instruction, which includes an address to be erased, the address to be erased is the address corresponding to the first storage space, and the erase instruction is used to instruct erasure of the first storage space; the processing unit 1101 is specifically used to: write a preset value into the first page register; write the preset value in the first page register into the first storage space; the preset value is used to indicate that the first storage space is in an erased state.

[0361] In another possible implementation, the second instruction is a read instruction, which includes an address to be read, and the address to be read is the address corresponding to the second storage space. The read instruction is used to indicate a read operation on the second storage space; the processing unit 1101 is specifically used to: read the data in the second storage space to the second page register; and return the data in the second page register to the device that sends the read instruction.

[0362] In another possible implementation, the processing unit 1101 is further configured to: in response to a target read instruction, return the data in the second page register to the device that sends the target read instruction; the target read instruction is used to instruct to read the data in the second storage space.

[0363] In another possible implementation, the read instruction is a sequential read instruction, the address to be read is the starting address of the sequential read instruction, and the sequential read instruction also includes a target value, which is used to indicate the amount of data to be read; the processing unit 1101 is specifically used to: based on the second page register, starting from the starting space corresponding to the starting address, perform read operations on multiple subspaces of the second storage space in sequence, wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address in the multiple subspaces, and the number of times the read operation is performed corresponds to the target value.

[0364] In another possible implementation, the second instruction is a write instruction, which includes the data to be written and the address to be written. The address to be written is the address corresponding to the second storage space, and the write instruction is used to indicate that the data to be written is written into the second storage space; the processing unit 1101 is specifically used to: write the data to be written into the second page register; write the data to be written in the second page register into the first storage space.

[0365] In another possible implementation, the write instruction is a sequential write instruction, the address to be written is the starting address of the sequential write instruction, and the sequential write instruction also includes a target value, which is used to indicate the amount of data to be written; the processing unit 1101 is specifically used to: based on the second page register, starting from the starting space corresponding to the starting address, perform write operations on multiple subspaces of the second storage space in sequence, wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address in the multiple subspaces, and the number of write operations performed corresponds to the target value.

[0366] In another possible implementation, the target plane also includes at least one third storage space. When the execution time of the first instruction is greater than the execution time of the second instruction, the processing unit 1101 is also used to: during the execution of the first instruction and after the execution of the second instruction, in response to at least one third instruction, perform at least one third operation on at least one third storage space based on the second page register; wherein the third instruction includes a read instruction, a write instruction or an erase instruction.

[0367] In another possible implementation, the processing unit 1101 is also used to: receive a query instruction; the query instruction is used to indicate a query of the execution result of the first instruction; in response to the query instruction, return the execution result of the first instruction to the device that sent the query instruction; the execution result of the first instruction includes execution success or execution failure.

[0368] In another possible implementation, the target plane also includes a third page register and a fourth storage space, the third page register is used to cache data to be written to the target plane or to cache data read from the target plane, and the processing unit 1101 is also used to: in the process of executing the first instruction and / or the second instruction, in response to the fourth instruction, perform a fourth operation on the fourth storage space based on the third page register; the fourth instruction is used to instruct the execution of a fourth operation on the fourth storage space; wherein the fourth instruction includes a read instruction, a write instruction or an erase instruction, and the fourth operation includes a read operation, a write operation or an erase operation.

[0369] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation and description of the beneficial effects of any of the above data processing devices 1100 can refer to the above corresponding method embodiments, which will not be repeated here.

[0370] For example, FIG12 shows a possible structural diagram of the data processing device involved in the above embodiment (referred to as data processing device 1200). The actions performed by the data processing device 1200 are implemented by the flash memory of the storage device or by executing corresponding software through the flash memory. The flash memory includes a target plane, which includes a first page register, a second page register, a first storage space, and a second storage space. The data processing device includes a processing unit 1201. The processing unit 1201 is configured to write the data to be written to the first page register in response to a write instruction, and write the data to be written in the first page register to the first storage space; wherein the write instruction includes the data to be written and the address to be written, and the address to be written is the address corresponding to the first storage space. The processing unit 1201 is also configured to read the data in the second storage space into the second page register in response to a read instruction during the execution of the write instruction, and return the data in the second page register to the device that sent the read instruction; wherein the read instruction includes the address to be read, and the address to be read is the address corresponding to the second storage space.

[0371] Optionally, the first storage space is a first page, and the second storage space is a second page, wherein the first page and the second page are different pages.

[0372] Optionally, the read instruction is a sequential read instruction, the address to be read is the starting address of the sequential read instruction, and the sequential read instruction also includes a target value, which is used to indicate the amount of data to be read; the processing unit 1201 is specifically used to: respond to the sequential read instruction, starting from the starting space corresponding to the starting address, read the data of multiple subspaces of the second storage space to the second page register in sequence, and return the data in the second page register in sequence to the device that sends the sequential read instruction; wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address in the multiple subspaces, and the number of the multiple subspaces corresponds to the target value.

[0373] Optionally, the target plane also includes at least one third storage space; the processing unit 1201 is also used to: during the execution of the write instruction and after the read instruction is executed, in response to at least one third read instruction, perform at least one read operation on at least one third storage space based on the second page register.

[0374] In another possible implementation, the processing unit 1201 is also used to: receive a query instruction; the query instruction is used to indicate the execution result of the query write instruction; in response to the query instruction, return the execution result of the write instruction to the device that sent the query instruction; the execution result of the write instruction includes execution success or execution failure.

[0375] In another possible implementation, the target plane also includes a third page register and a third storage space, and the processing unit 1201 is also used to: in the process of executing a write instruction and / or a read instruction, in response to an erase instruction, write a preset value into the third page register; write the preset value in the third page register into the third storage space; the preset value is used to indicate that the third storage space is in an erased state.

[0376] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation and description of the beneficial effects of any of the above data processing devices 1200 can refer to the above corresponding method embodiments, which will not be repeated here.

[0377] For example, FIG13 shows a possible structural diagram of the data processing device involved in the above embodiment (referred to as data processing device 1300). The actions performed by the data processing device 1300 are implemented through the flash memory of the storage device or through the flash memory executing corresponding software. The flash memory includes a target plane, and the target plane includes a first page register, a second page register, a first storage space, and a second storage space. The data processing device includes a processing unit 1301. The processing unit 1301 is configured to write a preset value to the first page register in response to an erase instruction, and write the preset value in the first page register to the first storage space; wherein the erase instruction includes an erase address, and the erase address is the address corresponding to the first storage space. The processing unit 1301 is also configured to read the data in the second storage space into the second page register in response to a read instruction during the execution of the erase instruction, and return the data in the second page register to the device that sent the read instruction; wherein the read instruction includes a to-be-read address, and the to-be-read address is the address corresponding to the second storage space.

[0378] Optionally, the first storage space is a first block, the second storage space is a page of the second block, and the first block and the second block are different blocks.

[0379] Optionally, the read instruction is a sequential read instruction, the address to be read is the starting address of the sequential read instruction, and the sequential read instruction also includes a target value, which is used to indicate the amount of data to be read; in response to the read instruction, the data in the second storage space is read to the second page register, and the data in the second page register is returned to the device that sent the read instruction, including: in response to the sequential read instruction, starting from the starting space corresponding to the starting address, the data of multiple subspaces of the second storage space are read to the second page register in sequence, and the data in the second page register are returned in sequence to the device that sent the sequential read instruction; wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace whose address is ranked first among the multiple subspaces, and the number of the multiple subspaces corresponds to the target value.

[0380] In another possible implementation, the target plane also includes at least one third storage space; the processing unit 1301 is also used to: during the execution of the write instruction and after the read instruction is executed, in response to at least one third read instruction, perform at least one read operation on at least one third storage space based on the second page register.

[0381] In another possible implementation, the processing unit 1301 is further used to: receive a query instruction; the query instruction is used to indicate the query execution result of the erase instruction; in response to the query instruction, return the execution result of the erase instruction to the device that sent the query instruction; the execution result of the erase instruction includes execution success or execution failure.

[0382] In another possible implementation, the target plane also includes a third page register and a third block, and the processing unit 1301 is also used to: in the process of executing an erase instruction and / or a read instruction, in response to a write instruction, write the data to be written into the third page register; write the data to be written in the third page register into the third storage space.

[0383] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation and description of the beneficial effects of any of the above data processing devices 1300 can refer to the above corresponding method embodiments, which will not be repeated here.

[0384] For example, FIG14 shows a possible structural diagram of the data processing device involved in the above embodiment (referred to as data processing device 1400). The actions performed by the data processing device 1400 are implemented by the controller of the storage device or by the controller executing corresponding software. The storage device also includes a flash memory, the flash memory includes a target plane, and the target plane includes a first page register, a second page register, a first storage space, and a second storage space. The data processing device includes a sending unit 1401. The sending unit 1401 is used to send a first instruction to the flash memory; the first instruction is used to instruct the flash memory to perform a first operation on the first storage space, and the first instruction includes a read instruction, a write instruction, or an erase instruction. For example, S501 shown in FIG5, S601 shown in FIG6, S901 shown in FIG9, and S1001 shown in FIG10. The sending unit 1401 is also used to send a second instruction to the flash memory; the second instruction is used to instruct the flash memory to perform a second operation on the second storage space during the execution of the first instruction; the second instruction includes a read instruction, a write instruction, or an erase instruction. For example, S503 shown in FIG. 5 , S603 shown in FIG. 6 , S903 shown in FIG. 9 , and S1003 shown in FIG. 10 .

[0385] Optionally, the first storage space is a first page, and the second storage space is a second page, wherein the first page and the second page are different pages; or the first storage space is a first block, and the second storage space is a page in the second block, and the first block and the second block are different blocks.

[0386] Optionally, the first instruction is a write instruction, which includes the data to be written and the address to be written, and the address to be written is the address corresponding to the first storage space; the first instruction is used to instruct the data to be written to be written to the first storage space; or the first instruction is an erase instruction, which includes the address to be erased, and the address to be erased is the address corresponding to the first storage space, and the first instruction is used to write a preset value to the first storage space.

[0387] Optionally, the second instruction is a read instruction, the read instruction includes a to-be-read address, and the to-be-read address is an address of the second storage space; the second instruction is used to instruct to read data from the second storage space.

[0388] Optionally, the second page register stores data in the second storage space; the sending unit 1401 is also used to: send a target read instruction to the flash memory, the target read instruction is used to instruct to read the data stored in the second storage space; receive the data in the second page register returned by the flash memory, the data in the second page register is returned by the flash memory in response to the target read instruction.

[0389] Optionally, the read instruction is a sequential read instruction, the address to be read is the starting address of the sequential read instruction, and the sequential read instruction also includes a target value, which is used to indicate the amount of data to be read; the sequential read instruction is used to instruct the flash memory to perform read operations on multiple subspaces of the second storage space in sequence, starting from the starting space corresponding to the starting address during the execution of the first instruction, wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address among the multiple subspaces, and the number of times the read operation is performed corresponds to the target value.

[0390] Optionally, the second instruction is a write instruction, the second instruction includes data to be written and an address to be written, and the address to be written is the address of the second storage space; the second instruction is used to instruct to write the data to be written into the second storage space.

[0391] Optionally, the write instruction is a sequential write instruction, the address to be written is the starting address of the sequential write instruction, and the write instruction also includes a target value, which is used to indicate the amount of data to be written; the sequential write instruction is used to instruct the flash memory to perform write operations on multiple subspaces of the second storage space in sequence, starting from the starting space corresponding to the starting address during the execution of the first instruction, wherein the addresses of the multiple subspaces are arranged in sequence, the starting space is the subspace with the first address among the multiple subspaces, and the number of write operations performed corresponds to the target value.

[0392] Optionally, the target plane also includes at least one third storage space; when the execution time of the first instruction is greater than the execution time of the second instruction, the sending unit 1401 is also used to: send at least one third instruction to the flash memory, and the at least one third instruction is used to indicate that in the process of executing the first operation on the target plane, at least one third operation is performed on at least one third storage space; wherein the third instruction includes a read instruction, a write instruction or an erase instruction.

[0393] Optionally, the sending unit 1401 is further used to: send a query instruction to the flash memory, the query instruction is used to indicate querying the execution result of the first instruction; receive the execution result of the first instruction returned by the flash memory, the execution result of the first instruction includes execution success or execution failure.

[0394] Optionally, the sending unit 1401 is specifically configured to: send a query instruction to the flash memory within a preset time after the first instruction is sent; the preset time is the execution time of the first instruction.

[0395] Optionally, in the case that the second instruction is a read instruction, the sending unit 1401 is specifically configured to: after receiving data of a preset value returned by the flash memory, send a query instruction to the flash memory.

[0396] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation and description of the beneficial effects of any of the above data processing devices 1400 can refer to the above corresponding method embodiments, which will not be repeated here.

[0397] The present application also provides a computer device, which includes a processor and a memory, wherein the processor is connected to the memory, and the memory stores computer-executable instructions. When the processor executes the computer-executable instructions, the data processing method in the above embodiment is implemented. The present application does not impose any restrictions on the specific form of the computer device. For example, the computer device can be a terminal device or a network device. The terminal device can be referred to as: terminal, user equipment (UE), terminal device, access terminal, user unit, user station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user device, etc. The terminal device can be a mobile phone, augmented reality (AR) device, virtual reality (VR) device, tablet computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. The network device can be a server, etc. The server can be a physical or logical server, or two or more physical or logical servers sharing different responsibilities and cooperating with each other to implement the various functions of the server.

[0398] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is run on a computer, the computer is caused to execute any of the methods executed by the computer devices provided above.

[0399] For explanations of the relevant contents and descriptions of the beneficial effects of any of the computer-readable storage media provided above, reference may be made to the corresponding embodiments described above, and no further details will be given here.

[0400] The embodiment of the present application also provides a chip. The chip integrates a control circuit and one or more ports for implementing the functions of the above-mentioned computer device. Optionally, the functions supported by the chip can be referred to above and will not be repeated here. A person of ordinary skill in the art will understand that all or part of the steps of implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component or any combination thereof.

[0401] The present application also provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to perform any of the methods described in the above embodiments. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available media may be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., SSD).

[0402] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, computer-readable storage media and communication chips, etc., are all non-transitory.

[0403] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using a software program, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0404] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0405] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely illustrative of the present application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.

Claims

1. A data processing method, characterized in that: A flash memory for a storage device, the flash memory comprising a target plane, the target plane comprising a first page register, a second page register, a first storage space and a second storage space; the method comprising: In response to a first instruction, based on the first page register, a first operation is performed on the first storage space; the first instruction is used to instruct to perform the first operation on the first storage space, and the first instruction includes a read instruction, a write instruction or an erase instruction; During the execution of the first instruction, in response to a second instruction, a second operation is performed on the second storage space based on the second page register; the second instruction is used to instruct the execution of a second operation on the second storage space, and the second instruction includes a read instruction, a write instruction or an erase instruction.

2. The method according to claim 1, characterized in that The first storage space is a first page, and the second storage space is a second page, wherein the first page and the second page are different pages; or The first storage space is a first block, the second storage space is a page in a second block, and the first block and the second block are different blocks.

3. The method according to claim 1 or 2, characterized in that: The first instruction is a write instruction, the write instruction includes data to be written and an address to be written, the address to be written is an address corresponding to the first storage space, and the write instruction is used to instruct to write the data to be written into the first storage space; The performing a first operation on the first storage space based on the first page register includes: writing the to-be-written data into the first page register; writing the to-be-written data in the first page register into the first storage space; or The first instruction is an erase instruction, the erase instruction includes an address to be erased, the address to be erased is the address corresponding to the first storage space, and the erase instruction is used to instruct to erase the first storage space; based on the first page register, performing a first operation on the first storage space includes: writing a preset value to the first page register; writing the preset value in the first page register to the first storage space; the preset value is used to indicate that the first storage space is in an erased state.

4. The method according to claim 3, characterized in that The second instruction is a read instruction, the read instruction includes a to-be-read address, the to-be-read address is an address corresponding to the second storage space, and the read instruction is used to instruct to perform a read operation on the second storage space; The performing a second operation on the second storage space based on the second page register includes: reading data in the second storage space into the second page register; And return the data in the second page register to the device sending the read instruction.

5. The method according to claim 4, characterized in that The read instruction is a sequential read instruction, the to-be-read address is a starting address of the sequential read instruction, and the sequential read instruction further includes a target value, and the target value is used to indicate the amount of to-be-read data; performing a second operation on the second storage space based on the second page register includes: Based on the second page register, starting from the starting space corresponding to the starting address, read operations are performed on multiple subspaces of the second storage space in sequence, wherein the addresses of the multiple subspaces are arranged in order, the starting space is the subspace with the first address among the multiple subspaces, and the number of times the read operation is performed corresponds to the target value.

6. The method according to any one of claims 1 to 5, characterized in that The target plane further includes at least one third storage space; when the execution time of the first instruction is longer than the execution time of the second instruction, the method further includes: During the execution of the first instruction and after the execution of the second instruction, in response to at least one third instruction, at least one third operation is performed on the at least one third storage space based on the second page register; wherein the third instruction includes a read instruction, a write instruction or an erase instruction.

7. A data processing method, characterized in that: A flash memory for a storage device, the flash memory comprising a target plane, the target plane comprising a first page register, a second page register, a first storage space and a second storage space; the method comprising: In response to a write instruction, the data to be written is written into the first page register, and the data to be written in the first page register is written into the The first storage space; wherein the write instruction includes the data to be written and the address to be written, and the address to be written is the address corresponding to the first storage space; During the execution of the write instruction, in response to the read instruction, the data in the second storage space is read into the second page register, and the data in the second page register is returned to the device that sent the read instruction; wherein the read instruction includes an address to be read, and the address to be read is an address corresponding to the second storage space.

8. The method according to claim 7, characterized in that The first storage space is a first page, and the second storage space is a second page, wherein the first page and the second page are different pages.

9. A data processing method, characterized in that: A flash memory for a storage device, the flash memory comprising a target plane, the target plane comprising a first page register, a second page register, a first storage space and a second storage space; the method comprising: In response to an erase instruction, a preset value is written into the first page register, and the preset value in the first page register is written into the first storage space; wherein the erase instruction includes an erase address, and the erase address is an address corresponding to the first storage space; During the execution of the erase instruction, in response to a read instruction, the data in the second storage space is read into the second page register, and the data in the second page register is returned to the device that sent the read instruction; wherein the read instruction includes an address to be read, and the address to be read is an address corresponding to the second storage space.

10. The method according to claim 9, characterized in that The first storage space is a first block, the second storage space is a page of a second block, and the first block and the second block are different blocks.

11. A flash memory, characterized in that: include: A target plane, the target plane includes a microprocessor, a first page register, a second page register, a first storage space and a second storage space, the microprocessor is connected to both the first page register and the second page register, the first page register is connected to the first storage space, and the second page register is connected to the second storage space.

12. The flash memory according to claim 11, characterized in that: The flash memory is configured to perform a first operation on the first storage space based on the first page register in response to a first instruction; the first instruction is configured to instruct to perform the first operation on the first storage space, and the first instruction includes a read instruction, a write instruction, or an erase instruction; The flash memory is also used to, during the execution of the first instruction, respond to a second instruction and perform a second operation on the second storage space based on the second page register; the second instruction is used to instruct the execution of the second operation on the second storage space, and the second instruction includes a read instruction, a write instruction or an erase instruction.

13. A storage device, characterized in that: include: A controller and a flash memory as claimed in claim 11 or 12, wherein the controller is in communication connection with the flash memory; The controller is used for sending a first instruction and a second instruction to the flash memory.

14. A computer device, characterized in that: include: The storage device and mainboard as claimed in claim 13, wherein the storage device is connected to the mainboard.

Citation Information

Patent Citations

  • Storage device and method of operating storage device

    CN111179994A

  • Data processing method, flash memory and storage device

    CN116560564A

  • Flash memory chip using parallel technique

    KR101457802B1

  • Method and apparatus for programming non-volatile data storage device

    US20080049513A1

  • Non-Volatile Memory Device For Concurrent And Pipelined Memory Operations

    US20110208905A1