A memory and data reading method thereof

By establishing a predictive model, identifying data types and optimizing read operations, the performance problems caused by data read discontinuities in embedded flash memory devices are solved and the data transfer speed is improved.

CN113223584BActive Publication Date: 2024-08-27合肥康芯威存储技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110578019.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-26
Publication Date
2024-08-27
Estimated Expiration
2041-05-26

AI Technical Summary

Technical Problem

When existing embedded flash memory devices read data, the data length cannot be determined, resulting in discontinuous data reading, resulting in long Readybusy time and DMA time, which reduces the data transmission speed.

Method used

By collecting historical partition numbers, historical starting logical block addresses and data continuity types, a prediction model is established to predict whether the data is single logical page data or multi-logical page data, thereby optimizing the data reading operation.

Benefits of technology

The data reading speed is improved, unnecessary data transmission is reduced, and the overall performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113223584B
    Figure CN113223584B
Patent Text Reader

Abstract

The present invention proposes a memory and a data reading method thereof, comprising: collecting multiple historical partition numbers, multiple historical starting logical block addresses and multiple historical data continuity types; obtaining a prediction model according to the multiple historical partition numbers and the multiple historical starting logical block addresses; receiving a read command through a host, the read command including a partition number and a starting logical block address; predicting a data continuity type according to the partition number, the starting logical address and the prediction model, the data continuity type including single logical page data or multi-logical page data; reading data according to the predicted data continuity type. The memory and the data reading method thereof proposed by the present invention can improve the data reading speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage technology, and in particular to a memory and a data reading method thereof. Background Art

[0002] The embedded flash memory device (EMMC) interface is based on the JEDEC standard. In the read command, since the data length is not specified, the cmd18 command only needs to be transmitted once, and one less length parameter is sent than the command with a specified length. However, after receiving the read command, the flash memory cannot determine how much data to read, and can only directly upload data continuously until the cmd12 command is completed. Data needs to be obtained from NAND Flash before it can be transmitted to the host. The acquisition process will have Readybusy time and data DMA time. The more data is read at one time, the longer the DMA time is, and the longer it takes to start transmitting back to the host.

[0003] In the case of unclear data continuity, if only 4K data is read directly from the Flash, when the host actually operates multiple 4K data in succession, the entire page that could have been read at one time must be read in two operations, which reduces the speed. If multiple 4K (the entire page is 16K) data is read directly from the Flash, when the host actually operates a single 4K data, it only needs to read a single 4K data, but reads redundant data, which reduces the speed. Summary of the invention

[0004] In view of the above-mentioned defects of the prior art, the present invention proposes a memory and a data reading method thereof, which can predict whether the data to be read is single logical page data (such as a single 4K data) or multi-logical page data (such as multiple 4K data), so that the data can be read quickly and the reading speed can be improved.

[0005] To achieve the above and other purposes, the present invention provides a method for reading data from a memory, comprising:

[0006] Collect multiple historical partition numbers, multiple historical starting logical block addresses and multiple historical data continuity types;

[0007] Obtain a prediction model according to the plurality of historical partition numbers and the plurality of historical starting logical block addresses;

[0008] receiving a read command through a host, the read command including a partition number and a starting logical block address;

[0009] Predicting a data continuity type according to the partition number, the starting logical block address and the prediction model, the data continuity type including single logical page data or multiple logical page data;

[0010] Data is read according to the predicted data continuity type.

[0011] Furthermore, after obtaining the data continuity type, the prediction model is updated according to the partition number, the starting logical block address and the data continuity type.

[0012] Furthermore, when the output value of the prediction model is less than a threshold value, the data continuity type is the single logical page data; and when the output value of the prediction model is greater than the threshold value, the data continuity type is the multi-logical page data.

[0013] Furthermore, the output value of the prediction model is greater than zero and less than one.

[0014] Furthermore, the prediction model includes an input layer, a hidden layer and an output layer.

[0015] Furthermore, the input layer includes the partition number and the starting logical block address.

[0016] Furthermore, the input function of the hidden layer is:

[0017]

[0018] Among them, netInput j (j) represents the input function, x i represents the nodes of the input layer, w ij represents the weight between the input layer and the hidden layer, b ij represents the bias between the input layer and the hidden layer.

[0019] Furthermore, the input function of the output layer is:

[0020]

[0021] Among them, netInput k (k) represents the input function of the output layer, x j represents the nodes of the hidden layer, w jk represents the weight between the hidden layer and the output layer, b jk represents the bias between the hidden layer and the output layer.

[0022] Furthermore, when the prediction model is updated, the weight between the input layer and the hidden layer is also updated, and the bias between the input layer and the hidden layer is also updated.

[0023] Furthermore, when the weight between the input layer and the hidden layer, and the bias between the input layer and the hidden layer are updated, and the error between the output value and the expected output value is less than a threshold, the iteration is stopped.

[0024] Furthermore, the present invention also provides a memory, comprising:

[0025] A host, configured to receive a read command, wherein the read command includes a partition number and a starting logical block address;

[0026] A sample unit, used for collecting a historical partition number, a plurality of historical starting logical block addresses and a plurality of historical data continuity types;

[0027] A prediction unit, used to obtain a prediction model based on multiple historical partition numbers and multiple historical starting logical block addresses, and predict a data continuity type based on the partition number, the starting logical block address and the prediction model, wherein the data continuity type includes single logical page data or multiple logical page data; a reading unit, used to read data according to the predicted data continuity type.

[0028] In summary, the present invention proposes a memory and a data reading method thereof, which collects a large number of historical partition numbers, historical starting logical block addresses and historical data continuity types through sample units, thereby constructing the relationship between the partition number, the starting logical block and the data continuity type, that is, establishing a prediction model for the partition number, the starting logical block and the data continuity type. Therefore, when the host receives a read command without a length, the current data continuity type can be predicted according to the partition number, the starting logical block and the prediction model. The data continuity type may include single logical page data or multiple logical page data. When the output value of the prediction model is less than a threshold, single logical page data is output. When the output value of the prediction model is greater than the threshold, multiple logical page data is output. Therefore, the present invention can predict single logical page data or multiple logical page data according to the output value of the prediction model, so that single logical page data or multiple logical page data can be quickly read out, thereby improving the reading speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 : A block diagram of a memory proposed in this embodiment.

[0030] Figure 2 : Block diagram of the memory controller in this embodiment.

[0031] Figure 3 : Block diagram of the LPN converter in this embodiment.

[0032] Figure 4 : Operation block diagram of the storage controller in this embodiment.

[0033] Figure 5: A block diagram of another memory proposed in this embodiment.

[0034] Figure 6 : Schematic diagram of the storage unit in this embodiment.

[0035] Figure 7 : Schematic diagram of the sample unit in this embodiment.

[0036] Figure 8 : Schematic diagram of the prediction model in this embodiment.

[0037] Fig. 9 : A flow chart of a method for reading data from a memory in this embodiment. DETAILED DESCRIPTION

[0038] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.

[0039] It should be noted that the illustrations provided in this embodiment are only used to illustrate the basic concept of the present invention in a schematic manner. Therefore, the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0040] like Figure 1 As shown, the present embodiment proposes a memory 100, which includes a host 110 and a storage device 120. The storage device 120 includes a memory controller 121 and a flash memory 122. The host 110, the memory controller 121, and the flash memory 122 can be implemented as separate chips, modules, or devices, or can be included in a single device. For example, the memory controller 121 and the flash memory 122 can be integrated into a single storage device and then can be connected to the host 110. However, the present disclosure is not limited to this example. That is, in another example, the host 110, the memory controller 121, and the flash memory 122 can be integrated into a single device.

[0041] like Figure 1As shown, the memory 100 may include a host 110 and a storage device 120 that transmits commands and / or data to the host 110 through an interface 111. The memory 100 may be implemented as a personal computer (PC), a workstation, a data center, an Internet data center, a storage area network, a network attached storage (NAS), or a mobile computing device, but the inventive concept is not limited to these examples. The mobile computing device may be implemented as a laptop computer, a cellular phone, a smart phone, a tablet PC, a personal digital assistant (PDA), an enterprise digital assistant (EDA), a digital still camera, a digital video camera, a portable multimedia player (PMP), a personal navigation device or a portable navigation device (PND), a handheld game console, a mobile Internet device (MID), a wearable computer, an Internet of Things (IoT) device, an Internet of Things (IoE) device, a drone, or an e-book, but the inventive concept is not limited to these examples.

[0042] like Figure 1 As shown, the interface 111 may be a Serial Advanced Technology Attachment (SATA) interface, a SATA Express (SATAe) interface, a SAS (Serial Attachment Small Computer System Interface (SCSI)), a Peripheral Component Interconnect Express (PCIe) interface, a Non-Volatile Memory Express (NVMe) interface, an Advanced Host Controller Interface (AHCI) or a Multimedia Card (MMC) interface, but is not limited thereto. The interface 111 may transmit electrical signals or optical signals. The host 110 may control data processing operations (e.g., write operations or read operations) of the storage device 120 via the interface 111. The host 110 may refer to a host controller.

[0043] like Figure 1 As shown, the host 110 can send a request for a read or write operation to the memory controller 121 by using an application or a file system. The memory controller 121 controls the operation of the flash memory 122, such as a read or write operation, in response to the request sent by the host 110. The unit for reading data from the flash memory 122 or writing data to the flash memory 122 is different from the unit for erasing data from the flash memory 122. That is, the flash memory 122 can be erased in units of memory blocks, and the flash memory 122 can be read or written in units of pages. Unlike other semiconductor memory devices, the flash memory 122 does not support an overwrite function. Therefore, the flash memory 122 is first erased to be written.

[0044] like Figure 1As shown, the flash memory 122 includes a plurality of memory cells having a string cell structure. The plurality of memory cells are referred to as a memory cell array. The memory cell array of the flash memory 122 includes a plurality of memory blocks. Each of the memory blocks includes a plurality of pages. Each of the pages includes a plurality of memory cells that share a single word line together. The address of the flash memory 122 where the data actually exists is referred to as a physical page number (Logical Page Number, PPN). In order to manage the PPN, the memory controller 121 uses a logical page number (Logical Page Number, LPN), which corresponds one-to-one to the PPN. The memory controller 121 manages the LPN and PPN using the use of a flash translation layer (Flash Translation Layer, FTL). The FTL can be stored in the memory 105 of the memory controller 121 in the form of an FTL mapping table.

[0045] like Figure 2 As shown, Figure 2 A block diagram of the memory controller 121 of the present embodiment is shown. The memory controller 121 may include a central processing unit (CPU) 103, a logical page number (LPN) converter 104, a memory 105, a host interface (InterFace, I / F) 106, a flash memory controller 107, and a bus 108. The CPU 103 may perform calculations for driving the memory controller 121. The CPU 103 may call the PPN of the flash memory 122 by using the logical address assigned to the memory mapping address space. In response to receiving one of the logical addresses assigned to the memory mapping address space of the CPU 103 from the CPU 103, the LPN converter 104 may send the PPN corresponding to the received logical address to the CPU 103. More specifically, the LPN converter 104 may extract the LPN corresponding to the received logical address, may read the FTL mapping table from the memory 105, may extract the PPN corresponding to the extracted LPN from the FTL mapping table, and may send the extracted PPN to the CPU 103.

[0046] like Figure 2As shown, the memory 105 may store an FTL mapping table including the PPN of the flash memory 122 and the LPNs respectively corresponding to the PPNs of the flash memory 122. The memory 105 may include a non-volatile memory or a volatile memory. The memory 105 may be used as at least one of an operation memory of the CPU 103, a cache memory between the flash memory 122 and the host 110, and a buffer memory. The host I / F 106 may include a protocol for exchanging data between the host 110 and the memory controller 121. For example, the host I / F 106 may be configured to communicate with the host 110 via at least one of various I / F protocols such as the following protocols: Universal Serial Bus (USB) protocol, Multi Media Card (MMC) protocol, Peripheral Component Interconnection (PCI) protocol, PCI Express (PCI-E) protocol, Advanced Technology Attachment (ATA) protocol, Serial ATA protocol, Parallel ATA protocol, Small Computer System Interface (SCSI) protocol, Enhanced Small Disk Interface (ESDI) protocol, and Integrated Drive Electronics (IDE) protocol, etc. These protocols are only examples and do not specifically limit the protocols used.

[0047] like Figure 2As shown, the flash memory controller 107 can exchange instructions and data between the memory controller 121 and the flash memory 122 and can control the flash memory 122. The bus 108 can be used to exchange data between the CPU 103, the LPN converter 104, the memory 105, the host I / F 140, and the flash memory controller 107. For example, the bus 108 can send the PPN corresponding to the called logical address to the element of the memory controller 121. The bus 108 may include an address bus that sends a logical address, and a data bus that sends data, but the present disclosure is not limited thereto. The bus 108 is a path through which data is sent. In some exemplary embodiments, the bus 108 may have a multi-layer structure. The bus 108 may include a protocol for exchanging data between the CPU 103, the LPN converter 104, the memory 105, the host I / F 106, and the flash memory controller 107. A multi-layer Advanced High-performance Bus (AHB) or a multi-layer Advanced Xtensible Interface (AXI) may be used as the bus 108 , but the present disclosure is not limited thereto.

[0048] like Figure 3 As shown, Figure 3 Display as Figure 2 1 is a block diagram of an LPN converter 104 of the present invention. The LPN converter 104 may include an LPN extractor 1041, an FTL mapping address generator 1042, an unpacker / packer 1043, a cache 1044, and a data bus 1045. The LPN converter 104 may be implemented in the memory controller 121 in the form of hardware, for example, by an Application Specific Integrated Circuit (ASIC) specially created to perform the LPN converter function or by a hardware block, but the present disclosure is not limited thereto. That is, alternatively, in some exemplary embodiments, the LPN converter 104 may be implemented in the form of software as a module in the memory controller 121. The LPN converter 104 in the form of software may be implemented by at least one of the microprocessors operating in conjunction with one or more memories, for example, by the CPU 103 operating in conjunction with the memory 105. The LPN extractor 1041 may extract the LPN corresponding to the logical address using the logical address. The FTL mapping address generator 1042 may generate an FTL mapping address by using the extracted LPN, through which the FTL mapping table stored in the memory 105 may be accessed.

[0049] like Figure 3As shown, the depacketizer / packer 1043 may receive the FTL mapping table from the memory 105 and may perform depacketization as a process of extracting a PPN corresponding to the extracted LPN, or perform packing as a process of converting the FTL mapping table including the modified PPN into a form that can be transmitted. The cache 1044 may temporarily store the FTL mapping address generated by the FTL mapping address generator 1042 and / or the FTL mapping table received from the memory 105. The data bus 1045 may be used in data communication between the LPN extractor 1041, the FTL mapping address generator 1042, the depacketizer / packer 1043, and the cache. The data bus 1045 may be a path via which data is transmitted, and may include a protocol for exchanging data.

[0050] like Figure 4 As shown, Figure 4 Shown as an operation block diagram of the memory controller 121, the CPU 103 of the memory controller 121 sends a logical address to the LPN converter 104. The logical address sent by the CPU 103 may be a logical address of a memory mapped address space used in the operation of the CPU 103. The LPN converter 104 receives the logical address from the CPU 103, extracts the LPN corresponding to the received logical address, and extracts the FTL mapped address corresponding to the extracted LPN. Thereafter, the LPN converter 104 sends the extracted FTL mapped address to the memory 105 and receives data including an FTL mapping table corresponding to the fetched FTL mapped address from the memory 105.

[0051] like Figure 1 As shown, in some embodiments, the flash memory 122 may also include firmware (FirmWare, F / W), which stores load instructions and store instructions. The CPU 103 can call the load instruction or store instruction from the F / W of the flash memory 122 and the called instruction can be stored in the RAM of the CPU 103. Various instructions of the F / W can be written in assembly language, and the F / W code for performing specific operations can be created by the combination of various instructions. The CPU 103 can access the flash memory 122 by using the load instruction or store instruction and the logical address. That is, the CPU 103 can call the PPN of the flash memory 122 by using the load instruction or store instruction and the logical address.

[0052] like Figure 5As shown, this embodiment also proposes another memory 100, which may include a host 110 and a storage device 120. The host 110 is electrically connected to the storage device 120. The storage device 120 may include a control unit 130, a storage unit 140, a sample unit 150, and a prediction unit 160. When the host 110 receives a write command or a read operation, the control unit 130 may store data in the storage unit 140 or the control unit 120 may read data from the storage unit 140 and send the data to the host 110.

[0053] like Figure 5-Figure 6 As shown, in this embodiment, the storage unit 140 includes a plurality of storage blocks 140. Each storage block 140 includes a plurality of pages 142. When executing a write data request, the memory 100 writes data in units of pages 142. For example, the host 110 sends a write data request to the control unit 120. The write data request includes the logical address of the data. After receiving the write data request, the control unit 120 continuously writes the data into one or more storage blocks 140 in the order of the time received. Continuously writing into one or more storage blocks 140 means that the control unit 120 searches for a blank storage block 140 and writes the data into the blank storage block 140 until the blank storage block 140 is filled. When the size of the data exceeds the capacity of the storage block 140, the control unit 120 searches for the next blank storage block 140 and continues writing. The flash translation layer establishes and saves the correspondence between the logical address and the actual address of the page where the data is written. When the host 110 sends a read data request to the control unit 120 to read the data, the read data request includes the logical address. The control unit 120 reads the data according to the logical address and the correspondence between the logical address and the actual address, and sends the data to the host 110.

[0054] like Figure 6As shown, data block 143 is the minimum operation unit of page 142. One data block 143 corresponds to a floating gate transistor, which can store 1 bit or multiple bits of data, depending on the type of flash memory. The storage cells on a page share a word line. Data block 143 includes a control gate and a floating gate, and the floating gate is the unit that actually stores data. Data is stored in the data block 143 in the form of electrical charge. The amount of stored charge depends on the voltage applied to the control gate, which controls whether the charge is rushed into the floating gate or released. The representation of data is represented by whether the voltage of the stored charge exceeds a specific threshold. Writing data to the floating gate is to apply a voltage to the control gate so that the charge stored in the floating gate is enough to exceed the threshold, which represents 0. Erasing the flash memory is to discharge the floating gate so that the charge stored in the floating gate is lower than the threshold, which represents 1.

[0055] like Figure 5 and Figure 7 As shown, a large number of data groups are stored in the sample unit 150, each of which includes a historical partition number 151, a historical starting logical block address 152, and a historical data continuity type 153. When the host 110 sends a read command to the control unit 120, for example, multiple partition numbers and starting logical block addresses are sent to the control unit 120. When the control unit 120 finds the data, it sends the number continuity type to the host 110, for example, single logical page data or multiple logical page data is sent to the host 110, for example, single 4K data or multiple 4K data is sent to the host 110. Therefore, a large number of data groups will be stored in the sample unit 150. Each time the host 110 sends a read operation, each data group will be stored in the sample unit 150, thereby accumulating a large number of data groups, which are convenient for the prediction unit 160 to establish the relationship between the partition number, the starting logical block address, and the data continuity type.

[0056] like Figure 8 As shown, in this embodiment, after the sample unit 150 accumulates a large number of data groups, the prediction unit 160 establishes the relationship between the partition number, the starting logical block address and the data continuity type according to the existing data groups, that is, when the partition number and the starting logical block address are input, the data continuity type is output, that is, a prediction model of the partition number, the starting logical block address and the data continuity type is established.

[0057] like Figure 8As shown, in this embodiment, the prediction model may include an input layer 161, a hidden layer 162 and an output layer 163. The input layer 161 can input the input partition number and the starting logical block address into nodes 1611 and 1612 respectively. The partition number can be used to determine whether the data to be output belongs to single logical page data or multi-logical page data. For example, when the partition number is in the large file area, the output data roughly belongs to multi-logical page data, and when the partition number is in the small file area, the output data roughly belongs to single logical page data.

[0058] like Figure 8 As shown, in this embodiment, after the partition number and the starting logical block address are input into the input layer 161, the prediction unit 160 establishes a functional relationship between the input layer 161 and the hidden layer 162. The input layer 161 includes two nodes, namely, node 1611 and node 1612. The hidden layer 162 includes, for example, five nodes, namely, node 1621 to node 1625. Therefore, the input function of the hidden layer 162 is

[0059]

[0060] Among them, netInput j (j) represents the input function of the hidden layer, x i represents the nodes of the input layer, w ij represents the weight between the input layer and the hidden layer, b ij The weight is the weight relationship between the nodes of the input layer 161 and the nodes of the hidden layer 162, and the polarization is the bias relationship between the nodes of the input layer 161 and the nodes of the hidden layer 162. The weight and bias between the input layer 161 and the hidden layer 162 are continuously updated during the model building process (iterative process). For example, the weight relationship between node 1611 and node 1621 is w 00 , the weight relationship between node 1612 and node 1621 is w 10 , the weight relationship between node 1611 and node 1622 is w 01 , the weight relationship between node 1612 and node 1622 is w 11 , the weight relationship between node 1611 and node 1623 is w 02 , the weight relationship between node 1612 and node 1623 is w 12 , the weight relationship between node 1611 and node 1624 is w 03 , the weight relationship between node 1612 and node 1624 is w 13 , the weight relationship between node 1611 and node 1625 is w 04, the weight relationship between node 1612 and node 1625 is w 14 The polarization relationship between node 1611 and node 1621 is b 00 At the same time, the prediction unit 160 can also establish the output function of the hidden layer 162

[0061]

[0062] Among them, netOutput j (j) represents the output function of the hidden layer 162.

[0063] like Figure 8 As shown, after the output function of the hidden layer 162 is established, the functional relationship between the hidden layer 162 and the output layer 163 is then constructed. In this embodiment, the output layer 163 may include a node 1631, that is, the output layer 163 outputs a value, which may be the probability that the output data is single-logic page data or multi-logic page data. For example, when the output value is less than a threshold value, the data continuity type is single-logic page data, and when the output value is greater than the threshold value, the data continuity type is multi-logic page data. The output value may be a number greater than 0 and less than 1. When the output value is less than 0.5, the data continuity type is single-logic page data, and when the output value is greater than or equal to 0.5, the data continuity type is multi-logic page data.

[0064] like Figure 8 As shown, in this embodiment, the input function of the output layer 163 is

[0065]

[0066] Among them, netInput k (k) represents the input function of the output layer, x j represents the nodes of the hidden layer 162, w jk represents the weight between the hidden layer and the output layer, b jk The weight represents the weight relationship between the nodes of the hidden layer and the nodes of the output layer. The bias represents the bias relationship between the nodes of the hidden layer and the nodes of the output layer. The weight and bias between the hidden layer 162 and the output layer 163 are continuously updated during the model building process (iterative process). For example, the weight relationship between node 1621 and node 1631 is 00 , the weight relationship w between node 1622 and node 1631 10 , the weight relationship w between node 1623 and node 1631 20 , the weight relationship w between node 1624 and node 1631 30, the weight relationship w between node 1625 and node 1631 40 The bias relationship between node 1621 and node 1631 is b 00 The prediction unit 160 also establishes the output function of the output layer 163,

[0067]

[0068] netOutput k (k) represents the output function of the output layer 163.

[0069] like Figure 8 As shown, the prediction model establishes a functional relationship between the input layer 161 and the hidden layer 162, and at the same time establishes a functional relationship between the output layer 163 of the hidden layer 162, that is, a functional relationship between the input layer 161 and the output layer 163 is established, that is, a prediction model of the partition number, the starting logical block address and the data continuity type is established. Since the prediction model has been established, when the partition number and the starting logical block address are input, the data continuity type can be predicted. Therefore, when the data length is not input, the data continuity type can be quickly predicted, thereby improving the data reading speed.

[0070] like Figure 6-Figure 8 As shown, in this embodiment, the prediction unit 160 needs to use a large number of data groups when establishing the prediction model, and forms the prediction model through successive iterations. When the weight between the input layer and the hidden layer, the bias between the input layer and the hidden layer are updated, and the error between the output value and the expected output value is less than a threshold, or when the weight between the hidden layer and the output layer, the bias between the hidden layer and the output layer are updated, and the error between the output value and the expected output value is less than a threshold, the iteration is stopped.

[0071] The update function of the weights between the input layer 161 and the hidden layer 162 is

[0072] w ij =w ij +η*netOutput j (j)*(1-netOutput j (j))*x i *w jk *e k

[0073] The update function of the bias between the input layer 161 and the hidden layer 162 is

[0074] b ij =b ij +η*netOutput j(j)*(1-netOutput j (j))*w jk *e k

[0075] The update function of the weights between the hidden layer 162 and the output layer 163 is

[0076] w jk =w jk +η*netOutput j (j)*e k

[0077] The update function of the weights between the hidden layer 162 and the output layer 163 is

[0078] b jk =b jk +η*e k

[0079] Where η is a constant, for example, 0.1, e k Represents an error. When the error is less than a threshold value, for example, less than 0.1, it indicates that the prediction model has been completed. In some embodiments, when the number of iterations is greater than 5000, it may also indicate that the iteration is complete, that is, the prediction model has been established. It should be noted that when the number of data groups in the sample unit 150 increases, it is necessary to update the weights between the input layer 161 and the hidden layer 162, and at the same time update the bias between the input layer 161 and the hidden layer 162, so as to update the prediction model. While updating the weights and biases between the input layer 161 and the hidden layer 162, it is also necessary to update the weights and biases between the hidden layer 162 and the output layer 162, so that the output result can be updated.

[0080] like Fig. 9 As shown, this embodiment also provides a data reading method of a memory, comprising:

[0081] S1: collect multiple historical partition numbers, multiple historical starting logical block addresses and multiple historical data continuity types;

[0082] S2: Obtain a prediction model according to the plurality of historical partition numbers and the plurality of historical starting logical block addresses;

[0083] S3: receiving a read command through the host, where the read command includes a partition number and a starting logical block address;

[0084] S4: predicting a data continuity type according to the partition number, the starting logical block address and the prediction model, where the data continuity type includes single logical page data or multi-logical page data;

[0085] S5: Read data according to the predicted data continuity type.

[0086] like Figure 6-Figure 8 As shown, in steps S1-S2, a plurality of historical partition numbers, a plurality of historical starting logical block addresses and a plurality of historical data continuity types are collected by the sample unit 150, and then a prediction model is obtained according to the plurality of historical partition numbers and the plurality of historical starting logical block addresses by the prediction unit 160. The process of establishing the prediction model can refer to the above description.

[0087] like Figure 6-Figure 8 As shown, in steps S3-S5, after the host 110 receives the read command, the partition number and the starting logical block address are sent to the prediction unit 160, that is, the partition number and the starting logical block address are input into the prediction model, and then the output value is obtained through the prediction model. For example, when the output value is greater than 0.5, the multi-logical page data is sent to the host 110; for example, when the output value is less than 0.5, the single logical page data is sent to the host 110. After obtaining the single logical page data or the multi-logical page data, the data continuity type, the partition number and the starting logical block address need to be saved as a data group in the sample unit 150, so that the prediction unit 160 updates the prediction model. It should be noted that the output value can be a value greater than 0 and less than 1. In this embodiment, the host 110 does not send the data length to the control unit 120.

[0088] In summary, the present invention proposes a memory and a data reading method thereof, which collects a large number of historical partition numbers, historical starting logical block addresses and historical data continuity types through sample units, thereby constructing the relationship between the partition number, the starting logical block and the data continuity type, that is, establishing a prediction model for the partition number, the starting logical block and the data continuity type. Therefore, when the host receives a read command without a length, the current data continuity type can be predicted according to the partition number, the starting logical block and the prediction model. The data continuity type may include single logical page data or multiple logical page data. When the output value of the prediction model is less than a threshold, single logical page data is output. When the output value of the prediction model is greater than the threshold, multiple logical page data is output. Therefore, the present invention can predict single logical page data or multiple logical page data according to the output value of the prediction model, so that single logical page data or multiple logical page data can be quickly read out, thereby improving the reading speed.

[0089] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the inventive concept, such as a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.

[0090] Except for the technical features described in the specification, the remaining technical features are known technologies to those skilled in the art. In order to highlight the innovative features of the present invention, the remaining technical features will not be described here in detail.

Claims

1. A method for reading data from a memory, characterized in that: include: Collect multiple historical partition numbers, multiple historical starting logical block addresses and multiple historical data continuity types; Obtain a prediction model according to the plurality of historical partition numbers and the plurality of historical starting logical block addresses; receiving a read command through a host, the read command including a partition number and a starting logical block address; Predicting a data continuity type according to the partition number, the starting logical block address and the prediction model, the data continuity type including single logical page data or multi-logical page data; Reading data according to the predicted data continuity type, when the output value of the prediction model is less than a threshold value, the data continuity type is the single logical page data, and when the output value of the prediction model is greater than the threshold value, the data continuity type is the multi-logical page data; The prediction model includes an input layer, a hidden layer and an output layer, and the input function of the hidden layer is: Among them, netInput j (j) represents the input function, x i represents the nodes of the input layer, w ij represents the weight between the input layer and the hidden layer, b ij represents the bias between the input layer and the hidden layer, The input function of the output layer is: Among them, netInput k (k) represents the input function of the output layer, x j represents the nodes of the hidden layer, w jk represents the weight between the hidden layer and the output layer, b jk represents the bias between the hidden layer and the output layer.

2. The data reading method according to claim 1, characterized in that: After obtaining the data continuity type, the prediction model is also updated according to the partition number, the starting logical block address and the data continuity type.

3. The data reading method according to claim 1, characterized in that: The output value of the prediction model is greater than zero and less than one.

4. The data reading method according to claim 1, characterized in that: The input layer includes the partition number and the starting logical block address.

5. The data reading method according to claim 4, characterized in that: When the prediction model is updated, the weight between the input layer and the hidden layer is also updated, and the bias between the input layer and the hidden layer is also updated.

6. A memory, characterized in that: include: A host, configured to receive a read command, wherein the read command includes a partition number and a starting logical block address; A sample unit, used for collecting a historical partition number, a plurality of historical starting logical block addresses and a plurality of historical data continuity types; a prediction unit, configured to obtain a prediction model according to a plurality of the historical partition numbers and a plurality of the historical starting logical block addresses, and predict a data continuity type according to the partition number, the starting logical block address and the prediction model, wherein the data continuity type includes single logical page data or multiple logical page data; a reading unit, configured to read data according to the predicted data continuity type, wherein when an output value of the prediction model is less than a threshold value, the data continuity type is the single logical page data, and when an output value of the prediction model is greater than a threshold value, the data continuity type is the multiple logical page data; The prediction model includes an input layer, a hidden layer and an output layer, and the input function of the hidden layer is: Among them, netInput j (j) represents the input function, x i represents the nodes of the input layer, w ij represents the weight between the input layer and the hidden layer, b ij represents the bias between the input layer and the hidden layer, The input function of the output layer is: Among them, netInput k (k) represents the input function of the output layer, x j represents the nodes of the hidden layer, w jk represents the weight between the hidden layer and the output layer, b jk represents the bias between the hidden layer and the output layer.